[PATCH] ntdll: Fix unwinding leaf functions of builtin modules in ARM/ARM64.
Jinoh Kang
jinoh.kang.kr at gmail.com
Thu Dec 9 09:39:24 CST 2021
On 12/9/21 23:28, Alexandre Julliard wrote:
> Jinoh Kang <jinoh.kang.kr at 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/a8609062849f8261a40c170941400e6ba0a499c0/include/libunwind-common.h.in#L57-L58
> /* 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 */
--
Sincerely,
Jinoh Kang
More information about the wine-devel
mailing list