1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; * lisp/emacs-lisp/comp.el: Add a simple sanitizer usage example.

This commit is contained in:
Andrea Corallo 2024-03-20 14:49:28 +01:00
parent 1475e3c3b5
commit e2fec514fd

View file

@ -3017,6 +3017,18 @@ These are substituted with a normal `set' op."
;; the variable tested by the conditional branch is of the predicted
;; value type and signal an error otherwise.
;;; Example:
;; Assuming we want to compile 'test.el' and test function `foo' defined
;; into it.
;; Native compile 'test.el' instrumenting it for sanitizer usage.
;; (let ((comp-sanitizer-emit t))
;; (load (native-compile "test.el")))
;; Run `foo' with the sanitizer active.
;; (let ((comp-sanitizer-active t))
;; (foo))
(defvar comp-sanitizer-emit nil
"Gates the sanitizer pass.
This is intended to be used only for development and verification of