[Bug 76198] New: Segfault on void-typed last sequence element

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 15 04:13:58 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=76198

          Priority: medium
            Bug ID: 76198
          Assignee: idr at freedesktop.org
           Summary: Segfault on void-typed last sequence element
        QA Contact: intel-3d-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: anthony at adsorbtion.org
          Hardware: Other
            Status: NEW
           Version: git
         Component: glsl-compiler
           Product: Mesa

Created attachment 95847
  --> https://bugs.freedesktop.org/attachment.cgi?id=95847&action=edit
0001-glsl-Fix-segfault-on-void-rightmost-sequence-express.patch

I have some autogenerated geometry shader with sequence like 
((dbgIter0 == 0 && (dbgResult = float(1.0), true)), EmitVertex())
It is wrong code generation on my side, but I found that glsl-compiler
segfaults on this line.
Problem in ast_to_hir.cpp (:1737 for current git) in ast_sequence expression
type processing. Result of last operand is NULL due to void return type of
EmitVertex.
>From the GLSL spec (p.107 of pdf of 4.40) sequence must return type and value
of rightmost expression, so void-typed expressions must emit some error. I've
attached patch with fix. I'm not sure about the way I chose, maybe compiler
must do something different in that case.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20140315/b6c0c87c/attachment.html>


More information about the intel-3d-bugs mailing list