[PATCH] [StaticAnalyzer]Handle Destructor call generated by C++ delete expr

Karthik Bhat kv.bhat at samsung.com
Thu Sep 19 02:18:07 PDT 2013


  Oops thanks for catching the crash. I was not able to see it in release mode when i tested.

  The crash is due to the type of node we are creating.
  We are trying to use StmtNodeBuilder to create a node when actually we do not have a Stmt associated with it!

  What i think we need here is to create a node with PostImplicitCall.

  When we enqueue it onto worklist we do not create extra nodes corresponding to this implicit call stmt and move to the next CFG element. This fixes the crash found in regression on debug mode.

  Thanks!

Hi jordan_rose, zaks.anna,

http://llvm-reviews.chandlerc.com/D1594

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D1594?vs=4320&id=4392#toc

Files:
  lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  lib/StaticAnalyzer/Core/ExprEngine.cpp
  lib/StaticAnalyzer/Core/CallEvent.cpp
  test/Analysis/new.cpp
  test/Analysis/NewDelete-checker-test.cpp
  include/clang/Analysis/CFG.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1594.7.patch
Type: text/x-patch
Size: 7881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130919/a11ec0eb/attachment.bin>


More information about the cfe-commits mailing list