Skip to content

Commit

Permalink
Auto merge of #101442 - joboet:null_check_tcs, r=thomcc
Browse files Browse the repository at this point in the history
Check if TCS is a null pointer on SGX

The `EENTER` instruction only checks if the TCS is aligned, not if it zero. Saying the address returned is a `NonNull<u8>` (for which `Tcs` is a type alias) is unsound. As well-behaved runners will not put the TCS at address zero, so the definition of `Tcs` is correct. However, `std` should check the address before casting it to a `NonNull`.

ping `@jethrogb` `@raoulstrackx`
`@rustbot` label I-unsound
  • Loading branch information
bors committed Sep 11, 2022
2 parents d928f0c + 1e70561 commit de9cac8
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit de9cac8

Please sign in to comment.