Skip to content
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

YJIT: Fix BorrowMutError on BOP invalidation #7212

Merged
merged 1 commit into from Jan 31, 2023

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Jan 31, 2023

This fixes:

thread '<unnamed>' panicked at 'already borrowed: BorrowMutError', src/core.rs:509:16
stack backtrace:
   0: rust_begin_unwind
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/panicking.rs:107:14
   2: core::result::unwrap_failed
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/result.rs:1613:5
   3: core::result::Result<T,E>::expect
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/result.rs:1255:23
   4: core::cell::RefCell<T>::borrow_mut
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/cell.rs:946:9
   5: yjit::core::BlockRef::borrow_mut
             at ./yjit/src/core.rs:509:9
   6: yjit::core::regenerate_branch
             at ./yjit/src/core.rs:1708:21
   7: yjit::core::invalidate_block_version
             at ./yjit/src/core.rs:2370:9
   8: yjit::invariants::rb_yjit_bop_redefined::{{closure}}
             at ./yjit/src/invariants.rs:229:17
   9: std::panicking::try::do_call
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:406:40
  10: __rust_try
  11: std::panicking::try
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:370:19
  12: std::panic::catch_unwind
             at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panic.rs:133:14
  13: yjit::cruby::with_vm_lock
             at ./yjit/src/cruby.rs:617:21
  14: rb_yjit_bop_redefined
             at ./yjit/src/invariants.rs:221:5

https://cirrus-ci.com/task/6461636395925504?logs=make_test_all

@matzbot matzbot requested a review from a team January 31, 2023 19:22
@maximecb maximecb merged commit e11067e into ruby:master Jan 31, 2023
@maximecb maximecb deleted the yjit-fix-bop-borrow branch January 31, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants