ecos_kernel_test: check if addr_errors_corrected is mapped before access

Change-Id: I08e751feeffc41a51312b8a9ad4b28a57a45a487
This commit is contained in:
Christoph Borchert
2016-09-09 10:46:41 +02:00
parent 9886a0345e
commit 3c6502a111

View File

@ -756,7 +756,7 @@ bool EcosKernelTestExperiment::faultInjection() {
result->set_latest_ip(simulator.getCPU(0).getInstructionPointer());
// record error_corrected regardless of result
if (addr_errors_corrected != ADDR_INV) {
if ( (addr_errors_corrected != ADDR_INV) && mm.isMapped(addr_errors_corrected) ) {
int32_t error_corrected = mm.getByte(addr_errors_corrected);
result->set_error_corrected(error_corrected ? result->TRUE : result->FALSE);
} else {