[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 30 11:50:24 PDT 2018


JonasToth added a comment.

Sorry for responding so late, but i thought i get a shot to look at it. Here is the mail from Douglas Yung who was so kind to isolate the breakage and find a reproducer.
If you have the chance please take a look at it.

  Hi Jonas,
  
  I have attached a bzipped preprocessed file that I can confirm will show the failure if built with clang++ version 3.7.1, specifically the version that shipped with ubuntu 14.04.5 LTS. Here is the full version information:
  
  Ubuntu clang version 3.7.1-svn253742-1~exp1 (branches/release_37) (based on LLVM 3.7.1)
  
  Target: x86_64-pc-linux-gnu
  Thread model: posix
  
  If you build it with “clang++ -std=c++11 NotNullTerminatedResultCheck.preproc.cpp” you should see the failure.
  
  Hope this helps.
  Douglas Yung

The file is in the attachement of this comment. F7474876: NotNullTerminatedResultCheck.preproc.cpp.bz2 <https://reviews.llvm.org/F7474876>


https://reviews.llvm.org/D45050





More information about the cfe-commits mailing list