]> git.eshelyaron.com Git - emacs.git/commit
Don't trigger ASan use-after-poison while checking for live pointers
authorVibhav Pant <vibhavp@gmail.com>
Sat, 3 Dec 2022 10:10:50 +0000 (15:40 +0530)
committerVibhav Pant <vibhavp@gmail.com>
Sat, 3 Dec 2022 10:10:50 +0000 (15:40 +0530)
commit5fa567d79ce35c0284ec8de2cfd6d229bd77365b
treef87698fe232d941d94a0780b5cc5f0588a142aab
parentaf296b19efd5a1f069ea4630b0df6912c2d66ad0
Don't trigger ASan use-after-poison while checking for live pointers

* src/alloc.c (live_string_holding, live_cons_holding)
(live_symbol_holding, live_float_holding) [GC_ASAN_POISON_OBJECTS]:
When compiling with address sanitization and GC poisoning support,
return NULL if the passed address is poisoned, or if the Lisp object
it resides in is poisoned. This fixes a rare use-after-poison abort
when these functions are called on a pointer that might be referring
to a now dead/sweep object.
src/alloc.c