Skip to content

Detach env of ci explicitly on atexit#6288

Merged
matz merged 1 commit into
mruby:masterfrom
dearblue:closing
Jun 9, 2024
Merged

Detach env of ci explicitly on atexit#6288
matz merged 1 commit into
mruby:masterfrom
dearblue:closing

Conversation

@dearblue

@dearblue dearblue commented Jun 6, 2024

Copy link
Copy Markdown
Contributor

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
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.

2 participants