Thread overview
[Issue 6] ARM: Illegal instruction in runnable/aliasthis.d and with -O2
Sep 24, 2012
Johannes Pfau
Sep 24, 2012
Johannes Pfau
Sep 24, 2012
Johannes Pfau
Sep 24, 2012
Johannes Pfau
Sep 24, 2012
Iain Buclaw
Sep 24, 2012
Iain Buclaw
Sep 24, 2012
Iain Buclaw
Sep 24, 2012
Iain Buclaw
Sep 24, 2012
Johannes Pfau
Sep 24, 2012
Johannes Pfau
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #1 from Johannes Pfau <johannespfau@gmail.com> 2012-09-24 16:24:50 UTC ---
Created attachment 2
  --> http://gdcproject.org/bugzilla/attachment.cgi?id=2
gdb backtrace

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #2 from Johannes Pfau <johannespfau@gmail.com> 2012-09-24 16:25:18 UTC ---
Created attachment 3
  --> http://gdcproject.org/bugzilla/attachment.cgi?id=3
gdc -v ouput / system info

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #3 mime|application/octet-stream    |text/plain
               type|                            |

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #3 from Johannes Pfau <johannespfau@gmail.com> 2012-09-24 16:36:47 UTC ---
Actually seems to happen for any assert or thrown Exception. I remember Exceptions where working some time ago, so this is probably an error in my gdc / gcc configuration.

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> 2012-09-24 18:22:52 UTC ---
As this occurs in a libgcc .S file, yes it does seem like a configuration problem let's have a look and see what causes that illegal instruction to be ran...

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> 2012-09-24 18:28:50 UTC ---
That particular assembly code is intended for !__ARM_ARCH_6M__ systems.

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #6 from Iain Buclaw <ibuclaw@gdcproject.org> 2012-09-24 18:34:46 UTC ---
Having a look at gcc-4.8/gcc/config/arm/arm-arches.def

Perhaps you need to reconfigure with --with-arch=armv6-m  or armv6s-m for soft float.

Regards
Iain.

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #7 from Iain Buclaw <ibuclaw@gdcproject.org> 2012-09-24 18:36:22 UTC ---
(In reply to comment #6)
> Having a look at gcc-4.8/gcc/config/arm/arm-arches.def
> 
> Perhaps you need to reconfigure with --with-arch=armv6-m  or armv6s-m for soft float.
> 

At least, I assume the 's' bit means soft. ;)

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

--- Comment #8 from Johannes Pfau <johannespfau@gmail.com> 2012-09-24 18:55:19 UTC ---
No, I think it's a gdc bug. I think something recently broke the ARM EABI unwinder. The gcc executable from the same build as the gdc executable works. And the version (GNU_ARM_EABI_Unwinder) is not set, although it is detected by configure and DCFG_ARM_EABI_UNWINDER is set to "GNU_ARM_EABI_Unwinder".

Seems the reason is this commit: https://github.com/D-Programming-GDC/gdc/commit/ffed7d684e94d2b933a7d2f27403d8fb7de65314

DCFG_ARM_EABI_UNWINDER=GNU_ARM_EABI_Unwinder ends up in the toplevel
phobos-ver-syms file, but not in libdruntime/phobos-ver-syms. Seems the
libdruntime/phobos-ver-syms.in file wasn't updated in
https://github.com/D-Programming-GDC/gdc/commit/ffed7d684e94d2b933a7d2f27403d8fb7de65314


I'm not sure if using the wrong unwinder can have such an effect. But I looked at the exception handling code in libgcc and there's no reason why it would work for c++ but not form gdc, unless we corrupt the context in the personality routine.

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.
September 24, 2012
http://gdcproject.org/bugzilla/show_bug.cgi?id=6

Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from Johannes Pfau <johannespfau@gmail.com> 2012-09-24 19:43:17 UTC ---
yep, that was the problem. Fix: https://github.com/D-Programming-GDC/gdc/pull/31

-- 
Configure issuemail: http://gdcproject.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all issue changes.