* 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.
This commit is contained in:
Corinna Vinschen
2009-08-13 07:35:50 +00:00
parent 61189f19de
commit ce5eb135a2
6 changed files with 70 additions and 8 deletions

View File

@@ -87,7 +87,10 @@ __cxa_guard_release ()
}
/* These routines are made available as last-resort fallbacks
for the application. Should not be used in practice. */
for the application. Should not be used in practice; the
entries in this struct get overwritten by each DLL as it
is loaded, and libstdc++ will override the whole lot first
thing of all. */
struct per_process_cxx_malloc default_cygwin_cxx_malloc =
{