This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add asan_ignore - which errors to ignore
authorDavid Mitchell <davem@iabyn.com>
Fri, 19 Dec 2014 20:31:00 +0000 (20:31 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 19 Dec 2014 21:49:55 +0000 (21:49 +0000)
"clang -fsanitize=undefined" produces lots of false positives.
This file allows certain functions to be excluded from checking.
Use it as:

    clang -fsanitize=undefined -fsanitize-blacklist=`pwd`/asan_ignore

MANIFEST
asan_ignore [new file with mode: 0644]

index 844b7ae..b3f0f2d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,5 @@
 Artistic               The "Artistic License"
+asan_ignore            Errors to skip under clang's Addresss Sanitizer
 AUTHORS                        Contact info for contributors
 autodoc.pl             Creates pod/perlintern.pod and pod/perlapi.pod
 av.c                   Array value code
diff --git a/asan_ignore b/asan_ignore
new file mode 100644 (file)
index 0000000..5a8bc5c
--- /dev/null
@@ -0,0 +1,19 @@
+# This file intended to be used with clang as
+#
+#  clang -fsanitize=foo -fsanitize-blacklist=`pwd`/asan_ignore
+#
+# It lists those files / functions that clang's Address Sanitizer should
+# ignore.
+#
+# See http://clang.llvm.org/docs/SanitizerSpecialCaseList.html.
+
+
+# The pp functions used under 'use integer' shouldn't warn about
+# integer overflow etc.
+#
+# Unfortunately there doesn't seem to be any way to disable just specific
+# errors (i.e. the integer overflow ones). The manual implies that you can
+# suffix with =foo for a "tool-specific category", but neither =undefined
+# nor =signed-integer-overflow worked.
+
+fun:Perl_pp_i_*