-
Notifications
You must be signed in to change notification settings - Fork 394
Closed
Labels
A-intptrcastArea: affects int2ptr and ptr2int castsArea: affects int2ptr and ptr2int castsC-bugCategory: This is a bug.Category: This is a bug.
Description
During the implementation of the intptrcast model we discovered that memory addresses are aligned even when miri::intptrcast::GlobalState::align_addr
is not used.
Relevant code:
let x = (&5u8 as *const u8 as usize) * 2;
let y = (&6u16 as *const u16 as usize) * 2 / 2;
assert!(y % 2 == 1);
Metadata
Metadata
Assignees
Labels
A-intptrcastArea: affects int2ptr and ptr2int castsArea: affects int2ptr and ptr2int castsC-bugCategory: This is a bug.Category: This is a bug.