[gst-devel] 0.4.2 still crashes on Mandrake 9.0

David Schleef ds at schleef.org
Mon Nov 4 15:40:07 CET 2002


On Mon, Nov 04, 2002 at 10:41:37AM +0100, Thomas Vander Stichele wrote:
> Hi,
> 
> > the compiler flags include -O3, that are the default Mandrake flags.
> > There were no problems yet with gcc 3.2 caused by optimization that
> > I'm aware of. The complete flags:
> > -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce
> 
> Ok, guess if one of us has a lot of time on our hands we should start 
> experimenting with opt flags because we are very sure some of them are 
> breaking the build.  I don't know if it's an error on our part (it might) 
> or if it's because we do some funky thread and stack manipulation.


Most interesting is probably that -O3 turns on small function
inlining.  I.e., the compiler inlines functions whether or not
you specify the "inline" storage specifier.

This is particularly annoying because it breaks (ok, stretches)
the C runtime ABI in a couple subtle ways.  Normally, inside
a function, you can trust that you can freely modify caller-saved
registers, typically in inline asm code.  When the function gets
inlined, these registers aren't saved automatically.  Partly,
this is a problem with not specifying the correct clobbered
registers in the asm arguments.  This was actually a problem for
a time on PowerPC, until I un-inlined a function.

Another problem is with shared library linking.  Imagine a
library with the functions func1() and func2(), where func2()
calls func1().  In the normal case, func2() calls func1()
through a stub, which means that an application can override
func1() by defining a new func1().  If func1() gets inlined,
then the stub is not used, and the application can't override.
I doubt this is happening.



dave...





More information about the gstreamer-devel mailing list