]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Fix 391861 - Massif Assertion 'n_ips >= 1 && n_ips <= VG_(clo_backtrace_size)'
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 21 Mar 2018 22:24:09 +0000 (23:24 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 21 Mar 2018 22:35:48 +0000 (23:35 +0100)
commit4c9bd311660bf4c1f9228519223214b6a50935ec
tree095e3f0cceb181f556be0568f58816357f580ff1
parent12d162aabc8180d9ad0c095e72a1354e93b091d7
Fix 391861 - Massif Assertion 'n_ips >= 1 && n_ips <= VG_(clo_backtrace_size)'

Sometimes, at least on arm platforms, we get a stack trace with
only one function.
When this happens and massif removes the top fn, we end up trying
to create an execontext of 0 ips, as the only fn is removed,
and an execontext of 0 ips causes the assert in m_execontext.c

So, do whatever to avoid to crash when having a single fn stacktrace.

The whatever means use a null execontext, which is an execontext
of one single address 0x0.
Note that this is just to bypass the crash.
What is shown by massif is not very nice (but what could we show ?).

Note that instead of using such a null execontext, we could rather
just keep the single ips. But that might create a lot of single fn
entries in the xtree and/or show undesired functions.

So, we the null execontext, which is shown as 0xFFFFFFFFFFFFFFFF ???
in the massif output.

Tested on amd64 by artificially creating stacktrace of one fn.
NEWS
massif/ms_main.c