Package: libgl1-mesa-glx Version: 7.0.3~rc2-1 Severity: normal On amd64, the attached C program segfaults in glGetString() in /usr/lib/libGL.so.1, but on i386 it simply prints "(nil) 0.000000". This causes #439973 - boson segfaults before startup on amd64. ------------------------------------------------------------------ pabs@chianamo:~/tmp$ gcc -o foo foo.c -lGL pabs@chianamo:~/tmp$ gcc -o foo foo.c -lGL pabs@chianamo:~/tmp$ ./foo (nil) 0.000000 pabs@chianamo:~/tmp$ dpkg-architecture DEB_BUILD_ARCH=i386 DEB_BUILD_ARCH_OS=linux DEB_BUILD_ARCH_CPU=i386 DEB_BUILD_GNU_CPU=i486 DEB_BUILD_GNU_SYSTEM=linux-gnu DEB_BUILD_GNU_TYPE=i486-linux-gnu DEB_HOST_ARCH=i386 DEB_HOST_ARCH_OS=linux DEB_HOST_ARCH_CPU=i386 DEB_HOST_GNU_CPU=i486 DEB_HOST_GNU_SYSTEM=linux-gnu DEB_HOST_GNU_TYPE=i486-linux-gnu ------------------------------------------------------------------ (sid_amd64)pabs@pergolesi:~$ dpkg -s libgl1-mesa-glx | grep Version Version: 7.0.3~rc2-1 (sid_amd64)pabs@pergolesi:~$ gcc -o foo foo.c -lGL -g (sid_amd64)pabs@pergolesi:~$ ./foo Segmentation fault (sid_amd64)pabs@pergolesi:~$ gdb foo GNU gdb 6.7.1-debian Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 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 "x86_64-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) r Starting program: /home/pabs/foo [Thread debugging using libthread_db enabled] [New Thread 0x2ac40d813570 (LWP 447)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2ac40d813570 (LWP 447)] 0x00002ac40c1b79f7 in glGetString () from /usr/lib/libGL.so.1 (gdb) bt full #0 0x00002ac40c1b79f7 in glGetString () from /usr/lib/libGL.so.1 No symbol table info available. #1 0x0000000000400611 in main (argc=1, argv=0x7fff9eb63408) at foo.c:8 extensions = (const GLubyte *) 0x0 ------------------------------------------------------------------ -- bye, pabs http://wiki.debian.org/PaulWise
#include <GL/gl.h> #include <stdio.h> int main (int argc, char **argv) { const GLubyte* extensions = glGetString(GL_EXTENSIONS); printf("%p %f\n",extensions); return 0; }
Attachment:
signature.asc
Description: This is a digitally signed message part