Skip to content

Allow OP_RETURN_BLK to cross C boundaries #6125

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

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Conversation

dearblue
Copy link
Contributor

The restriction was introduced in commit b563bcb to resolve #3462. Subsequently, the RBreak object, introduced by mruby 1.3.0, allowed crossing the C boundary.

def cross; Class.new { proc { return }.call }; end; cross
# => unexpected return (LocalJumpError) # without this patch
# => nothing raised                     # with this patch

The restriction was introduced in commit b563bcb to resolve mruby#3462.
Subsequently, the `RBreak` object, introduced by mruby 1.3.0, allowed crossing the C boundary.

```ruby
def cross; Class.new { proc { return }.call }; end; cross
# => unexpected return (LocalJumpError) # without this patch
# => nothing raised                     # with this patch
```
@dearblue dearblue requested a review from matz as a code owner December 24, 2023 06:31
@github-actions github-actions bot added the core label Dec 24, 2023
@matz matz merged commit 074374e into mruby:master Dec 27, 2023
@dearblue dearblue deleted the cross-c branch January 3, 2024 02:57
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.

Heap buffer overflow
2 participants