libstd: do not assert if allocs are within std.c.max_align_t in raw_c_allocator #8835
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After landing #8554, stage2 compiler is unable to build a simple "Hello, World" on my M1 Mac tripping the following assertion in
rawCAlloc
:I believe this assertion is wrong and should be removed (as I've done in this PR) since it only really covers scalar types:
In this particular case,
@alignOf(Scope.File) == 16
sinceScope.File
contains ani128
as a member.Out of curiosity, I have verified that the same behaviour is observed with C++. That is, for the following source:
we get
which matches Zig's behaviour.
If anyone has got access to an M1, I'd be very grateful if you could verify running this example against stage2 built with
master
branch and check if you see the same reported behaviour.