Add get_pgcstack_static to non-allocating allowlist#100
Open
sunxd3 wants to merge 1 commit into
Open
Conversation
On arm64 (Apple Silicon), Julia uses `jl_get_pgcstack_static` instead of `jl_get_pgcstack` to access the GC stack. This variant was missing from the `fn_may_allocate` allowlist, causing spurious "1 allocation" reports for every `@check_allocs`-decorated function on macOS/arm64. Ref: chalk-lab/Mooncake.jl#982
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
jl_get_pgcstack_staticinstead ofjl_get_pgcstackto access the GC stackfn_may_allocateallowlist insrc/classify.jl, causing spurious "1 allocation" reports for every@check_allocs-decorated function on macOS/arm64"get_pgcstack_static"alongside the existing"get_pgcstack"entryContext
Discovered via Mooncake.jl#982 — all
check_allocs-based tests fail with false positives on Apple Silicon due to this missing entry. A downstream workaround was proposed in Mooncake.jl#1092 but fixing it here upstream is the right approach.MWE (on arm64/Apple Silicon)