ASan: fix potential use-after-free in backtrace interceptor
Various ASan interceptors may corrupt memory if passed a pointer to freed memory (https://github.com/google/sanitizers/issues/321). This patch fixes the issue for the backtrace interceptor, by calling REAL(backtrace) with a known-good scratch buffer, and performing an addressability check on the user-provided buffer prior to writing to it. Differential Revision: https://reviews.llvm.org/D150496
Loading
Please sign in to comment