Skip to content

[wasm] Use xmalloc/xfree for jmpbuf allocation to trigger GC properly #9009

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

Conversation

kateinoigakukun
Copy link
Member

rb_vm_tag_jmpbuf_{init,deinit} are safe to raise exception since the given tag is not yet pushed to ec->tag or already popped from it at the time, so ec->tag is always valid and it's safe to raise exception when xmalloc fails.

`rb_vm_tag_jmpbuf_{init,deinit}` are safe to raise exception since the
given tag is not yet pushed to `ec->tag` or already popped from it at
the time, so `ec->tag` is always valid and it's safe to raise exception
when xmalloc fails.
@kateinoigakukun kateinoigakukun marked this pull request as ready for review November 22, 2023 17:11
@kateinoigakukun kateinoigakukun merged commit 295d648 into ruby:master Nov 22, 2023
@kateinoigakukun kateinoigakukun deleted the pr-1e266b204da974ba29d35dc07c8cbe469f2f7d6c branch November 22, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant