https://bugs.kde.org/show_bug.cgi?id=358569
Bug ID: 358569
Summary: Unhandled instructions cause creation of "orphan"
stack traces in XML output
Product: valgrind
Version: 3.11.0
Platform: Debian testing
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
When encountering unhandled instructions, Valgrind will provide a warning/error
message and a stack trace.
When running with --xml=yes, the warning will still appear in the console
output, but the stack trace will go to the XML.
Reproducible: Always
Steps to Reproduce:
Run:
valgrind --tool=<any> --xml=yes --xml-file=out.xml /program/with/unhandled/insn
In my case, I run Helgrind on ARM, on a binary that uses libcrypto and thus
runs into bug 331178.
Actual Results:
Running:
valgrind --tool=helgrind --xml=yes --xml-file=out.xml /my/program
I see on my console:
disInstr(arm): unhandled instruction: 0xEE190F1D
cond=14(0xE) 27:20=225(0xE1) 4:4=1 3:0=13(0xD)
==909== valgrind: Unrecognised instruction at address 0x4d1cbf68.
==909== Your program just tried to execute an instruction that Valgrind
==909== did not recognise. There are two possible reasons for this.
==909== 1. Your program has a bug and erroneously jumped to a non-code
==909== location. If you are running Memcheck and you just saw a
==909== warning about a bad jump, it's probably your program's fault.
==909== 2. The instruction is legitimate but Valgrind doesn't handle it,
==909== i.e. it's Valgrind's fault. If you think this is the case or
==909== you are not sure, please let us know and we'll try to fix it.
==909== Either way, Valgrind will now raise a SIGILL signal which will
==909== probably kill your program.
My XML output starts with:
<?xml version="1.0"?>
<valgrindoutput>
<protocolversion>4</protocolversion>
<protocoltool>helgrind</protocoltool>
<preamble>
<line>Helgrind, a thread error detector</line>
<line>Copyright (C) 2007-2015, and GNU GPL'd, by OpenWorks LLP et al.</line>
<line>Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright
info</line>
<line>Command: /my/program</line>
</preamble>
<pid>909</pid>
<ppid>907</ppid>
<tool>helgrind</tool>
<args>
<vargv>
<exe>/usr/local/bin/valgrind</exe>
<arg>--tool=helgrind</arg>
<arg>--xml=yes</arg>
<arg>--xml-file=out.xml</arg>
</vargv>
<argv>
<exe>/my/program</exe>
</argv>
</args>
<status>
<state>RUNNING</state>
<time>00:00:01:35.229 </time>
</status>
<stack>
<frame>
<ip>0x4D1CBF68</ip>
<obj>/lib/libcrypto.so.1.0.0</obj>
</frame>
</stack>
<announcethread>
<hthreadid>1</hthreadid>
<isrootthread></isrootthread>
</announcethread>
Expected Results:
I would suggest that the stack trace be sent to console in this case.
--
You are receiving this mail because:
You are watching all bug changes.