This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 101c6c0
authored
Unrolled build for rust-lang#122164
Rollup merge of rust-lang#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.1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| 513 | + | |
| 514 | + | |
513 | 515 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
518 | 520 | | |
519 | 521 | | |
520 | 522 | | |
| |||
0 commit comments