Skip to content

Allow OP_RETURN_BLK to cross C boundaries - #6125

Merged
matz merged 1 commit into
mruby:masterfrom
dearblue:cross-c
Dec 27, 2023
Merged

matz merged 1 commit into
mruby:masterfrom
dearblue:cross-c

Conversation

@dearblue

Copy link
Copy Markdown
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