Unchecked deallocation of the access to interface classwide type has corupt memory.
Valgrind output: ==8176== Invalid read of size 4 ==8176== at 0x804EF32: system__finalization_implementation__finalize_list (s-finimp.adb:360) ==8176== by 0x804EFE8: system__finalization_implementation__finalize_global_list (s-finimp.adb:327) ==8176== by 0x8049611: main (b~driver.adb:171) ==8176== Address 0x4187030 is 8 bytes inside a block of size 16 free'd ==8176== at 0x402288A: free (vg_replace_malloc.c:323) ==8176== by 0x8051787: __gnat_free (s-memory.adb:117) ==8176== by 0x8049BBB: driver__z.182 (driver.adb:9) ==8176== by 0x8049B0A: _ada_driver (driver.adb:13) ==8176== by 0x804960C: main (b~driver.adb:170) ==8176== ==8176== Invalid read of size 4 ==8176== at 0x804EF37: system__finalization_implementation__finalize_list (s-finimp.adb:361) ==8176== by 0x804EFE8: system__finalization_implementation__finalize_global_list (s-finimp.adb:327) ==8176== by 0x8049611: main (b~driver.adb:171) ==8176== Address 0x4187028 is 0 bytes inside a block of size 16 free'd ==8176== at 0x402288A: free (vg_replace_malloc.c:323) ==8176== by 0x8051787: __gnat_free (s-memory.adb:117) ==8176== by 0x8049BBB: driver__z.182 (driver.adb:9) ==8176== by 0x8049B0A: _ada_driver (driver.adb:13) ==8176== by 0x804960C: main (b~driver.adb:170) ==8176== -- Summary: Memory corruption at unchecked deallocation of the interface classwide type Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vgodunko at rostel dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35372