<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - SPIR-V shaders that cause segmentation faults in nir_from_ssa"
href="https://bugs.freedesktop.org/show_bug.cgi?id=111449#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - SPIR-V shaders that cause segmentation faults in nir_from_ssa"
href="https://bugs.freedesktop.org/show_bug.cgi?id=111449">bug 111449</a>
from <span class="vcard"><a class="email" href="mailto:andrey.simiklit.1989@gmail.com" title="andrii simiklit <andrey.simiklit.1989@gmail.com>"> <span class="fn">andrii simiklit</span></a>
</span></b>
<pre>The bug is still reproducible on the latest master but now it is not
"segmentation fault" it is an infinite compilation. Looks like the following
patch fixes this issue (not sure that it is a good solution because I am not
familiar with this part of the code):
diff --git a/src/compiler/nir/nir_repair_ssa.c
b/src/compiler/nir/nir_repair_ssa.c
index 757afff490d..901aec90a07 100644
--- a/src/compiler/nir/nir_repair_ssa.c
+++ b/src/compiler/nir/nir_repair_ssa.c
@@ -132,8 +132,9 @@ repair_ssa_def(nir_ssa_def *def, void *void_state)
block_def = &cast->dest.ssa;
}
- nir_instr_rewrite_src(src->parent_instr, src,
- nir_src_for_ssa(block_def));
+ if(def != block_def)
+ nir_instr_rewrite_src(src->parent_instr, src,
+ nir_src_for_ssa(block_def));
}
}
The root cause is that we infinite remove a first element of the list
'def->uses' and add this element to the end of this list.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>