This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/38832] Main program runs fine but hangs on exit when linked with Ada shared lib
- From: "oliver dot kellogg at eads dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2009 18:42:34 -0000
- Subject: [Bug ada/38832] Main program runs fine but hangs on exit when linked with Ada shared lib
- References: <bug-38832-13657@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from oliver dot kellogg at eads dot com 2009-02-27 18:42 -------
Expanding on comment #2, there seems to be an endless loop around
s-fileio.adb:377ff.
376 Fptr1 := Open_Files;
377 while Fptr1 /= null loop
378 Fptr2 := Fptr1.Next;
379 Close (Fptr1'Access);
380 Fptr1 := Fptr2;
381 end loop;
Setting a breakpoint at 376,
Breakpoint 1, system.file_io.finalize (v=(prev => 0x0, next => 0x8078b60)) at
s-fileio.adb:376
376 Fptr1 := Open_Files;
(gdb) n
377 while Fptr1 /= null loop
(gdb) p Fptr1
$28 = (access system.file_control_block.afcb) 0x8078a60
(gdb) p Fptr1.next
$29 = (access system.file_control_block.afcb) 0x8078a00
(gdb) p Fptr1.next.next
$30 = (access system.file_control_block.afcb) 0x80789a0
(gdb) p Fptr1.next.next.next
$31 = (access system.file_control_block.afcb) 0x8078a60
(gdb) p Fptr1.next.next.next.next
$32 = (access system.file_control_block.afcb) 0x8078a00
(gdb) p Fptr1.next.next.next.next.next
$33 = (access system.file_control_block.afcb) 0x80789a0
.. and so on, indefinitely, where
(gdb) p Fptr1.name.all
$34 = "*stderr["00"]"
(gdb) p Fptr1.next.name.all
$35 = "*stdout["00"]"
(gdb) p Fptr1.next.next.name.all
$36 = "*stdin["00"]"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38832