Skip to content

Commit 10172d1

Browse files
fneddyRalfJung
andcommitted
disable the fragment_in_dst_padding_gets_overwritten test on s390x
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs and therefore the write_unaligned will write outside of the structs boundary. For now disable the tests on s390x. [^2] [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi [^2]: #149056 (comment) Co-authored-by: Ralf Jung <post@ralfj.de>
1 parent cc328c1 commit 10172d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/ui/consts/const-eval/ptr_fragments.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const _PARTIAL_OVERWRITE: () = {
6868
};
6969

7070
#[allow(dead_code)]
71+
#[cfg(not(target_arch = "s390x"))] // u128 is less aligned on s390x, removing the padding
7172
fn fragment_in_dst_padding_gets_overwritten() {
7273
#[repr(C)]
7374
struct Pair {

0 commit comments

Comments
 (0)