summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-10-26 10:15:09 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-10-26 10:15:09 -0300
commitba089bcb08a0efc6c26fb5c1e3c9d61c00cc012c (patch)
tree6d7a5b3dd20c6561a981cdbbb18c82de586459bc
parent1e64c1391f9a14115b5cc82066dbf545ae73ee27 (diff)
downloadlua-github-ba089bcb08a0efc6c26fb5c1e3c9d61c00cc012c.tar.gz
Details
Added comments in the makefile about other useful '-fsanitize' options.
-rw-r--r--makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/makefile b/makefile
index d46e650c..ee56c672 100644
--- a/makefile
+++ b/makefile
@@ -57,8 +57,13 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC)
# -pg -malign-double
# -DLUA_USE_CTYPE -DLUA_USE_APICHECK
-# ('-ftrapv' for runtime checks of integer overflows)
-# -fsanitize=undefined -ftrapv -fno-inline
+
+# The following options help detect "undefined behavior"s that seldom
+# create problems; some are only available in newer gcc versions. To
+# use some of them, we also have to define an enrivonment variable
+# ASAN_OPTIONS="detect_invalid_pointer_pairs=2".
+# -fsanitize=undefined
+# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare
# TESTS= -DLUA_USER_H='"ltests.h"' -O0 -g