segfault bug
Stephen Weeks
MLton@sourcelight.com
Sat, 24 Nov 2001 16:32:32 -0800
> I tried before the -keep dot stuff, but was confused by all the files. The
> call-graph one has a grand total of 6 nodes. Is this because everything else
> has been merged by inlining and contification?
Yep. Pretty much everything in your code gets pushed into main, which
is then too big to run dot on.
>From the docs (http://www.sourcelight.com/MLton/HTML/node13.html):
You may find it useful to use the -keep dot switch when compiling -p,
since this saves the the CPS function call graph (.call-graph.dot) for
the whole program. Also, for each CPS function f, it saves the
intraprocedural control-flow graph (.f.cfg.dot) and dominator tree
(.f.dom.dot).
> What is the -diag backend flag?
% mlton -v -z
...
-diag pass keep diagnostic info for pass
...
Pass names come from compiler sources, the "name" argument to
Control.pass.
To understand the output, which will appear in z.pass.diag, you have
to have a pretty good understanding of the pass, and the
Control.diagnostic calls that appear within the pass. For the
backend, this information includes where limit checks were placed,
register allocation, and representation decisions.
We really need a smaller test case for this bug so that we can all
work on it.