[PATCH] D57922: [analyzer] Insert checker options into AnalyzerOption::ConfigTable

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 7 13:25:24 PST 2019


Szelethus marked an inline comment as done.
Szelethus added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:183
                                           SearchInParents)
-                     .getAsInteger(10, Ret);
+                     .getAsInteger(0, Ret);
   assert(!HasFailed && "analyzer-config option should be numeric");
----------------
`alpha.security.MmapWriteExec:MmapProtRead` expects it's option to be of a hexadecimal value -- as of now, using that option crashes.

>From the [[ https://llvm.org/doxygen/classllvm_1_1StringRef.html#a9e373829f3f1775d30eae9053067f8c3 | doxygen]]:
```
llvm::StringRef::getAsInteger(unsigned Radix, T & Result) const
```
Parse the current string as an integer of the specified radix.

If Radix is specified as zero, this does radix autosensing using extended C rules: 0 is octal, 0x is hex, 0b is binary.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57922/new/

https://reviews.llvm.org/D57922





More information about the cfe-commits mailing list