diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-01-19 16:25:20 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-01-19 16:25:55 -0700 |
| commit | 072d1e088c3e383c2303b873f55399d374d9808c (patch) | |
| tree | 80858b240c7b18873c25f3969f1f08100956bd76 /src/Compilation.zig | |
| parent | 1af31baf0ba447b6ea5a1456df5ba2d82dc26e56 (diff) | |
| download | zig-072d1e088c3e383c2303b873f55399d374d9808c.tar.gz zig-072d1e088c3e383c2303b873f55399d374d9808c.zip | |
stage2: fix anonymous Decl ty/val wrong arena
string literals and error set types were allocating the ty/val fields of
the anonymous Decl into the owner Decl's arena, rather than the
new anonymous Decl's arena as intended. This caused use of undefined
value later on in the pipeline.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 7700fcdc4a..fae725a1ac 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1552,7 +1552,7 @@ pub fn performAllTheWork(self: *Compilation) error{ TimerUnsupported, OutOfMemor // are lifetime annotations in the ZIR. var decl_arena = decl.typed_value.most_recent.arena.?.promote(module.gpa); defer decl.typed_value.most_recent.arena.?.* = decl_arena.state; - log.debug("analyze liveness of {s}\n", .{decl.name}); + log.debug("analyze liveness of {s}", .{decl.name}); try liveness.analyze(module.gpa, &decl_arena.allocator, func.body); if (std.builtin.mode == .Debug and self.verbose_ir) { |
