* dcrt0.cc (dll_crt0_1): Add another hack to REALLY make sure that cxx_malloc

is always set to the cygwin version.
This commit is contained in:
Christopher Faylor 2009-09-21 02:32:06 +00:00
parent adfbdcdb07
commit 92c4330f5b
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-09-20 Christopher Faylor <me+cygwin@cgf.cx>
* dcrt0.cc (dll_crt0_1): Add another hack to REALLY make sure that
cxx_malloc is always set to the cygwin version.
2009-09-20 Christopher Faylor <me+cygwin@cgf.cx> 2009-09-20 Christopher Faylor <me+cygwin@cgf.cx>
* external.cc (cygwin_internal): Add hack to always reset cxx_malloc to * external.cc (cygwin_internal): Add hack to always reset cxx_malloc to

View File

@ -766,6 +766,12 @@ dll_crt0_1 (void *)
sigproc_init (); sigproc_init ();
check_sanity_and_sync (user_data); check_sanity_and_sync (user_data);
/* This is a kludge to work around a version of _cygwin_common_crt0
which overwrote the cxx_malloc field with the local DLL copy.
Hilarity ensues if the DLL is not loaded like while the process
is forking. */
__cygwin_user_data.cxx_malloc = &default_cygwin_cxx_malloc;
/* Initialize malloc and then call user_shared_initialize since it relies /* Initialize malloc and then call user_shared_initialize since it relies
on a functioning malloc and it's possible that the user's program may on a functioning malloc and it's possible that the user's program may
have overridden malloc. We only know about that at this stage, have overridden malloc. We only know about that at this stage,