Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0RC1

Request #14143 Remove defaut libarary startup/shutdown funcions from generated shared librarie
Submitted: 2008-06-15 13:05 UTC
From: hholzgra Assigned:
Status: Open Package: CodeGen_MySQL (version CVS)
PHP Version: Irrelevant OS: Linux, all?
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 38 - 2 = ?

 
 [2008-06-15 13:05 UTC] hholzgra (Hartmut Holzgraefe)
Description: ------------ See also http://bugs.mysql.com/bug.php?id=37347 gcc by default adds library init and shutdown functions _init() and _fini() to shared libraries it produces which are called by dlopen() and dlclose() replacing a UDF shared library and then dropping the last registered function from it will usually cause the server to crash in the dlclose() call as it swaps in a so far unused library page that is supposed to hold _fini() which is now already at some other place in the library file, and so invalid code is called gcc can be told to not include these init/deinit functions with the -nostartfiles option in the linker stage, some extra magic is needed to make libtool accept the option as it doesn't seem to have direct support for this problem though is that the required extra LDFLAGS in Makefile.am are gcc specific and likely to break builds with other compilers ...

Comments