On Thu, Sep 1, 2011 at 9:41 PM, Nathan Coulson <[email protected]> wrote:
> On Thu, Sep 1, 2011 at 9:21 PM, Bruce Dubbs <[email protected]> wrote:
>> Nathan Coulson wrote:
>>> Glibc-2.28.8
>>
>> Typo?  Current is 2-14.
>>
>>> I came across the problem in a self made SDL application, with the
>>> following stacktrace
>>>
>>> #0  0x00007f307280a0a9 in do_lookup_x () from /lib/ld-linux-x86-64.so.2
>>> #13 0x00007f307171090c in SDL_Init (flags=48) at ./src/SDL.c:162
>>>
>>> and in doing some research, looks like I am not the only person who
>>> got bit by this SDL (me)
>>> rpmbuild: https://bugzilla.redhat.com/show_bug.cgi?id=682307
>>
>> Says that it is fixed in glibc-2.13.90-6 2011-03-12. I would think the
>> change is in 2.14.
>>
>>> gnucash: https://bugzilla.redhat.com/show_bug.cgi?id=682406
>> DUPLICATE of bug 682307
>>
>>> alsautils: https://bugzilla.redhat.com/show_bug.cgi?id=682415
>> DUPLICATE of bug 682307
>>
>>> warzone2100 (whatever that is):
>>> https://bugzilla.redhat.com/show_bug.cgi?id=682398
>> DUPLICATE of bug 682307
>>
>>> from the above, I am guessing it's a problem with dlsym, and probably
>>> impacts anything that may dynamically load functions.
>>
>> What version of glibc are you using?
>>
>>   -- Bruce
>
> Got the list from the duplicates,  was trying to get a sense of which
> programs it would impact.
>
> Using Glibc 2.14, latest LFS SVN as of 2 days ago.
>
> and doing a few more tests to isolate it...  In my program SDL_Init
> was almost the first thing started, but when I put it in a simple test
> file, it never segfaulted.  (Could possibly have been my fault)

I'll do more research on this, but this is the testcase I have to
reproduce it on my local system

Glibc 2.14
SDL 1.2.12
Mesa 7.11
xorg-server 1.11.0
libX11-1.4.4

cat > test.c << "EOF"
#include <SDL/SDL.h>

int main(int argc, char*argv[]) {
  fprintf(stderr, "1\n");
  SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO );
  fprintf(stderr, "2\n");
  return 0;
}
EOF

gcc test.c -o test -lSDL -lGL

Note: if I don't link to GL, it does not fail

#0  0x00007fe2e87b50a9 in do_lookup_x () from /lib/ld-linux-x86-64.so.2
(gdb) bt full
#0  0x00007fe2e87b50a9 in do_lookup_x () from /lib/ld-linux-x86-64.so.2
No symbol table info available.
#1  0x00007fe2e87b5933 in _dl_lookup_symbol_x () from /lib/ld-linux-x86-64.so.2
No symbol table info available.
#2  0x00007fe2e803bf4c in do_sym () from /lib/libc.so.6
No symbol table info available.
#3  0x00007fe2e7aae014 in dlsym_doit () from /lib/libdl.so.2
No symbol table info available.
#4  0x00007fe2e87b9b26 in _dl_catch_error () from /lib/ld-linux-x86-64.so.2
No symbol table info available.
#5  0x00007fe2e7aae49f in _dlerror_run () from /lib/libdl.so.2
No symbol table info available.
#6  0x00007fe2e7aae06a in dlsym () from /lib/libdl.so.2
No symbol table info available.
#7  0x00007fe2e854af6f in SDL_LoadFunction (handle=0x7fe2e89ba4d8,
name=0x7fe2e857125e "XAllocClassHint") at
./src/loadso/dlopen/SDL_sysloadso.c:46
        symbol = <optimized out>
#8  0x00007fe2e854cf55 in X11_GetSym (fnname=0x7fe2e857125e
"XAllocClassHint", rc=0x7fe2e877fc98, fn=0x7fe2e8788628) at
./src/video/x11/SDL_x11dyn.c:70
        i = <optimized out>
#9  0x00007fe2e854de64 in SDL_X11_LoadSymbols () at
./src/video/x11/SDL_x11sym.h:24
        thismod = 0x7fe2e877fc98
        rc = 1
#10 0x00007fe2e855497a in X11_CreateDevice (devindex=<optimized out>)
at ./src/video/x11/SDL_x11video.c:105
        device = 0x0
#11 0x00007fe2e854625c in SDL_VideoInit (driver_name=<optimized out>,
flags=0) at ./src/video/SDL_video.c:194
        video = 0x0
        i = <optimized out>
        vformat = {palette = 0x7fffec60cdd0, BitsPerPixel = 5 '\005',
BytesPerPixel = 243 'ó', Rloss = 123 '{', Gloss = 232 'è', Bloss = 226
'â',
          Aloss = 127 '\177', Rshift = 0 '\000', Gshift = 0 '\000',
Bshift = 0 '\000', Ashift = 0 '\000', Rmask = 0, Gmask = 68, Bmask =
0, Amask = 7, colorkey = 0,
          alpha = 0 '\000'}
        video_flags = <optimized out>
#12 0x00007fe2e851c89c in SDL_InitSubSystem (flags=48) at ./src/SDL.c:70
No locals.
#13 0x00007fe2e851c90c in SDL_Init (flags=48) at ./src/SDL.c:162
No locals.
#14 0x0000000000400681 in main ()
No symbol table info available.


> --
> Nathan Coulson (conathan)
> ------
> Location: British Columbia, Canada
> Timezone: PST (-8)
> Webpage: http://www.nathancoulson.com
>



-- 
Nathan Coulson (conathan)
------
Location: British Columbia, Canada
Timezone: PST (-8)
Webpage: http://www.nathancoulson.com
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to