On 12/9/21 23:28, Alexandre Julliard wrote:
Jinoh Kang jinoh.kang.kr@gmail.com writes:
Commit 5c101ed58f5 (ntdll: Fix unwinding of leaf functions on ARM64., 2019-10-23) changed the sign of UNW_ENOINFO when testing for error from libunwind. However, unw_get_proc_info() does not return a sign-flipped error code. Thus, comparing it with -UNW_ENOINFO is a no-op.
That seems specific to the LLVM version, the standalone libunwind definitely returns negative values:
https://github.com/libunwind/libunwind/blob/master/src/dwarf/Gparser.c#L468
I just learned that libunwind functions may return *both* positive and negative error codes. Probably wise to test for both?
Quoting https://github.com/libunwind/libunwind/blob/a8609062849f8261a40c170941400e6b...
/* Error codes. The unwind routines return the *negated* values of these error codes on error and a non-negative value on success. */ typedef enum { UNW_ESUCCESS = 0, /* no error */ UNW_EUNSPEC, /* unspecified (general) error */