Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 16, 2024

We we not calling writeStackCookie() in the right place which means that checkStackCookie() would always fail in wasm workers.

Required for #22721

@sbc100 sbc100 requested a review from kripken October 16, 2024 22:35
@sbc100
Copy link
Collaborator Author

sbc100 commented Oct 16, 2024

Split out from #22721

@sbc100 sbc100 requested a review from juj October 16, 2024 22:36
We we not calling `writeStackCookie()` in the right place which means
that `checkStackCookie()` would always fail in wasm workers.
@sbc100 sbc100 force-pushed the wasm_worker_stack_check branch from 936667d to fef8101 Compare October 16, 2024 23:26
@sbc100 sbc100 enabled auto-merge (squash) October 17, 2024 16:54
#endif

#if STACK_OVERFLOW_CHECK
stackCheckInit();
Copy link
Member

Choose a reason for hiding this comment

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

This code both moved and lost the condition if (!pthread) - do we not need that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already have early return for if (ENVIRONMENT_IS_PTHREAD) and if (ENVIRONMENT_IS_WASM_WORKER) so by the time we get here know were the main runtime thread.

@sbc100 sbc100 merged commit 0054150 into emscripten-core:main Oct 17, 2024
28 checks passed
@sbc100 sbc100 deleted the wasm_worker_stack_check branch October 17, 2024 17:51
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.

3 participants