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>
This commit is contained in:
mlugg
2023-06-02 13:47:38 +01:00
committed by Andrew Kelley
parent 0f80652efb
commit 0fd52cdc5e
2 changed files with 22 additions and 2 deletions

View File

@@ -337,6 +337,7 @@ pub const CaptureScope = struct {
if (!self.failed()) {
self.captures.deinit(gpa);
}
gpa.destroy(self);
}
};