Summary: | [GLSL bisected] comparing unsized array gets segfault | ||
---|---|---|---|
Product: | Mesa | Reporter: | Gordon Jin <gordon.jin> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | medium | ||
Version: | 7.9 | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
new test case for piglit
new test case for piglit |
Description
Gordon Jin
2010-12-01 19:25:14 UTC
the test case also shows another issue: the driver considers "b[i] = i" (while b is unsized array) illegal: 0:7(5): error: unsized array index must be constant. I don't see this defined in spec. I can file a separate bug for this if you want. (In reply to comment #1) > the test case also shows another issue: the driver considers "b[i] = i" (while > b is unsized array) illegal: > 0:7(5): error: unsized array index must be constant. > > I don't see this defined in spec. > > I can file a separate bug for this if you want. That is illegal: Section 4.1.9 (page 21 of the spec, page 27 of the PDF) says: "If an array is indexed with an expression that is not an integral constant expression or passed as an argument to a function, then its size must be declared before any such use." I have added several piglit tests, array-22.vert and array-compare-0[1234].vert, to reproduce these issues. (In reply to comment #2) > (In reply to comment #1) > > the test case also shows another issue: the driver considers "b[i] = i" (while > > b is unsized array) illegal: > > 0:7(5): error: unsized array index must be constant. > > > > I don't see this defined in spec. > > > > I can file a separate bug for this if you want. > > That is illegal: > > Section 4.1.9 (page 21 of the spec, page 27 of the PDF) says: > > "If an array is indexed with an expression that is not an integral constant > expression or passed as an argument to a function, then its size must be > declared before any such use." Ian, you are right. I'm attached an updated version. Created attachment 40817 [details]
new test case for piglit
(In reply to comment #3) > I have added several piglit tests, array-22.vert and > array-compare-0[1234].vert, to reproduce these issues. I don't see that in piglit. (In reply to comment #6) > (In reply to comment #3) > > I have added several piglit tests, array-22.vert and > > array-compare-0[1234].vert, to reproduce these issues. > > I don't see that in piglit. I forgot to push my piglit changes. Sorry about that. These tests should be fixed by: commit 6d36be508ff0765beb6cf6bb95a323ff01e458dd Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Dec 2 12:17:36 2010 -0800 glsl: Ensure that equality comparisons don't return a NULL IR tree This fixes bugzilla #32035 and piglit test case array-compare-01 and array-compare-02. NOTE: This is a candidate for the 7.9 branch. catch a typo in array-22.vert: s/b/a in "These assignments will implicitly size b." not marking 7.9 bugs as P1 It looks like this bug was left open until the fix was cherry-picked to 7.9. Ian's commit listed here is now on the 7.9 and 7.10 branches. Does it fix the issue? If so, this can be closed. agree this can be fixed. verified on master and 7.10. |
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.