[PATCH] D131709: [libunwind][AIX] Implement _Unwind_FindEnclosingFunction() using traceback table on AIX
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 12 08:26:15 PDT 2022
compnerd added inline comments.
================
Comment at: libunwind/src/UnwindLevel1-gcc-ext.c:92
+ // traceback table.
+ uint32_t *p = (uint32_t *)pc;
+
----------------
Should we use `uintptr_t` here instead of `uint32_t`?
================
Comment at: libunwind/src/UnwindLevel1-gcc-ext.c:93
+ uint32_t *p = (uint32_t *)pc;
+
+ // Keep looking forward until a word of 0 is found. The traceback
----------------
Should we protect against `_Unwind_FindEnclosingFunction(NULL)`?
================
Comment at: libunwind/src/UnwindLevel1-gcc-ext.c:110
+ return (void *)((uintptr_t)TBTable - *p - sizeof(uint32_t));
+ else
+ return NULL;
----------------
Just drop the `else`, we return a value if the traceback table has offsets or we will return NULL.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131709/new/
https://reviews.llvm.org/D131709
More information about the llvm-commits
mailing list