diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-09-18 09:10:47 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-09-18 09:10:47 +0000 |
commit | 40e1870db5a695a32b3cda7fe5d7f8781a2f4839 (patch) | |
tree | 6f6f0010ee4edbb56ef8f36454d27cb0cbba0bdb | |
parent | 0ab4837bd5a829617a75909bcbc5e7b93a1bd7d9 (diff) |
force compilers not to optimize/inline extend_stack_for_dll_alloca
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13376 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | loader/pe_image.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/loader/pe_image.c b/loader/pe_image.c index 9ac40ebeb2..117217127f 100644 --- a/loader/pe_image.c +++ b/loader/pe_image.c @@ -895,12 +895,14 @@ void PE_UnloadLibrary(WINE_MODREF *wm) * memory below %esp; it segfaults. * The extend_stack_for_dll_alloca() routine just preallocates a big chunk * of memory on the stack, for use by the DLLs alloca routine. + * Added the noinline attribute as e.g. gcc 3.2.2 inlines this function + * in a way that breaks it. */ -static void extend_stack_for_dll_alloca(void) +static void __attribute__((noinline)) extend_stack_for_dll_alloca(void) { #ifndef __FreeBSD__ - void* mem=alloca(0x20000); - *(int*)mem=0x1234; + volatile int* mem=alloca(0x20000); + *mem=0x1234; #endif } |