mirror of
https://github.com/ziglang/zig.git
synced 2026-02-09 11:03:30 +00:00
Sema: fix segfault during resolveInferredErrorSet
There was a simple missing check of adding an inferred error set to itself, in which case we should not try to mutate the hash map while iterating over it.
This commit is contained in:
parent
cf4aad4858
commit
b6133931d0
@ -21549,6 +21549,7 @@ fn resolveInferredErrorSet(
|
||||
var it = ies.inferred_error_sets.keyIterator();
|
||||
while (it.next()) |other_error_set_ptr| {
|
||||
const other_ies: *Module.Fn.InferredErrorSet = other_error_set_ptr.*;
|
||||
if (ies == other_ies) continue;
|
||||
try sema.resolveInferredErrorSet(block, src, other_ies);
|
||||
|
||||
for (other_ies.errors.keys()) |key| {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user