[PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).

pierre gousseau via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 12:08:19 PDT 2015


pgousseau created this revision.
pgousseau added reviewers: ayartsev, zaks.anna, dcoughlin, xazax.hun, ClockMan.
pgousseau added a subscriber: cfe-commits.

Fix assertions kindly reported by Gabor Horvath and Piotr Zegar caused by commit r246345 and reverted in r246479.
Original review in http://reviews.llvm.org/D11832
Issue is caused by 'IsFirstBufInBound(...)' I wrongly assumed that no 'Unknown' values could reach it.
Added tests for unknown and tainted arguments being passed to 'memcpy' call.

Please let me know if this is an acceptable change ?

Regards,

Pierre Gousseau
SN-Systems - Sony Computer Entertainment

http://reviews.llvm.org/D12571

Files:
  include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
  lib/StaticAnalyzer/Checkers/CStringChecker.cpp
  lib/StaticAnalyzer/Core/RegionStore.cpp
  test/Analysis/pr22954.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12571.33838.patch
Type: text/x-patch
Size: 41170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150902/12eb1e83/attachment-0001.bin>


More information about the cfe-commits mailing list