jroelofs added inline comments.

================
Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:399
+  def MmapWriteExecChecker : Checker<"MmapWriteExec">,
+    HelpText<"Check if mmap() call is not both writable and executable">,
+    DescFile<"MmapWriteExecChecker.cpp">;
----------------
I'd reword as:

"Warn on mmap() calls that are both writeable and executable"


================
Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:64
+      auto Report = llvm::make_unique<BugReport>(
+          *BT, "Both PROT_WRITE and PROT_EXEC flags had been set. It can "
+               "lead to exploitable memory regions, overwritten with malicious 
code"
----------------
The general style of diagnostics is to write everything in the present tense. 
Talk about how the code is, as the compiler saw it, not how it was.

I'd reword it as:

"Both PROT_WRITE and PROT_EXEC are set. This can lead to exploitable memory 
regions, which could be overwritten with malicious code"


Repository:
  rC Clang

https://reviews.llvm.org/D42645



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to