Skip to content
Commit 916e9be4 authored by Noah Goldstein's avatar Noah Goldstein
Browse files

Cleanup code in `thread_exit`

1) Avoid proper function calls and referencing local variables after
the stack has been deallocated. A proper function call/return or local
variable reference that may have spilled will cause invalid memory
reads after the stack has been deallocated.

2) Mark the function as [[noreturn]] and place
`__builtin_unreachable()` after the `SYS_exit` syscalls.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D151142
parent 6a185718
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment