Bug 25934 - Segfaults while parsing a shader shown to work on other platforms
Summary: Segfaults while parsing a shader shown to work on other platforms
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-06 22:37 UTC by Lucas Paul
Modified: 2010-04-11 03:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
A log of the gdb session with backtrace and shader source (153.43 KB, text/plain)
2010-01-06 22:37 UTC, Lucas Paul
Details
The offending Cg source, extracted from gdb output and with some escape sequences converted (49.34 KB, application/octet-stream)
2010-01-06 23:41 UTC, Lucas Paul
Details
Problematic ARB source code (10.86 KB, text/plain)
2010-01-06 23:54 UTC, Frank Richter
Details
Cg source (49.34 KB, text/plain)
2010-01-06 23:55 UTC, Frank Richter
Details

Description Lucas Paul 2010-01-06 22:37:42 UTC
Created attachment 32489 [details]
A log of the gdb session with backtrace and shader source

After rebuilding Mesa (with debugging symbols) from the git master branch (at revision 6f498a7eff26dc055c0a1f75ce3102aa4a1a0141 ), I am unable to run a game that utilizes 3d accel and shaders that (mostly) worked previously.

This particular issue did not appear to affect me in my previous build (which was also from git master branch built around 2009-12-24 or so, I believe).

I am running Gentoo ~amd64.  My graphics card is a Radeon X850.

The bug manifests with the following versions of software:

libdrm commit 5dbc1b333b85695735dc5b484372758b9979b693
mesa commit 6f498a7eff26dc055c0a1f75ce3102aa4a1a0141
xf86-video-ati commit 48aa5064aff4b9adf768e480df2312d4375e9c40
nvidia-cg-toolkit version 2.2.0010, build date Sep 29 2009 16:29:47.
CrystalSpace Revision: 33500
Planeshift Revision: 5164

I have attached a gdb session which includes a backtrace and (I believe) the complete source of the shader that causes mesa to hiccup, and the full command arguments that were passed to cgc.  I am willing to provide further information if required.

Note that this shader does not seem to cause problems for other players of this game on other platforms, but that this does not necessarily mean it is not, itself, buggy or problematic.
Comment 1 Lucas Paul 2010-01-06 23:41:04 UTC
Created attachment 32492 [details]
The offending Cg source, extracted from gdb output and with some escape sequences converted

It was suggested to me to make the shader's source a bit more readable/accessible, so here it is with \n, \t, and \\ converted into newlines, tabs, and \, repsectively.
Comment 2 Frank Richter 2010-01-06 23:54:19 UTC
Created attachment 32494 [details]
Problematic ARB source code
Comment 3 Frank Richter 2010-01-06 23:55:45 UTC
Created attachment 32495 [details]
Cg source

Same data as attachment 32492 [details], but with fixed MIME type
Comment 4 Brian Paul 2010-01-07 08:20:27 UTC
I can't reproduce this.  I forced the parser to call the yyerror() function where your gdb log indicated.  I don't get a segfault in vfprintf() or strlen().

Could you try recompiling Mesa for debug (-g) and retesting?
Comment 5 Lucas Paul 2010-01-08 11:23:12 UTC
Brian, since I've been using Gentoo's portage system to build Mesa, I'm not sure how to give it specific switches, like -g, for compiling.  I was under the impression that I was building Mesa with separate debugging information split off in its own file (Portage's splitdebug feature and the debug USE flag), so I'm also not entirely sure what the key difference you're after is, either.  How do you suggest I proceed?
Comment 6 Lucas Paul 2010-01-13 20:49:41 UTC
After recompiling (once with Portage's nostrip feature, then again with splitdebug) the latest code, I'm no longer able to reproduce the issue either.  I guess the bug should be closed, since nobody seemed sure what was causing it in the first place.
Comment 7 Corbin Simpson 2010-04-11 03:24:02 UTC
Closing.


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.