Skip to content

Commit 76d1ac3

Browse files
authored
Fix stack-use-after-scope on Windows in Precompute (#6643)
Create a temp var to store the ChildIterator. Fixes #6639
1 parent ea4d9e4 commit 76d1ac3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/passes/Precompute.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,8 @@ struct Precompute
858858
}
859859

860860
auto* child = stack[index];
861-
for (auto** currChild : ChildIterator(stack[index - 1]).children) {
861+
auto childIterator = ChildIterator(stack[index - 1]);
862+
for (auto** currChild : childIterator.children) {
862863
if (*currChild == child) {
863864
return currChild;
864865
}

0 commit comments

Comments
 (0)