Skip to content
Commit 9b4e8b7b authored by Mikhail R. Gadelha's avatar Mikhail R. Gadelha
Browse files

[libc] Fix longjmp's fake return in x86_64

This implements the fake return after a successful longjmp(), as
described in the linux man page:

Following  a  successful  longjmp(), execution continues as if setjmp()
had returned for a second time.  This  "fake"  return  can  be  distin-
guished from a true setjmp() call because the "fake" return returns the
value provided in val.  If the programmer mistakenly passes the value 0
in val, the "fake" return will instead return 1.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D146981
parent 4d64fcdd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment