[PATCH] Documentation for sanitizer special case list
Sean Silva
silvas at purdue.edu
Mon Aug 5 12:27:33 PDT 2013
This is looking a lot better.
================
Comment at: docs/SanitizerSpecialCaseList.rst:62
@@ +61,3 @@
+ # Turn off checks for the source file (use absolute path or path relative
+ # to the current working directory):
+ src:/path/to/source/file.c
----------------
The compiler's working directory? Or the file's working directory?
================
Comment at: docs/SanitizerSpecialCaseList.rst:54
@@ +53,3 @@
+
+Each line contains a prefix, followed by a colon and a regular expression.
+Empty lines and lines starting with "#" are ignored. Prefix defines the type
----------------
What about the `=foo` at the end?
Also, you can't just say "regular expression" when the meaning of `*` is different (and a tiny note in the comment below not sufficient). Please say something like "regular expression except that `*` is used as in shell wildcarding", or something like that.
================
Comment at: docs/AddressSanitizer.rst:144
@@ +143,3 @@
+ global:bad_init_global=init
+ type:*Namespace::BadInitClassName*=init
+ src:bad/init/files/*=init
----------------
It's not at all clear what this line is meant to match. Does it match all initializers of a specific type? How is the wildcarding performed (would the entry `type:std::*=init` match all types in namespace `std` and all nested namespaces? What about inline namespaces? Does it demangle the symbol name to get this?
================
Comment at: docs/SanitizerSpecialCaseList.rst:67-68
@@ +66,4 @@
+ fun:_Z8MyFooBarv
+ # Basic regular expressions are supported:
+ fun:bad_(foo|bar)
+ src:bad_source[1-9].c
----------------
I believe that parenthesized alternations like this are actually extended RE syntax an not supported by basic RE's.
```
$ echo "foo\nbar" | grep '(foo|bar)'
$ echo "foo\nbar" | grep -E '(foo|bar)'
foo
bar
```
================
Comment at: docs/ThreadSanitizer.rst:100-104
@@ -99,1 +99,7 @@
+Blacklist
+---------
+
+You may use :doc:`SanitizerSpecialCaseList` to disable ThreadSanitizer checks
+for certain functions and source files. Data race reports will be suppressed.
+
----------------
I would prefer if this were made more precise, saying something like "ThreadSanitizer supports the `src:` and `fun:` prefixes in :doc:`SanitizerSpecialCaseList`, which will suppress data race reports in the specified files/functions."
================
Comment at: docs/AddressSanitizer.rst:132-135
@@ +131,6 @@
+
+You may use sanitizer special case list to disable AddressSanizier checks for
+certain source files, functions and global variables. See
+:doc:`SanitizerSpecialCaseList` for general file format description.
+AddressSanitizer-specific entry formats are:
+
----------------
You need to actually describe each entry type. Examples are nice, but this is meant to be reference documentation so it has to serve that purpose as well. You probably want to explicitly list the supported prefixes and suffixes, describe each of their meanings, and provide examples for each one.
You may want to centralize the description of `src:` and `fun:` to `SanitizerSpecialCaseList.rst`
http://llvm-reviews.chandlerc.com/D1268
BRANCH
svn
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list