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

erts: Fix spawn_request trace bug #5612

Merged

Conversation

garazdawi
Copy link
Contributor

Since the args of spawn_request may end up in a trace we need to allocate them on the heap of the spawning process.
We cannot use a temporary heap for this as allocates on normal heap and this will lead to stray pointers on the heap during gc. Stray pointers are not always a problem as any dead data is ignored, but if the pointers end up in a heap fragment they are not ignored... so we need to do a proper allocation of the terms.

This bug has existed since OTP-23.0.

Since the args of spawn_request may end up in a trace
we need to allocate them on the heap of the spawning process.
We cannot use a temporary heap for this as
allocates on normal heap and this will lead to stray pointers
on the heap during gc. Stray pointers are not always a problem
as any dead data is ignored, but if the pointers and up in a
heap fragments they are not ignored...
@garazdawi garazdawi added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI labels Jan 17, 2022
@garazdawi garazdawi self-assigned this Jan 17, 2022
@garazdawi garazdawi merged commit 887771d into erlang:maint Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants