Skip to content

Fix reentrancy of Code.eval_*#15306

Open
lukaszsamson wants to merge 1 commit intoelixir-lang:mainfrom
lukaszsamson:ls-eval-reentrant
Open

Fix reentrancy of Code.eval_*#15306
lukaszsamson wants to merge 1 commit intoelixir-lang:mainfrom
lukaszsamson:ls-eval-reentrant

Conversation

@lukaszsamson
Copy link
Copy Markdown
Contributor

Keep env and dbg callbacks on stacks in process dict

Fixes #15303

Keep env and dbg callbacks on stacks in process dict

Fixes elixir-lang#15303
Code.eval_string(
"""
Code.eval_string("1 + 1")
dbg(1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This already works, because the dbg is expanded using the dbg_callback before Code.eval_string runs. So to actually test it we need this:

Suggested change
dbg(1)
Code.eval_string("dbg(1)")

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.

Code.eval_* functions are not reentrant

2 participants