[PATCH] Fix dlopen vs cxx malloc bug.
Wed Aug 12 21:19:00 GMT 2009
Here's the patch for the dlopen problem. I've added perhaps more commenting
than is strictly necessary but this is hairy stuff and we want it to be
comprehensible in the future. (I've also spent some time writing how-*
documentation and that'll follow shortly.)
* cxx.cc (default_cygwin_cxx_malloc): Enhance commenting.
* dll_init.cc (dll_dllcrt0_1): Likewise.
* dlfcn.cc (dlopen): Prevent dlopen()'d DLL from installing any
cxx malloc overrides.
* include/cygwin/cygwin_dll.h (__dynamically_loaded): New variable.
* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Check it and only
install cxx malloc overrides when statically loaded. Extend comments.
Tested against a big chunk of the g++ testsuite, and specifically the
malloc-related tests that verify function replacement, and against old testcases
and the dlopen testcase. Ok?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7512 bytes
Desc: not available
More information about the Cygwin-patches