Skip to content
Snippets Groups Projects
Commit f7c9917f authored by Christian Dietrich's avatar Christian Dietrich
Browse files

database-experiment: no abort on injection_instr_absolute==NULL

The injection_instr_absolute can be NULL, if the trace was imported by
--faultspace-rightmargin R. The database-experiment then aborted the
injection, since a non present injection instruction is encoded as 0,
which is != 0.

Change-Id: I0abcbf102e8b26678ea574d6f73741c2cfac6781
parent 65e4409c
No related branches found
No related tags found
No related merge requests found
......@@ -146,8 +146,12 @@ bool DatabaseExperiment::run()
found_eip = true;
}
}
if (!found_eip) {
m_log << "Invalid Injection address != 0x" << injection_instr_absolute << std::endl;
if (fsppilot->has_injection_instr_absolute() && !found_eip) {
m_log << "Invalid Injection address != 0x" << std::hex << injection_instr_absolute<< std::endl;
for (size_t i = 0; i < simulator.getCPUCount(); i++) {
address_t eip = simulator.getCPU(i).getInstructionPointer();
m_log << " CPU " << i << " EIP = 0x" << std::hex << eip << std::dec << std::endl;
}
simulator.terminate(1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment