[MPlayer-dev-eng] [PATCH] compilers "optimizing" pe_image too much

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Sep 16 21:58:52 CEST 2004


Hi,

> e.g. gcc 3.2.2 inlines extend_stack_for_dll_alloca which breaks the code 
> because of the alloca (which causes occasional segfaults in the dlls). 
> Although this is clearly a compiler bug, I suggest the attached patch 
> (actually the noinline attribute). I'm usually against working around 
> other projects' bugs, but this one is hard to find and debug...
> In addition I suggest declaring the mem variable volatile to indicate to 
> the compiler not to optimize this away (although it seems it isn't 
> exactly specified what volatile is supposed to do...).

It seems applying this could save us quite a few hard to debug 
bugreports, so I will (with a bad feeling) apply tomorrow if you don't 
speak up.
Could someone test compilation on gcc 2.95 and other compilers? I tend 
to put those attributes always at the wrong place...

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list