Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.heap: add runtime safety for calling stackFallback(N).get multiple times #18275

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

Vexu
Copy link
Member

@Vexu Vexu commented Dec 13, 2023

Closes #16344

@Vexu Vexu added breaking Implementing this issue could cause existing code to no longer compile or have different behavior. standard library This issue involves writing Zig code for the standard library. labels Dec 13, 2023
@Vexu Vexu mentioned this pull request Dec 13, 2023
@Vexu Vexu force-pushed the stack branch 2 times, most recently from a4d62f2 to a4a6e49 Compare December 13, 2023 22:45
@Vexu Vexu removed the breaking Implementing this issue could cause existing code to no longer compile or have different behavior. label Dec 14, 2023
@Vexu Vexu changed the title StackFallBackAllocator: remove helper function reduce risk of footgun std.heap: add runtime safety for calling stackFallback(N).get multiple times Dec 14, 2023
@Vexu Vexu changed the title std.heap: add runtime safety for calling stackFallback(N).get multiple times std.heap: add runtime safety for calling stackFallback(N).get multiple times Dec 14, 2023
@andrewrk
Copy link
Member

Nice

@andrewrk andrewrk merged commit 828d239 into ziglang:master Jan 10, 2024
10 checks passed
@Vexu Vexu deleted the stack branch January 10, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using StackFallbackAllocator.get() multiple times is a footgun.
3 participants