Skip to content

Commit 545f054

Browse files
committed
ZJIT: Add size assertion for Insn (was 120, now 112 after u32 change)
1 parent 597f312 commit 545f054

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

zjit/src/state.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ static mut ZJIT_STATE: InitializationState = InitializationState::Uninitialized;
102102
impl ZJITState {
103103
/// Initialize the ZJIT globals. Return the address of the JIT entry trampoline.
104104
pub fn init() -> *const u8 {
105+
assert_eq!(std::mem::size_of::<crate::hir::Insn>(), 112, "Insn size changed; please update this assertion if intentional");
105106
use InitializationState::*;
106107

107108
let initialization_state = unsafe {

0 commit comments

Comments
 (0)