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

Detach env of ci explicitly on atexit #6288

Merged
merged 1 commit into from
Jun 9, 2024
Merged

Conversation

dearblue
Copy link
Contributor

@dearblue dearblue commented Jun 6, 2024

Supplement to commit 177deba (#6276).

If the ci is incomplete, the previous method may cause the application to crash because env->stack points to an invalid address when expanding the data stack. Since the ci is in an abnormal state, control it by putting NULL in env->stack.

If the ci is fine and top-level, detach env as usual with mrb_env_unshare().

Supplement to commit 177deba (mruby#6276).

If the ci is incomplete, the previous method may cause the application to crash because `env->stack` points to an invalid address when expanding the data stack.
Since the ci is in an abnormal state, control it by putting `NULL` in `env->stack`.

If the ci is fine and top-level, detach `env` as usual with `mrb_env_unshare()`.
@dearblue dearblue requested a review from matz as a code owner June 6, 2024 12:43
@github-actions github-actions bot added the core label Jun 6, 2024
@matz matz merged commit 43b3536 into mruby:master Jun 9, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants