https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64478
Bug ID: 64478 Summary: Ada Exception handlers call signal-unsafe malloc/free Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: bernd.edlinger at hotmail dot de for instance c52104x: gdb ./c52104x b s-memory.adb:92 r Starting program: /home/ed/gnu/gcc-test/c52104x ,.,. C52104X ACATS 2.5 15-01-03 04:40:03 ---- C52104X CHECK THAT IN ARRAY ASSIGNMENTS AND IN SLICE ASSIGNMENTS, THE LENGTHS MUST MATCH; ALSO CHECK WHETHER CONSTRAINT_ERROR OR STORAGE_ERROR ARE RAISED FOR LARGE ARRAYS. - C52104X NO CONSTRAINT_ERROR FOR TYPE WITH 'LENGTH = INTEGER'LAST + 3. Program received signal SIGSEGV, Segmentation fault. c52104x () at c52104x.adb:113 113 (IDENT_INT(-2)..IDENT_INT( INTEGER'LAST)); (gdb) c Continuing. Breakpoint 1, <__gnat_malloc> (size=size@entry=704) at s-memory.adb:92 92 Result := c_malloc (System.CRTL.size_t (Actual_Size)); (gdb) bt #0 <__gnat_malloc> (size=size@entry=704) at s-memory.adb:92 #1 0x000000000041ab30 in system.exceptions.machine.new_occurrence () at s-excmac.ads:183 #2 0x0000000000407603 in ada.exceptions.exception_propagation.allocate_occurrence () at a-exexpr.adb:188 #3 0x0000000000408475 in ada.exceptions.create_occurrence_from_signal_handler (e=0x633b60 <storage_error>, m=(system.address) 0x426710) at a-except.adb:1058 #4 0x00000000004084c2 in ada.exceptions.raise_from_signal_handler (e=<optimized out>, m=<optimized out>) at a-except.adb:1093 #5 <signal handler called> #6 c52104x () at c52104x.adb:113 (gdb)