Skip to content

Conversation

@aykevl
Copy link
Member

@aykevl aykevl commented Oct 15, 2022

Scanning of allocas was entirely broken on WebAssembly. The code intended to do this was never run. There were also no tests.

Looking into this further, I found that it is actually not really necessary to do that: the C stack can be scanned conservatively and in fact this was already done for goroutine stacks (because they live on the heap and are always referenced). It wasn't done for the system stack however.

With these fixes, I believe code should be both faster and more correct.

I found this in my work to get opaque pointers supported in LLVM 15, because the code that was never reached now finally got run and was actually quite buggy.

Scanning of allocas was entirely broken on WebAssembly. The code
intended to do this was never run. There were also no tests.

Looking into this further, I found that it is actually not really
necessary to do that: the C stack can be scanned conservatively and in
fact this was already done for goroutine stacks (because they live on
the heap and are always referenced). It wasn't done for the system stack
however.

With these fixes, I believe code should be both faster *and* more
correct.

I found this in my work to get opaque pointers supported in LLVM 15,
because the code that was never reached now finally got run and was
actually quite buggy.
@aykevl aykevl mentioned this pull request Oct 15, 2022
@dgryski
Copy link
Member

dgryski commented Oct 16, 2022

I'll review this Monday.

@deadprogram deadprogram requested a review from dgryski October 17, 2022 09:38
Copy link
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deadprogram
Copy link
Member

Thank you @aykevl and @dgryski now merging this fix!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants