Reinhard Tartler wrote: [snip] > >> (gdb) run > >> Starting program: /usr/bin/ffmpeg > >> [Thread debugging using libthread_db enabled] > >> [New Thread 0x2aad0f40 (LWP 26315)] > >> > >> Program received signal SIGSEGV, Segmentation fault. > >> [Switching to Thread 0x2aad0f40 (LWP 26315)] > >> 0x2abe11e8 in avcodec_register_all () at > >> /usr/src/ffmpeg/ffmpeg-debian-0.svn20080206/libavcodec/allcodecs.c:58 > >> warning: Source file is more recent than executable. > >> 58 if (inited) > >> > >> fix this bug: > >> --- ffmpeg-debian-0.svn20080206.orig/libavcodec/allcodecs.c > >> +++ ffmpeg-debian-0.svn20080206/libavcodec/allcodecs.c > >> @@ -53,7 +53,7 @@ > >> */ > >> void avcodec_register_all(void) > >> { > >> - static int inited; > >> + static int inited=0;
As already mentioned, this shouldn't change the program logic. It moves the variable from .bss to .data, though. > >> > >> if (inited) > >> return; > >> > > That's, uhm, interesting. I've done some tests with the following > program: > > #include<stdio.h> > > void print() { > static int s; > > printf("s: %d\n", s); > } > > int main () { > print(); > } > > I've compiled it on morales.debian.org, a mipsel porter machine with > CFLAGS set to -O0, -O2, O3 and -Os, all returned 0. AFAIR, static > variables are always initialized to 0, but I don't have the C standard > at hand right now. > > ?????????, TBH, this looks rather like a miscompilation issue here. Is > there something special with gcc on mispel? Perhaps can the mips porter > list help here? I figure the .bss isn't properly zeroed at startup of the program. Since the same Lenny binaries work fine on other mipsel systems I figure this is a problem connected to the Longsoon kernel. Thiemo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]