Page MenuHomePhabricator

[analyzer] Dump stable identifiers for exploded nodes

Authored by george.karpenkov on Sep 4 2018, 5:10 PM.

Diff Detail


Event Timeline

NoQ added inline comments.Sep 5 2018, 2:11 PM
243 ↗(On Diff #163953)

Type needs to be updated.

NoQ accepted this revision.Sep 6 2018, 4:04 PM

The interesting part here is that you immediately see in which order nodes were created, which is great for debugging exploration order.

3150 ↗(On Diff #163953)


This revision is now accepted and ready to land.Sep 6 2018, 4:04 PM
This revision was automatically updated to reflect the committed changes.

Hey guys, the assertion is being triggered for me (I'm using clang r342322):

$ cat ~/main.c
void foo(unsigned width)
  int base;
  int i = 0;

  if (i % width == 0)
    base = 1;

  assert(base == 1);

$ clang -cc1 -analyze -analyzer-checker=core ~/main.c -analyzer-viz-egraph-graphviz -trim-egraph
/home/mramalho/main.c:9:3: warning: implicit declaration of function 'assert' is invalid in C99
  assert(base == 1);
Writing '/tmp/'... clang: ../tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp:288: int64_t clang::ento::ExplodedNode::getID(clang::ento::ExplodedGraph*) const: Assertion `Out && "Wrong allocator used"' failed.
Aborted (core dumped)
NoQ added a comment.Sep 15 2018, 9:52 AM

So trimmed graphs are in a different allocator?

Hey, sorry, I’ll take a look