Skip to content

Conversation

@lavenzg
Copy link
Contributor

@lavenzg lavenzg commented Apr 2, 2025

Summary:
We currently allocate this symbol at the top of the function, before
performing potential allocations. In theory, the GC could free the newly
allocated symbol when we allocate the string.

In practice, this does not seem to be possible to trigger, because the
new entry will not pass the isNonLazyStringPrim check in
IdentifierTable::freeUnmarkedSymbols. The entry will either still be a
free list entry, or will be zero initialized by
lookupVector_.emplace_back if it was just allocated. Either way, it
will not appear to be a "non-lazy" string primitive.

Differential Revision: D72269786

Summary:
We currently allocate this symbol at the top of the function, before
performing potential allocations. In theory, the GC could free the newly
allocated symbol when we allocate the string.

In practice, this does not seem to be possible to trigger, because the
new entry will not pass the `isNonLazyStringPrim` check in
`IdentifierTable::freeUnmarkedSymbols`. The entry will either still be a
free list entry, or will be zero initialized by
`lookupVector_.emplace_back` if it was just allocated. Either way, it
will not appear to be a "non-lazy" string primitive.

Differential Revision: D72269786
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 2, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72269786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants