| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Makes sure that the script works fine both in python2 and python3.
Patch by Pavel Samolysov!
Differential Revision: https://reviews.llvm.org/D71746
|
|
|
|
|
|
| |
It's less confusing for newcomers.
llvm-svn: 375282
|
|
|
|
|
|
| |
It shouldn't say "unspecified" when the state is specified to be empty.
llvm-svn: 375279
|
|
|
|
|
|
|
|
|
|
|
| |
ExplodedGraph nodes will now have a numeric identifier stored in them
which will keep track of the order in which the nodes were created
and it will be fully deterministic both accross runs and across machines.
This is extremely useful for debugging as it allows reliably setting
conditional breakpoints by node IDs.
llvm-svn: 375186
|
|
|
|
|
|
|
| |
Because cast expressions have their own hierarchy, it's extremely useful
to have some information about what kind of casts are we dealing with.
llvm-svn: 375185
|
|
|
|
|
|
| |
The 50% grey color is too dark on some monitors.
llvm-svn: 375184
|
|
|
|
|
|
|
|
|
| |
They're useful when trying to understand what's going on
inside your LazyCompoundValues.
Differential Revision: https://reviews.llvm.org/D65427
llvm-svn: 368769
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When -trim-egraph is unavailable (say, when you're debugging a crash on
a real-world code that takes too long to reduce), it makes sense to view
the untrimmed graph up to the crashing node's predecessor, then dump the ID
(or a pointer) of the node in the attached debugger, and then trim
the dumped graph in order to keep only paths from the root to the node.
The newly added --to flag does exactly that:
$ exploded-graph-rewriter.py ExprEngine.dot --to 0x12229acd0
Multiple nodes can be specified. Stable IDs of nodes can be used
instead of pointers.
Differential Revision: https://reviews.llvm.org/D65345
llvm-svn: 368768
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explorers aren't the right abstraction. For the purposes of displaying svg files
we don't care in which order do we explore the nodes. We may care about this for
other analyses, but we're not there yet.
The function of cutting out chunks of the graph is performed poorly by
the explorers, because querying predecessors/successors on the explored nodes
yields original successors/predecessors even if they aren't being explored.
Introduce a new entity, "trimmers", that do one thing but to it right: cut out
chunks of the graph. Trimmers mutate the graph, so stale edges aren't even
visible to their consumers in the pipeline. Additionally, trimmers are
intrinsically composable: multiple trimmers can be applied to the graph
sequentially.
Refactor the single-path explorer into the single-path trimmer.
Rename the test file for consistency.
Differential Revision: https://reviews.llvm.org/D65344
llvm-svn: 368767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the default behavior: the tool no longer dumps the rewritten .dot file
to stdout, but instead it automatically converts it into an .html file
(which essentially wraps an .svg file) and immediately opens it with
the default web browser.
This means that the tool should now be fairly easy to use:
$ exploded-graph-rewriter.py /tmp/ExprEngine.dot
The benefits of wrapping the .svg file into an .html file are:
- It'll open in a web browser, which is the intended behavior.
An .svg file would be open with an image viewer/editor instead.
- It avoids the white background around the otherwise dark svg area
in dark mode.
The feature can be turned off by passing a flag '--rewrite-only'.
The LIT substitution is updated to enforce the old mode because
we don't want web browsers opening on our buildbots.
Differential Revision: https://reviews.llvm.org/D65250
llvm-svn: 368766
|
|
|
|
|
|
|
|
| |
- Correctly display macro expansion and spelling locations.
- Use the same procedure to display location context call site locations.
- Display statement IDs for program points.
llvm-svn: 365861
|
|
|
|
|
|
| |
Fix a typo in JSON field name.
llvm-svn: 365827
|
|
|
|
|
|
|
|
|
|
| |
In this mode the rewriter will only rewrite program points
and omit program states. Useful for understanding
the rough topology of the graph.
Differential Revision: https://reviews.llvm.org/D64264
llvm-svn: 365410
|
|
|
|
|
|
|
|
|
|
| |
Instead of rewriting the whole graph, rewrite the leftmost path in the
graph. Useful for trimmed graphs that are still too large to display due
to multiple equivalent reports mixed into them.
Differential Revision: https://reviews.llvm.org/D64263
llvm-svn: 365409
|
|
|
|
|
|
|
|
| |
For accessibility!
Differential Revision: https://reviews.llvm.org/D64153
llvm-svn: 365085
|
|
|
|
|
|
|
|
|
|
|
| |
Add a label to nodes that have a bug report attached or on which
the analysis was generally interrupted.
Fix printing has_report and implement printing is_sink in the graph dumper.
Differential Revision: https://reviews.llvm.org/D64110
llvm-svn: 364992
|
|
|
|
| |
llvm-svn: 364991
|
|
|
|
|
|
|
|
|
|
| |
When printing various statements that include braces (compound
statements, lambda expressions, statement-expressions, etc.),
replace the code between braces with '...'.
Differential Revision: https://reviews.llvm.org/D64104
llvm-svn: 364990
|
|
|
|
|
|
|
|
| |
They are displayed as raw lines and diffed via difflib on a per-checker basis.
Differential Revision: https://reviews.llvm.org/D64100
llvm-svn: 364989
|
|
|
|
|
|
|
|
| |
Addresses a popular request. Activated via --dark.
Differential Revision: https://reviews.llvm.org/D64056
llvm-svn: 364882
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Take advantage of the stmt_point_kind.
- Dump block IDs for BlockEntrance nodes.
- Don't dump huge compound statements on PurgeDeadSymbols nodes.
- Rename Edge to BlockEdge for consistency.
- Tweak colors.
Differential Revision: https://reviews.llvm.org/D64051
llvm-svn: 364881
|
|
|
|
|
|
|
|
| |
This trait is Environment-like, so there was a chance to re-use a lot of code.
Differential Revision: https://reviews.llvm.org/D64047
llvm-svn: 364880
|
|
|
|
|
|
|
|
|
| |
Slightly cleanup emission of horizontal lines and unhardcode the title
for generic maps.
Differential Revision: https://reviews.llvm.org/D64041
llvm-svn: 364865
|
|
|
|
|
|
|
|
| |
Keep them on a separate line for more visibility.
Differential Revision: https://reviews.llvm.org/D63965
llvm-svn: 364864
|
|
|
|
|
|
| |
Make them span wider.
llvm-svn: 364365
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: -
Reviewers: NoQ
Reviewed By: NoQ
Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin,
mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63726
llvm-svn: 364271
|
|
|
|
|
|
|
| |
'|' is a special character in graphviz, so it needs to be properly
escaped and unescaped.
llvm-svn: 364269
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diff support included.
A cheap solution is implemented that treats range constraints as
"some sort of key-value map", so it's going to be trivial
to add support for other such maps later, such as dynamic type info.
Differential Revision: https://reviews.llvm.org/D63685
llvm-svn: 364268
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D63684
llvm-svn: 364267
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this mode the tool would avoid duplicating the contents of the
program state on every node, replacing them with a diff-like dump
of changes that happened on that node.
This is useful because most of the time we only interested in whether
the effect of the statement was modeled correctly. A diffed graph would
also be much faster to load and navigate, being much smaller than
the original graph.
The diffs are computed "semantically" as opposed to plain text diffs.
I.e., the diff algorithm is hand-crafted separately for every state trait,
taking the underlying data structures into account. This is especially nice
for Environment because textual diffs would have been terrible.
On the other hand, it requires some boilerplate to implement.
Differential Revision: https://reviews.llvm.org/D62761
llvm-svn: 363898
|
|
|
|
|
|
|
|
|
|
|
| |
Quotes around StringRegions are now escaped and unescaped correctly,
producing valid JSON.
Additionally, add a forgotten escape for Store values.
Differential Revision: https://reviews.llvm.org/D63519
llvm-svn: 363897
|
|
|
|
| |
llvm-svn: 362575
|
|
|
|
|
|
|
|
|
|
|
| |
This is a utility to improve readability and generally manipulate
GraphViz dumps of the analysis graph. Such dumps are often huge and
not only hard to read, but also often hang the viewer apps with their
mere size. Such script should significantly improve debugging experience.
Differential Revision: https://reviews.llvm.org/D62638
llvm-svn: 362340
|
|
|
|
|
|
|
|
| |
Don't bother coming up with a -cc1 run-line ourselves.
This, in particular, gets rid of a macOS-specific code path.
llvm-svn: 362009
|
|
|
|
|
|
|
|
| |
first item in the path
Differential Revision: https://reviews.llvm.org/D57783
llvm-svn: 353228
|
|
|
|
|
|
|
|
| |
Make scripts more future-proof by importing most __future__ stuff.
Differential Revision: https://reviews.llvm.org/D55208
llvm-svn: 349504
|
|
|
|
|
|
|
|
|
|
|
| |
In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create generator instead.
The portability patch consists in forcing an extra `list` call if the result is actually used as a list.
`map` are replaced by list comprehension and `filter` by filtered list comprehension.
Differential Revision: https://reviews.llvm.org/D55197
llvm-svn: 349501
|
|
|
|
|
|
|
|
|
| |
In Python2, division between integer yields an integer, while it yields a float in Python3.
Use a combination of from __future__ import division and // operator to get a portable behavior.
Differential Revision: https://reviews.llvm.org/D55204
llvm-svn: 349455
|
|
|
|
|
|
|
|
| |
Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version.
Differential Revision: https://reviews.llvm.org/D55213
llvm-svn: 349454
|
|
|
|
|
|
|
|
| |
Queue module as been renamed into queue in Python3
Differential Revision: https://reviews.llvm.org/D55202
llvm-svn: 349009
|
|
|
|
|
|
|
|
|
| |
Have all classes derive from object: that's implicitly the default in Python3,
it needs to be done explicilty in Python2.
Differential Revision: https://reviews.llvm.org/D55121
llvm-svn: 348127
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python2 supports the two following equivalent construct
raise ExceptionType, exception_value
and
raise ExceptionType(exception_value)
Only the later is supported by Python3.
Differential Revision: https://reviews.llvm.org/D55195
llvm-svn: 348126
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D52844
llvm-svn: 344990
|
|
|
|
| |
llvm-svn: 343643
|
|
|
|
|
|
|
|
| |
line, make sure it's always propagated
Differential Revision: https://reviews.llvm.org/D52801
llvm-svn: 343636
|
|
|
|
|
|
|
|
| |
analyzer options
Differential Revision: https://reviews.llvm.org/D52585
llvm-svn: 343158
|
|
|
|
|
|
|
|
|
|
| |
Ubigraph project has been dead since about 2008, and to the best of my
knowledge, no one was using it.
Previously, I wasn't able to launch the existing binary at all.
Differential Revision: https://reviews.llvm.org/D51655
llvm-svn: 341601
|
|
|
|
| |
llvm-svn: 339183
|
|
|
|
|
|
| |
Do not show statistics by default.
llvm-svn: 338323
|
|
|
|
| |
llvm-svn: 338322
|