Summary: | WebGL snake demo crash in loop_analysis.cpp:506: bool is_loop_terminator(ir_if*): assertion „inst != __null“ failed. | ||
---|---|---|---|
Product: | Mesa | Reporter: | Pavel Ondračka <pavel.ondracka> |
Component: | glsl-compiler | Assignee: | Paul Berry <stereotype441> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | ra.vitillo |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://oos.moxiecode.com/js_webgl/snake/ | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 67224 |
Description
Pavel Ondračka
2013-05-07 17:57:15 UTC
*** Bug 64796 has been marked as a duplicate of this bug. *** Yup, it's a compiler bug. The assertion that's failing is bogus. It assumes that previous optimization stages have removed dead code of the form: if (...) { } else { } But that's not always guaranteed--it's possible that dead code of this form occurred as a result of previous optimization stages, in which case the dead code won't get eliminated until the next time through the optimization loop. I'll have a fix out to the mesa-dev list shortly. Patch sent to mesa-dev list for review: http://lists.freedesktop.org/archives/mesa-dev/2013-July/042264.html Fixed by commit a5eecb246d66fd8f27eca3c4f6f83bf2641b9403 Author: Paul Berry <stereotype441@gmail.com> Date: Wed Jul 24 08:04:44 2013 -0700 glsl: Handle empty if statement encountered during loop analysis. The is_loop_terminator() function was asserting that the following kind of if statement could never occur: if (...) { } else { } (presumably based on the assumption that such an if statement would be eliminated by previous optimization stages). But that isn't the case--it's possible that previous optimization stages might simplify more complex code down to this empty if statement, in which case it won't be eliminated until the next time through the optimization loop. So is_loop_terminator() needs to handle it. Fortunately it's easy to handle--it's not a loop terminator because it does nothing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64330 CC: mesa-stable@lists.freedesktop.org Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> |
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.