Skip to content

Commit 4eb01b7

Browse files
authored
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.
2 parents 5ae0d6b + 8ca6229 commit 4eb01b7

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)