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: 4 Mar 2009 17:45:10 -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 #4 from oliver dot kellogg at eads dot com 2009-03-04 17:45 -------
Created an attachment (id=17394)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17394&action=view)
rough fix (patch to s-finimp.adb)
Further investigation shows that Ada.Text_Io.Elab_{Spec,Body} is called by both
adasharedlibinit (shared library) and adainit (main program.)
The patch makes sure that multiple calls to
System.Finalization_Implementation.Attach_To_Final_List with the same Obj
parameter insert the Obj only once in the Global_Final_List.
It may very well not be the Right Way (TM) to fix the problem, though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38832