aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2024-03-20 14:49:28 +0100
committerAndrea Corallo2024-03-20 14:55:44 +0100
commite2fec514fd22e61c2a4e9343056aa744e93203a1 (patch)
tree18d353922fef550b5c90a08f141952fc285918c6
parent1475e3c3b562f7604e538fccbb41f1d66b10663d (diff)
downloademacs-e2fec514fd22e61c2a4e9343056aa744e93203a1.tar.gz
emacs-e2fec514fd22e61c2a4e9343056aa744e93203a1.zip
; * lisp/emacs-lisp/comp.el: Add a simple sanitizer usage example.
-rw-r--r--lisp/emacs-lisp/comp.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index d7830597709..7e8d4e15e0a 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3017,6 +3017,18 @@ These are substituted with a normal `set' op."
3017;; the variable tested by the conditional branch is of the predicted 3017;; the variable tested by the conditional branch is of the predicted
3018;; value type and signal an error otherwise. 3018;; value type and signal an error otherwise.
3019 3019
3020;;; Example:
3021;; Assuming we want to compile 'test.el' and test function `foo' defined
3022;; into it.
3023
3024;; Native compile 'test.el' instrumenting it for sanitizer usage.
3025;; (let ((comp-sanitizer-emit t))
3026;; (load (native-compile "test.el")))
3027
3028;; Run `foo' with the sanitizer active.
3029;; (let ((comp-sanitizer-active t))
3030;; (foo))
3031
3020(defvar comp-sanitizer-emit nil 3032(defvar comp-sanitizer-emit nil
3021 "Gates the sanitizer pass. 3033 "Gates the sanitizer pass.
3022This is intended to be used only for development and verification of 3034This is intended to be used only for development and verification of