<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - SIGSEGV in state_tracker/st_glsl_to_tgsi_temprename.cpp"
href="https://bugs.freedesktop.org/show_bug.cgi?id=104803#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - SIGSEGV in state_tracker/st_glsl_to_tgsi_temprename.cpp"
href="https://bugs.freedesktop.org/show_bug.cgi?id=104803">bug 104803</a>
from <span class="vcard"><a class="email" href="mailto:brianp@vmware.com" title="Brian Paul <brianp@vmware.com>"> <span class="fn">Brian Paul</span></a>
</span></b>
<pre>This patch seems to fix the crash, but I'm not sure it's actually correct.
Gert will have to take a look.
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
index 76b3f43..54802b3 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
@@ -791,7 +791,8 @@ lifetime temp_comp_access::get_required_lifetime()
const prog_scope *conditional =
enclosing_scope_first_write->enclosing_conditional();
if (conditional && !conditional->contains_range_of(*last_read_scope) &&
(conditional->is_switchcase_scope_in_loop() ||
- conditional_ifelse_write_in_loop())) {
+ conditional_ifelse_write_in_loop()) &&
+ conditional->outermost_loop()) {
keep_for_full_loop = true;
enclosing_scope_first_write = conditional->outermost_loop();
}
@@ -800,6 +801,8 @@ lifetime temp_comp_access::get_required_lifetime()
* required first read before write scope, and last read scope.
*/
const prog_scope *enclosing_scope = enclosing_scope_first_read;
+ assert(enclosing_scope);
+ assert(enclosing_scope_first_write);
if (enclosing_scope_first_write->contains_range_of(*enclosing_scope))
enclosing_scope = enclosing_scope_first_write;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>