emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/asan-gc-poisoning 1b4a112c46 1/2: etc/DEBUG: Add more informatio


From: Vibhav Pant
Subject: feature/asan-gc-poisoning 1b4a112c46 1/2: etc/DEBUG: Add more information about ASan memory poisoning.
Date: Wed, 30 Nov 2022 12:31:59 -0500 (EST)

branch: feature/asan-gc-poisoning
commit 1b4a112c460058418185fb3e1f1caf8627a1da15
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>

    etc/DEBUG: Add more information about ASan memory poisoning.
---
 etc/DEBUG | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/etc/DEBUG b/etc/DEBUG
index c565374118..01c75f8da7 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -1002,6 +1002,8 @@ Address sanitization is incompatible with 
undefined-behavior
 sanitization, unfortunately.  Address sanitization is also
 incompatible with the --with-dumping=unexec option of 'configure'.
 
+*** Address poisoning/unpoisoning
+
 When compiled with address sanitization, Emacs will also try to mark
 dead/free lisp objects as poisoned, forbidding them from being
 accessed without being unpoisoned first.  This adds an extra layer
@@ -1010,6 +1012,18 @@ evade traditional use-after-free checks. To disable 
this, add
 'allow_user_poisoning=0' to ASAN_OPTIONS, or build Emacs with
 '-DGC_ASAN_POISON_OBJECTS=0' in CFLAGS.
 
+While using GDB, memory addresses can be inspected by using helper
+functions additionally provided by the ASan library:
+
+  (gdb) call __asan_describe_address(ptr)
+
+To check whether an address range is poisoned or not, use:
+
+  (gdb) call __asan_region_is_poisoned(ptr, 8)
+
+Additional functions can be found in the header
+'sanitizer/asan_interface.h' in your compiler's headers directory.
+
 ** Running Emacs under Valgrind
 
 Valgrind <https://valgrind.org/> is free software that can be useful



reply via email to

[Prev in Thread] Current Thread [Next in Thread]