mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-30 02:27:38 +01:00
649f1fb344
bad/missing unwind information, which could result in libunwind dereferencing bad pointers. This mechanism is based on msync(2) system call and significantly reduces the chances of a bad pointer dereference in libunwind. The original idea was to turn this mechanism on only when necessary i.e. libunwind didn't find proper unwind information for a IP. There are a couple of problems in the current implementation. * The flag is global and is modified without locking * The flag isn't reset when starting a new unwind The attached patch makes ->validate a per-thread setting by moving it into struct cursor from unw_local_addr_space and resets it to false when starting a new unwind. As a result, cursor->as_arg points to the cursor itself instead of the ucontext (for the local case). This was found to reduce the number of msync() system calls from an application using libunwind significantly. Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com> Signed-off-by: Arun Sharma <arun.sharma@google.com> |
||
---|---|---|
.. | ||
dwarf-config.h | ||
jmpbuf.h | ||
libunwind_i.h |