http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61027
Bug ID: 61027 Summary: gnatcmd gets SIGABRT during exception handling Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: simon at pushface dot org Mac OS X 10.9.2 (darwin13.1.0), Xcode 5.1.1 The tool gnat (built as gnatcmd), as built in GCC, fails with SIGABRT while unwinding an exception. None of the other tools show this behaviour (I suppose they may not raise exceptions?), and gnatcmd is perhaps unusual in that it raises an exception as part of its normal exit. I rebuilt gnatcmd with the newly-built compiler, and the problem went away (gnatcmd executed successfully). This is a GDB session showing the problem. (gdb) catch exception Catchpoint 1: all Ada exceptions (gdb) run list system.ads Starting program: /Users/simon/tmp/gnatcmd/gnat list system.ads Catchpoint 1, VMS_CONV.NORMAL_EXIT at 0x00000001000d0a8a in _ada_gnatcmd () at /Users/simon/tmp/gcc-4.9.0/gcc/ada/gnatcmd.adb:2713 2713 raise Normal_Exit; (gdb) n 44 end Debug_Raise_Exception; (gdb) n ada__exceptions__complete_occurrence (x=0x100a08710) at a-except.adb:943 943 end Complete_Occurrence; (gdb) n ada__exceptions__complete_and_propagate_occurrence (x=0x100a08710) at a-except.adb:952 952 Exception_Propagation.Propagate_Exception (X); (gdb) s ada__exceptions__exception_propagation__propagate_exceptionXn ( excep=0x100a08710) at a-exexpr.adb:351 351 procedure Propagate_Exception (Excep : EOA) is (gdb) s 353 Propagate_GCC_Exception (To_GCC_Exception (Excep.Machine_Occurrence)); (gdb) s ada__exceptions__exception_propagation__propagate_gcc_exceptionXn ( gcc_exception=0x100a086d0) at a-exexpr.adb:311 311 procedure Propagate_GCC_Exception (gdb) s 321 Unwind_RaiseException (GCC_Exception); (gdb) s __gnat_Unwind_RaiseException (e=0x100a086d0) at raise-gcc.c:1377 1377 return _Unwind_RaiseException (e); (gdb) s _Unwind_RaiseException (exc=0x100a086d0) at ../../../gcc-4.9.0/libgcc/unwind.inc:83 83 { (gdb) n 88 uw_init_context (&this_context); (gdb) n 83 { (gdb) n 88 uw_init_context (&this_context); (gdb) n 83 { (gdb) n 88 uw_init_context (&this_context); (gdb) n 83 { (gdb) n 89 cur_context = this_context; (gdb) n 83 { (gdb) n 88 uw_init_context (&this_context); (gdb) n Program received signal SIGABRT, Aborted. 0x00007fff904ab866 in ?? ()