Bug 85199 (woskimi@yahoo.de) - glxinfo segfaults when mesa was compiled with clang & libc++
Summary: glxinfo segfaults when mesa was compiled with clang & libc++
Status: RESOLVED FIXED
Alias: woskimi@yahoo.de
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Michi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-19 14:54 UTC by Michi
Modified: 2015-06-08 22:32 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
strace glxinfo (47.24 KB, text/plain)
2014-10-19 14:54 UTC, Michi
Details
gdb glxinfo (5.17 KB, text/plain)
2014-10-20 07:02 UTC, Michi
Details
glxinfo: fix segfault when core profile is not available (2.96 KB, patch)
2015-05-19 07:37 UTC, Julien Isorce
Details | Splinter Review

Description Michi 2014-10-19 14:54:33 UTC
Created attachment 108064 [details]
strace glxinfo

1)
$ glxinfo
name of display: :0
Segmentation fault

2)
$ glxinfo -i
name of display: :0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  40
  Current serial number in output stream:  43

I don't know anything about what happens, but I know that this crash happens only when mesa was compiled with clang (from git) against libc++.
Building clang and mesa against libstdc++ with otherwise the same build config does not produce the crash.

I originally stumbled upon this issue because kwin was always crashing with OpenGL enabled.

thx for your time.
Michi
Comment 1 Michel Dänzer 2014-10-20 02:04:22 UTC
(In reply to Michi from comment #0)
> $ glxinfo
> name of display: :0
> Segmentation fault

Please run glxinfo in gdb, then after the segmentation fault, run 'bt full' on the gdb prompt and attach the output from that here.
Comment 2 Michi 2014-10-20 07:02:31 UTC
Created attachment 108084 [details]
gdb glxinfo
Comment 3 Michel Dänzer 2014-10-20 07:28:28 UTC
#0  0x00007ffff724da74 in ?? () from /usr/lib64/libexpat.so.1
#1  0x00000000004040ae in build_core_profile_extension_list (extfuncs=extfuncs@entry=0x7fffffffd710) at glinfo_common.c:291

Weird, looks like glXGetProcAddressARB((GLubyte *) "glGetStringi") returns a pointer to somewhere in libexpat...
Comment 4 Julien Isorce 2015-05-19 07:37:51 UTC
Created attachment 115890 [details] [review]
glxinfo: fix segfault when core profile is not available
Comment 5 Brian Paul 2015-05-20 00:47:59 UTC
Thanks for fixing that.  Looks good to me.  I've got some other glxinfo/wglinfo changes queued up so I'll push this with those.
Comment 6 Julien Isorce 2015-06-08 22:32:07 UTC
No problem :) It seems you pushed it here http://cgit.freedesktop.org/mesa/demos/commit/?id=fca824431608101298ff0735db4c09954dcf64ab so I am marking the bug as fixed. Please re-open if something is still missing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.