aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-06-02 13:47:38 +0100
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:59 -0700
commit0fd52cdc5eb4b17e8066a06d8af761f934cf8808 (patch)
tree08adff6a341d9d3eaaeefb21cec0234884e1df1d /src/Module.zig
parent0f80652efb170aa4158e378dbb493da717c9bd17 (diff)
downloadzig-0fd52cdc5eb4b17e8066a06d8af761f934cf8808.tar.gz
zig-0fd52cdc5eb4b17e8066a06d8af761f934cf8808.zip
InternPool: avoid aggregate null bytes storage
This is a workaround for InternPool currently not handling non-null-terminated strings. It avoids using the `bytes` storage for aggregates if there are any null bytes. In the future this should be changed so that the `bytes` storage can be used regardless of whether there are any null bytes. This is important for use cases such as `@embedFile`. However, this fixes a bug for now, and after this commit, stage2 self-hosts again. mlugg: stage5 passes all enabled behavior tests on my system. Commit message edited by Andrew Kelley <andrew@ziglang.org>
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 5f28f4f069..9d58029cb5 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -337,6 +337,7 @@ pub const CaptureScope = struct {
if (!self.failed()) {
self.captures.deinit(gpa);
}
+ gpa.destroy(self);
}
};