[libcxx-commits] [PATCH] D143010: [libc++abi][AIX] Skip non-C++ EH aware frames when retrieving exception object

Hubert Tong via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 1 16:39:55 PST 2023


hubert.reinterpretcast added inline comments.


================
Comment at: libcxxabi/src/aix_state_tab_eh.inc:665
+
+    // Move up one stack frame.
+    currentStack = reinterpret_cast<uintptr_t*>(currentStack[0]);
----------------
xingxue wrote:
> xingxue wrote:
> > cebowleratibm wrote:
> > > cebowleratibm wrote:
> > > > I'm not convinced this can be removed.  The implementation still moves up at least as many frames as it did before.
> > > Suggest: add a print statement each time we skip a frame.  In general this should only happen when the XL compiler injects a wrapper and it's probably of interest to the trace that we're bypassing wrapper frames enroute to the frame that contains the landing pad.
> > With the new implementation, `__xlc_excpetion_handle()` calls `skipNonCxxEHAwareFrames()`, which in turn calls `std::abort()`. `force_a_stackframe()` is no longer needed because `__xlc_excpetion_handle()` won't be a leaf function even if `skipNonCxxEHAwareFrames()` is inlined. I will add a comment in the code.
> I was dumping this info in the prototype but it caused timeouts when running a large application because the xlclang++ compiler generates so many calls to `__xlc_exception_handle()`, noting we've already added more code to skip the non-C++ EH frames there. To print the function name, we need to parse the traceback table to reach the function name field, in addition to printing it out, etc.  I will look into implementing a verbose mode to only dump certain info later.
If we are in a debugger or have a core file, we might be able to map back to the function using just the program counter value.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143010/new/

https://reviews.llvm.org/D143010



More information about the libcxx-commits mailing list