GNOME Bugzilla – Bug 141378
gstreamer crashes during initialization due to a recent change in gstcpu.c
Last modified: 2004-12-22 21:47:04 UTC
i'm using this version of GCC gcc.real (GCC) 3.3.3 (Debian 20040401) reverting this patch everything works again. http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcpu.c?r1=1.24&r2=1.25
I can't reproduce this.
Are you using any extraordinary optimization levels or otherwise odd compiler flags?
-Os -msse -mfpmath=sse before the change to that file it worked with this options
Again, I can't reproduce this.
Diego, try without -msse. I've seen weird random crashes and errors on ffmpeg-devel for people that were using that. Try the default compiler flags, at least for this specific file.
i've already try without -msse it, it keeps crashing, i'm going to try without -Os to see what happends
I can confirm this on Mandrakelinux 10.1 Cooker with gcc 3.3.2. My CFLAGS are these: gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-common -g -Wall -Werror -DGST_DISABLE_DEPRECATED -I.. -DG_LOG_DOMAIN=g_log_domain_gstreamer -DGST_MAJORMINOR=\"0.8\" -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -c gstcpu.c -fPIC -DPIC -o .libs/libgstreamer_0.8_la-gstcpu.o
Created attachment 28563 [details] [review] Patch to gstcpu.c fixing %ebx clobbering
Previous patch solves %ebx clobbering. To make a long story short, original code was pushing %ebx onto offset 0x0 in the stack in gst_cpuid_i386. However, reg[0] (the eventual destination of %eax) was going to the same location, effectively clobbering %ebx. A possible solution is to add another item to reg[], and increasing all offsets by 1, thereby leaving offset 0x0 in the stack untouched (%eax will save to 0x4($esp), etc, etc..) There may be more elegant solutions available, but this works for me... :)
The patch is wrong. The problem is that you're using -fomit-frame-pointer. Don't. If I get a good idea of how to handle the -fomit-frame-pointer case at the same time as all the others, I'll fix it. Otherwise, I'll add an autoconf check to make sure -fomit-frame-pointer is not being used.
This is fixed in CVS, will be released along with 0.8.4. http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcpu.c?r1=1.27&r2=1.28