Bug#498647: program that links against libavcodec and does nothing segfaults on mips

peter green plugwash at p10link.net
Thu Sep 11 19:31:47 UTC 2008

package: libavcodec-dev
severity: serious
justification: probable cause of 

donothing.c contains the following code (the segfault also happens 
without the printf statement I just added it to test if it happened 
before or after main ran)

#include <stdio.h>
int main() {
  printf("doing nothing\n");
  return 0;

debian-mips:~# gcc donothing.c -o donothing
debian-mips:~# ./donothing
doing nothing
debian-mips:~# gcc donothing.c -o donothing -lavcodec
debian-mips:~# ./donothing
doing nothing
Segmentation fault
debian-mips:~# gdb ./donothing
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mips-linux-gnu"...
(gdb) run
Starting program: /root/donothing
[Thread debugging using libthread_db enabled]
doing nothing
[New Thread 0x2b460210 (LWP 8890)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b460210 (LWP 8890)]
0x2ab9b26c in do_free ()
    at /build/buildd/ffmpeg-debian-0.svn20080206/libavcodec/utils.c:108
108     /build/buildd/ffmpeg-debian-0.svn20080206/libavcodec/utils.c: No 
such file or directory.
        in /build/buildd/ffmpeg-debian-0.svn20080206/libavcodec/utils.c
(gdb) bt
#0  0x2ab9b26c in do_free ()
    at /build/buildd/ffmpeg-debian-0.svn20080206/libavcodec/utils.c:108
#1  0x2aaeb104 in _ftext () from /usr/lib/libavcodec.so.51
#2  0x2ae1cf80 in _fini () from /usr/lib/libavcodec.so.51
#3  0x2aab8c40 in _dl_fini () from /lib/ld.so.1
#4  0x2aff62e0 in exit () from /lib/libc.so.6
#5  0x2afd8894 in __libc_start_main () from /lib/libc.so.6
#6  0x00400718 in _ftext ()

More information about the pkg-multimedia-maintainers mailing list