Skip to content

Fixes #6692. AIOOBE on evals overflowing closure ids.#6704

Merged
enebo merged 4 commits intojruby:jruby-9.2from
enebo:fix_closure_id
Jun 4, 2021
Merged

Fixes #6692. AIOOBE on evals overflowing closure ids.#6704
enebo merged 4 commits intojruby:jruby-9.2from
enebo:fix_closure_id

Conversation

@enebo
Copy link
Member

@enebo enebo commented Jun 4, 2021

This has two pieces:

  1. Evals only live as a scope as long as they execute. They should not
    be asking the lexical scope they are called in for an id. This is likely
    a portion (or all) of the original reporters problem.

  2. Closures in evals should be given out scope ids relative to the eval.
    These were going to the eval and then the evals getScopeID would ask its
    lexical parent for an ID (which is the scope outside the eval).

This has two pieces:
  1. Evals only live as a scope as long as they execute.  They should not
  be asking the lexical scope they are called in for an id.  This is likely
  a portion (or all) of the original reporters problem.

  2. Closures in evals should be given out scope ids relative to the eval.
  These were going to the eval and then the evals getScopeID would ask its
  lexical parent for an ID (which is the scope outside the eval).
@enebo enebo changed the base branch from master to jruby-9.2 June 4, 2021 19:34
@enebo enebo added this to the JRuby 9.2.18.0 milestone Jun 4, 2021
@enebo enebo merged commit f3ea266 into jruby:jruby-9.2 Jun 4, 2021
@enebo enebo deleted the fix_closure_id branch June 4, 2021 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant