mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-10 19:23:41 +01:00
Be conservative in all pointer derefrences by default.
Since most people can't completely control their compile or runtime environment, it becomes hard to ensure that unwind data is perfect.
This commit is contained in:
parent
d4fbc8326a
commit
045c55b2a2
2 changed files with 10 additions and 0 deletions
|
@ -169,6 +169,12 @@ if test x$enable_block_signals = xyes; then
|
|||
AC_DEFINE([CONFIG_BLOCK_SIGNALS], [], [Block signals before mutex operations])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(conservative_checks,
|
||||
[ --enable-conservative-checks Validate all memory addresses before use],
|
||||
[enable_conservative_checks=$enableval], [enable_conservative_checks=yes])
|
||||
if test x$enable_conservative_checks = xyes; then
|
||||
CPPFLAGS="${CPPFLAGS} -DCONSERVATIVE_CHECKS"
|
||||
fi
|
||||
|
||||
LIBUNWIND___THREAD
|
||||
|
||||
|
|
|
@ -51,7 +51,11 @@ unw_init_local (unw_cursor_t *cursor, ucontext_t *uc)
|
|||
c->dwarf.as = unw_local_addr_space;
|
||||
c->dwarf.as_arg = c;
|
||||
c->uc = uc;
|
||||
#if CONSERVATIVE_CHECKS
|
||||
c->validate = 1;
|
||||
#else
|
||||
c->validate = 0;
|
||||
#endif
|
||||
return common_init (c, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue