View Single Post
Old 05-23-09, 12:06 PM   #1
ldesnogu
Registered User
 
Join Date: Oct 2008
Posts: 12
Default Bug report for 185.18.10: probably broken 32-bit libGL.so

Hi,

the following program demonstrates an issues I found while trying to run Wine on my Fedora 11 preview x86_64 machine:

Code:
#include <stdio.h>
#include <dlfcn.h>

#define RTLD_FIRST 0

int main(void)
{
#ifdef __LP64__
  const char *filename = "/usr/lib64/libGL.so.1";
#else
  const char *filename = "/usr/lib/libGL.so.1";
#endif
  void *ret;
  int flag = 2;

  ret = dlopen( filename, flag | RTLD_FIRST );
  if (ret == NULL)
    printf("err %s\n", dlerror());
  else
    printf("success\n");
  return 0;
}
It results in this:
Code:
$ gcc -m64 -Wall -o testdl testdl.c -ldl
$ ./testdl 
success
$ gcc -m32 -Wall -o testdl testdl.c -ldl
$ ./testdl 
Segmentation fault
Backtrace:
Code:
$ gdb  ./testdl
(gdb) run
warning: .dynamic section for "/lib/libm.so.6" is not at the expected address
warning: difference appears to be caused by prelink, adjusting expectations

Program received signal SIGSEGV, Segmentation fault.
0x00c82307 in calloc () from /lib/libc.so.6
(gdb) where
#0  0x00c82307 in calloc () from /lib/libc.so.6
#1  0x01468889 in ?? () from /usr/lib/libGLcore.so.1
#2  0x00000001 in ?? ()
#3  0x00000034 in ?? ()
#4  0x0000000a in ?? ()
#5  0x00000002 in ?? ()
#6  0x0804bb10 in ?? ()
#7  0x0000029a in ?? ()
#8  0x0000564d in ?? ()
#9  0x00a652a2 in ?? () from /usr/lib/libGL.so.1
#10 0x0000029a in ?? ()
#11 0x0000564d in ?? ()
#12 0x01468800 in ?? () from /usr/lib/libGLcore.so.1
#13 0x0146882c in ?? () from /usr/lib/libGLcore.so.1
#14 0x0000564d in ?? ()
#15 0x01468800 in ?? () from /usr/lib/libGLcore.so.1
#16 0xffffd3e4 in ?? ()
#17 0x00a65861 in _init () from /usr/lib/libGL.so.1
#18 0x0000564d in ?? ()
#19 0x00000001 in ?? ()
#20 0x00000000 in ?? ()
If more information or further testing are needed, I'll be happy to help.

EDIT : One additional information: I compiled a random OpenGL program (RedBook aargb.c) with gcc -m32 and no explicit dlopen (that is libGL is loaded by ld.so) and unsurprisingly the problem is still there.

Can anyone reproduce the problem on some other x86_64 Linux distro?
Attached Files
File Type: gz nvidia-bug-report.log.gz (33.5 KB, 72 views)
__________________
Laurent
ldesnogu is offline   Reply With Quote