#407225 gl-117: Segmentation fault in amd64

Package:
gl-117
Source:
gl-117
Description:
action flight simulator
Submitter:
Maximiliano Curia
Date:
2010-08-08 08:24:03 UTC
Severity:
important
#407225#5
Date:
2007-01-17 00:12:24 UTC
From:
To:
Running gl-117 in amd64 causes a segmentation fault, I'm not really sure if
the problem is architecture dependant or video card dependant. Just in case, my
video card is an ATI 9200, and I'm using the xorg "ati" driver.

The program dies calling gluBuild2DMipmaps (line 159 of gl.cpp), with what
appears to be a valid call, so the bug may be in libglu1-mesa. Trying to dig a
little deeper I've found that the segmentation fault is caused by a call to
strtod with a null parameter.

The file in question is src/glu/sgi/libutil/mipmap.c from the mesa source
package, the problematic function is closesFit at line 3397.

The null parameter is returned by a gl function glGetString, of which I could
not find the definition. I'm not sure, but maybe this function is implemented
in the dri api or something like that.

Anyway, it would be a good idea to have a check to prevent the libc from
segfaulting, in the strtod function.

#407225#10
Date:
2010-08-08 07:09:59 UTC
From:
To:
I'm getting the same issue on amd64 with nvidia binary driver.

ii  gl-117                           1.3.2-2.1                        An action flight simulator


~> gdb gl-117
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/games/gl-117...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/games/gl-117
[Thread debugging using libthread_db enabled]
Info: Found gl-117 data directory /usr/share/games/gl-117
Info: Startup /usr/games/gl-117, V1.3 ...
Info: Loading /home/dhardy/.gl-117/conf
Info: Saving /home/dhardy/.gl-117/conf
Info: Loading /home/dhardy/.gl-117/conf.interface
Info: Saving /home/dhardy/.gl-117/conf.interface
Info: Using SDL and GLUT
Info: Using SDL_mixer
[New Thread 0x7ffff0bb2710 (LWP 3955)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff673d514 in *__GI_____strtod_l_internal (nptr=<value optimized out>, endptr=<value optimized out>, group=<value optimized out>,
    loc=0x7ffff6a5e580) at strtod_l.c:530
530     strtod_l.c: No such file or directory.
        in strtod_l.c
(gdb) bt
#0  0x00007ffff673d514 in *__GI_____strtod_l_internal (nptr=<value optimized out>, endptr=<value optimized out>, group=<value optimized out>,
    loc=0x7ffff6a5e580) at strtod_l.c:530
#1  0x00007ffff7980039 in ?? () from /usr/lib/libGLU.so.1
#2  0x00007ffff7987eb7 in gluBuild2DMipmaps () from /usr/lib/libGLU.so.1
#3  0x000000000041bce7 in ?? ()
#4  0x000000000040ffff in ?? ()
#5  0x000000000041a921 in ?? ()
#6  0x00007ffff6721c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>,
    init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffe3c8) at libc-start.c:228
#7  0x0000000000404149 in ?? ()
#8  0x00007fffffffe3c8 in ?? ()
#9  0x000000000000001c in ?? ()
#10 0x0000000000000001 in ?? ()
#11 0x00007fffffffe671 in ?? ()
#12 0x0000000000000000 in ?? ()
(gdb)