NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/50866: starting firefox crashes the X server
The following reply was made to PR toolchain/50866; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: christos%NetBSD.org@localhost, joerg%NetBSD.org@localhost
Subject: Re: toolchain/50866: starting firefox crashes the X server
Date: Thu, 3 Mar 2016 08:51:12 +0100
So there are (at least) two bugs involved in this. I filed PR lib/50887
about the other one (libc's _clzdi2 is broken when compiled
with gcc [at least on sparc64]), the other bug is about picking the
libc version of _clzdi2 over the libgcc* version - this is a difference
between binutils 2.23 and 2.26.
Here is a gdb session with the X server before crashing it:
(gdb) break __clzdi2
Breakpoint 1 at 0xffffffffee00e400: __clzdi2. (2 locations)
(gdb) break __clzsi2
Breakpoint 2 at 0xfffffffff6620240: file /ssd/src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzsi2.c, line 25.
(gdb) break __clz
Function "__clz" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) break __clzti2
Breakpoint 3 at 0xffffffffee00e360: __clzti2. (2 locations)
Note the single location in libc for __clzsi2, but two locations (libgcc
and libc) for the other two.
Now making it crash:
Breakpoint 1, __clzdi2 (a=33)
at /ssd/src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:23
23 {
(gdb) bt
#0 __clzdi2 (a=33)
at /ssd/src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:23
#1 0xffffffffeeca4a78 in util_logbase2 (n=<optimized out>)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_math.h:665
#2 softpipe_create_sampler_view (pipe=0xffffffffeda76000,
resource=0xffffffffeda397a0, templ=0xffffffffffffb110)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/softpipe/sp_tex_sample.c:3193
#3 0xffffffffeef01308 in aaline_create_texture (aaline=0xffffffffe7287400)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_pipe_aaline.c:429
#4 draw_install_aaline_stage (draw=0xffffffffe7388000,
pipe=pipe@entry=0xffffffffeda76000)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/draw/draw_pipe_aaline.c:1008
#5 0xffffffffeecb372c in softpipe_create_context (screen=0xfffffffff4f902c0,
priv=<optimized out>)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/softpipe/sp_context.c:298
#6 0xffffffffeea9be20 in st_api_create_context (stapi=<optimized out>,
smapi=0xfffffffff4f70530, attribs=0xffffffffffffb43c,
error=0xffffffffffffb438, shared_stctxi=0x0)
at /ssd/xsrc/external/mit/MesaLib/dist/src/mesa/state_tracker/st_manager.c:658
#7 0xffffffffeec8a578 in dri_create_context (api=<optimized out>,
visual=0xfffffffff4f71d40, cPriv=0xffffffffedb854c0,
major_version=<optimized out>, minor_version=<optimized out>,
flags=<optimized out>, notify_reset=false, error=0xffffffffffffb60c,
sharedContextPrivate=0x0)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/state_trackers/dri/dri_context.c:112
#8 0xffffffffee9c74b8 in driCreateContextAttribs (
screen=screen@entry=0xfffffffff4f70480, api=api@entry=0,
config=config@entry=0xfffffffff4f71d40, shared=shared@entry=0x0,
num_attribs=num_attribs@entry=0, attribs=attribs@entry=0x0,
error=0xffffffffffffb60c, data=0xfffffffff4f21100)
at /ssd/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/common/dri_util.c:435
#9 0xffffffffee9c758c in driCreateNewContextForAPI (data=0xfffffffff4f21100,
shared=0x0, config=0xfffffffff4f71d40, api=0, screen=0xfffffffff4f70480)
at /ssd/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/common/dri_util.c:464
#10 driCreateNewContext (screen=0xfffffffff4f70480, config=0xfffffffff4f71d40,
shared=0x0, data=0xfffffffff4f21100)
at /ssd/xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/common/dri_util.c:472
#11 0x000000000029cdb8 in __glXDRIscreenCreateContext (
baseScreen=0xfffffffff4f20660, glxConfig=0xfffffffff4f4bd00,
baseShareContext=0x0)
at /ssd/xsrc/external/mit/xorg-server/dist/glx/glxdriswrast.c:296
#12 0x00000000002a07e4 in DoCreateContext (gcId=<optimized out>,
shareList=<optimized out>, config=0xfffffffff4f4bd00,
pGlxScreen=0xfffffffff4f20660, isDirect=0 '\000', cl=0xffffffffedb8d928)
at /ssd/xsrc/external/mit/xorg-server/dist/glx/glxcmds.c:276
#13 0x00000000002a12e0 in __glXDisp_CreateContext (cl=0xffffffffedb8d928,
pc=0xfffffffff4f08038 "\233\003")
at /ssd/xsrc/external/mit/xorg-server/dist/glx/glxcmds.c:330
#14 0x000000000029d794 in __glXDispatch (client=0xffffffffedb8d800)
at /ssd/xsrc/external/mit/xorg-server/dist/glx/glxext.c:558
#15 0x0000000000161af0 in Dispatch ()
#16 0x00000000002f3f90 in main ()
And indeed, continuing leads to direct recursion:
#0 __clzdi2 (a=33)
at /ssd/src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:23
#1 0xfffffffff661fb64 in __clzdi2 (a=<optimized out>)
at /ssd/src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:27
#2 0xfffffffff661fb64 in __clzdi2 (a=<optimized out>)
at /ssd/src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:27
#3 0xfffffffff661fb64 in __clzdi2 (a=<optimized out>)
at /ssd/src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:27
#4 0xffffffffeeca4a78 in util_logbase2 (n=<optimized out>)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/u_math.h:665
#5 softpipe_create_sampler_view (pipe=0xffffffffeda76000,
resource=0xffffffffeda397a0, templ=0xffffffffffffb110)
at /ssd/xsrc/external/mit/MesaLib/dist/src/gallium/drivers/softpipe/sp_tex_sample.c:3193
(but the recursion is part of the other bug).
The question here is: what does binutils 2.26 different to causes libc's
version of _clzdi2 to be called in the above stack trace.
I can not spot anything obvious: both version of the
usr/X11R7/lib/modules/dri/*.so files have
0000000000000000 F *UND* 0000000000000000 __clzdi2@@GCC_3.4
as reference to the function and
Dynamic Section:
NEEDED libdrm.so.3
NEEDED libdrm_radeon.so.0
NEEDED libglapi.so.0
NEEDED libexpat.so.2
NEEDED libstdc++.so.7
NEEDED libm.so.0
NEEDED libgcc_s.so.1
NEEDED libc.so.12
as dependencies. Something about the symbol version? How would I dump version
details?
Martin
Home |
Main Index |
Thread Index |
Old Index