Skip to content

Replicate heap_index in shape_id flags. #13546

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

Closed
wants to merge 3 commits into from

Conversation

casperisfine
Copy link
Contributor

This is preparation to getting rid of T_OBJECT transitions (#13519).

By first only replicating the information it's easier to ensure consistency.

@casperisfine casperisfine force-pushed the shape-heap-id-flags branch 2 times, most recently from 4f39df2 to ee3bf2a Compare June 6, 2025 11:39
Copy link

launchable-app bot commented Jun 6, 2025

Tests Failed

✖️no tests failed ✔️61986 tests passed(1 flake)

@byroot
Copy link
Member

byroot commented Jun 6, 2025

@XrXr do you have any idea what I'm doing wrong to cause YJIT/x86 to crash here? I can't make sense of that crash.

@jhawthorn
Copy link
Member

@XrXr do you have any idea what I'm doing wrong to cause YJIT/x86 to crash here? I can't make sense of that crash.

I have a hunch. I added some print debugging to YJIT, and the crash happens immediately after a shape exceeds 2**31, so I think we're not handling that correctly

new_shape_id: 804002cf
ruby: YJIT has panicked. More info to follow...

thread '<unnamed>' panicked at yjit/src/asm/x86_64/mod.rs:553:30:
assertion `left == right` failed
  left: 64
 right: 32
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /usr/src/debug/rust/rustc-1.87.0-src/library/core/src/panicking.rs:380:5
   4: yjit::asm::x86_64::write_rm_multi
             at ./yjit/src/asm/x86_64/mod.rs:553:30

@casperisfine
Copy link
Contributor Author

THanks @jhawthorn, trying ae544b8 to workaround the issue for now.

@casperisfine
Copy link
Contributor Author

Seem to have worked, the YJIT crashes are gone. Thank you so much!

byroot added 3 commits June 7, 2025 12:16
This is preparation to getting rid of `T_OBJECT` transitions.
By first only replicating the information it's easier to ensure
consistency.
@casperisfine casperisfine force-pushed the shape-heap-id-flags branch from ae544b8 to 218241b Compare June 7, 2025 10:16
@byroot
Copy link
Member

byroot commented Jun 7, 2025

I merged this as part of #13556.

Which means the workaround was merged, but it's super easy to remove as soon as YJIT can handle the higher bit being set.

@byroot byroot closed this Jun 7, 2025
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.

3 participants