Bug 16854 - GLSL function call at global scope causes SEGV
Summary: GLSL function call at global scope causes SEGV
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
Depends on:
Blocks: 29044
  Show dependency treegraph
Reported: 2008-07-25 16:35 UTC by Ian Romanick
Modified: 2010-08-17 08:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Offending shader code (314 bytes, text/plain)
2008-07-25 16:35 UTC, Ian Romanick

Description Ian Romanick 2008-07-25 16:35:06 UTC
Created attachment 17900 [details]
Offending shader code

The attached vertex shader causes the GLSL compiler to segfault.  Simply copy the shader to progs/demos/vstest.txt and run progs/demos/vstest.  The problem seems to be that 'mat2 foo = bar();' is at global scope (i.e., not inside a function).  I think this is valid GLSL, but, even if it isn't, it shouldn't cause the compiler to segfault.
Comment 1 Brian Paul 2008-07-29 17:06:13 UTC
segfault fixed in git/master.  Though, the initialization of the global probably isn't done correctly yet.

Comment 2 Adam Jackson 2009-08-24 12:30:44 UTC
Mass version move, cvs -> git
Comment 3 Eric Anholt 2010-08-17 08:54:52 UTC
Other than the implicit conversion, glsl2 is fine with this.

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.