diff options
| author | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2024-03-17 00:11:54 -0400 |
|---|---|---|
| committer | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2024-03-17 00:36:27 -0400 |
| commit | 41c6fa812b0bed63e54c455134734452f9cee97c (patch) | |
| tree | 416b692fc51a4ab4ebfc85995cc2d895f3696c6f /compiler/rustc_codegen_llvm/src | |
| parent | 4498cd6a8da86e4d7a84953c891281c8c2dace26 (diff) | |
| download | rust-41c6fa812b0bed63e54c455134734452f9cee97c.tar.gz rust-41c6fa812b0bed63e54c455134734452f9cee97c.zip | |
sparc64: fix crash in ABI code for { f64, f32 } struct
This would trigger a `Size::sub: 0 - 8 would result in negative size` abort,
if `data.last_offset > offset`.
This is almost hilariously easy to trigger (https://godbolt.org/z/8rbv57xET):
```rust
#[repr(C)]
pub struct DoubleFloat {
f: f64,
g: f32,
}
#[no_mangle]
pub extern "C" fn foo(x: DoubleFloat) {}
```
Tests for this will be covered by the cast-target-abi.rs test added in a later commit.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
