diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-08 21:02:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-08 21:02:01 +0100 |
| commit | 2b6ae95d3f3f7a45b1d1852b7e850d363143b481 (patch) | |
| tree | 586f610abe506a8c80673183992fa14503e85156 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | b9a3952479cda1e86d49a544f0da07485421d3ac (diff) | |
| parent | 4bef0cca706d5284911d045e0c8ce86a8555fc6e (diff) | |
| download | rust-2b6ae95d3f3f7a45b1d1852b7e850d363143b481.tar.gz rust-2b6ae95d3f3f7a45b1d1852b7e850d363143b481.zip | |
Rollup merge of #122164 - beetrees:uefi-argv-align, r=workingjubilee
Fix misaligned loads when loading UEFI arg pointers Currently, the two UEFI argument pointers are stored in an `alloca` of alignment 1, a pointer to which is then passed as `argv`. However, [the library code](https://github.com/rust-lang/rust/blob/9c3ad802d9b9633d60d3a74668eb1be819212d34/library/std/src/sys/pal/uefi/mod.rs#L60-L61) treats `argv` as a pointer to an array of pointers and dereferences it as such, meaning that it presumes the `alloca` is aligned to at least the alignment of a pointer. This PR fixes this mismatch by aligning the `alloca` to the alignment of a pointer. This PR also changed the `gep` to use the new `inbounds_ptradd` method.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
