[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e2fec514fd2: ; * lisp/emacs-lisp/comp.el: Add a simple sanitizer
From: |
Andrea Corallo |
Subject: |
master e2fec514fd2: ; * lisp/emacs-lisp/comp.el: Add a simple sanitizer usage example. |
Date: |
Wed, 20 Mar 2024 09:56:53 -0400 (EDT) |
branch: master
commit e2fec514fd22e61c2a4e9343056aa744e93203a1
Author: Andrea Corallo <acorallo@gnu.org>
Commit: Andrea Corallo <acorallo@gnu.org>
; * lisp/emacs-lisp/comp.el: Add a simple sanitizer usage example.
---
lisp/emacs-lisp/comp.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
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."
;; 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e2fec514fd2: ; * lisp/emacs-lisp/comp.el: Add a simple sanitizer usage example.,
Andrea Corallo <=