fix the fragment_in_dst_padding_gets_overwritten test on s390x#149056
fix the fragment_in_dst_padding_gets_overwritten test on s390x#149056bors merged 1 commit intorust-lang:mainfrom
Conversation
|
Given that what we are testing here is entirely target-independent code (the handling of provenance in the interpreter), I think I'd prefer just skipping the test on s390x over the risk of making the test not test the right thing any more. |
If you add |
|
Actually never mind that, |
|
ok for me. I'll revert the test and disable the 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]: rust-lang#149056 (comment)
eae45d8 to
e58572b
Compare
|
This looks great, thanks! Please squash the commits, then we can land this. Please use the @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
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]: rust-lang#149056 (comment) Co-authored-by: Ralf Jung <post@ralfj.de>
425b450 to
10172d1
Compare
|
@rustbot ready |
|
Thanks! @bors r+ rollup |
…rite, r=RalfJung
fix 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 (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 7 pull requests Successful merges: - #146341 (minimal dirfd implementation (1/4)) - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149095 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…rite, r=RalfJung
fix 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 (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 6 pull requests Successful merges: - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149095 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…rite, r=RalfJung
fix 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 (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 9 pull requests Successful merges: - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #148261 (rustc_public: Make Id types !Send / !Sync) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149043 ( rustdoc-json: add rlib path to ExternalCrate to enable robust crate resolution) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149095 (rustc-dev-guide subtree update) - #149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
…rite, r=RalfJung
fix 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 (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 10 pull requests Successful merges: - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #148261 (rustc_public: Make Id types !Send / !Sync) - #148831 (Bump compiler dependencies) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149071 (Add test scaffolding for the `remote-test-client`) - #149095 (rustc-dev-guide subtree update) - #149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - #146925 (Add doc for va_list APIs) - #147035 (alloc: fix `Debug` implementation of `ExtractIf`) - #147173 (Add support for hexagon-unknown-qurt target) - #148261 (rustc_public: Make Id types !Send / !Sync) - #149041 (ignore unsized types in mips64 and sparc64 callconvs) - #149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - #149071 (Add test scaffolding for the `remote-test-client`) - #149095 (rustc-dev-guide subtree update) - #149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #149056 - fneddy:fix_s390_test_padding_overwrite, r=RalfJung fix 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 (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary. To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding: ``` s390x: XXXXXXXXXXXXXXXXY------- x86_64: XXXXXXXXXXXXXXXXY--------------- GGGGGGGG ``` [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
Rollup of 9 pull requests Successful merges: - rust-lang/rust#146925 (Add doc for va_list APIs) - rust-lang/rust#147035 (alloc: fix `Debug` implementation of `ExtractIf`) - rust-lang/rust#147173 (Add support for hexagon-unknown-qurt target) - rust-lang/rust#148261 (rustc_public: Make Id types !Send / !Sync) - rust-lang/rust#149041 (ignore unsized types in mips64 and sparc64 callconvs) - rust-lang/rust#149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - rust-lang/rust#149071 (Add test scaffolding for the `remote-test-client`) - rust-lang/rust#149095 (rustc-dev-guide subtree update) - rust-lang/rust#149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - rust-lang/rust#146925 (Add doc for va_list APIs) - rust-lang/rust#147035 (alloc: fix `Debug` implementation of `ExtractIf`) - rust-lang/rust#147173 (Add support for hexagon-unknown-qurt target) - rust-lang/rust#148261 (rustc_public: Make Id types !Send / !Sync) - rust-lang/rust#149041 (ignore unsized types in mips64 and sparc64 callconvs) - rust-lang/rust#149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - rust-lang/rust#149071 (Add test scaffolding for the `remote-test-client`) - rust-lang/rust#149095 (rustc-dev-guide subtree update) - rust-lang/rust#149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
…rite, r=RalfJung
fix 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 (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
```
s390x: XXXXXXXXXXXXXXXXY-------
x86_64: XXXXXXXXXXXXXXXXY---------------
GGGGGGGG
```
[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#146925 (Add doc for va_list APIs) - rust-lang#147035 (alloc: fix `Debug` implementation of `ExtractIf`) - rust-lang#147173 (Add support for hexagon-unknown-qurt target) - rust-lang#148261 (rustc_public: Make Id types !Send / !Sync) - rust-lang#149041 (ignore unsized types in mips64 and sparc64 callconvs) - rust-lang#149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - rust-lang#149071 (Add test scaffolding for the `remote-test-client`) - rust-lang#149095 (rustc-dev-guide subtree update) - rust-lang#149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - rust-lang/rust#146925 (Add doc for va_list APIs) - rust-lang/rust#147035 (alloc: fix `Debug` implementation of `ExtractIf`) - rust-lang/rust#147173 (Add support for hexagon-unknown-qurt target) - rust-lang/rust#148261 (rustc_public: Make Id types !Send / !Sync) - rust-lang/rust#149041 (ignore unsized types in mips64 and sparc64 callconvs) - rust-lang/rust#149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - rust-lang/rust#149071 (Add test scaffolding for the `remote-test-client`) - rust-lang/rust#149095 (rustc-dev-guide subtree update) - rust-lang/rust#149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#146925 (Add doc for va_list APIs) - rust-lang#147035 (alloc: fix `Debug` implementation of `ExtractIf`) - rust-lang#147173 (Add support for hexagon-unknown-qurt target) - rust-lang#148261 (rustc_public: Make Id types !Send / !Sync) - rust-lang#149041 (ignore unsized types in mips64 and sparc64 callconvs) - rust-lang#149056 (fix the fragment_in_dst_padding_gets_overwritten test on s390x) - rust-lang#149071 (Add test scaffolding for the `remote-test-client`) - rust-lang#149095 (rustc-dev-guide subtree update) - rust-lang#149108 ([AIX][ppc64le-linux-gnu] Add Amy Kwan to target maintainers) r? `@ghost` `@rustbot` modify labels: rollup
on s390x 128bit types have a smaller alignment then on x861. This leads to smaller structs (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.
To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:
Footnotes
s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi ↩