GenericExperiment: prevent integer overflow

This change prevents an integer overflow in the memory-access listener
for WRITE_OUTERSPACE.  Instead of matching all addresses above
maxima_data, l_mem_outerspace never matched in the
generic-experiment's "--catch-write-outerspace" mode.

Change-Id: I8f4ee4515af3998b7c2a8e83c7a18306c26d8d66
This commit is contained in:
Horst Schirmeier
2016-02-14 17:25:35 +01:00
parent 7168566ef5
commit e08deef9d5

View File

@ -193,7 +193,7 @@ bool GenericExperiment::cb_start_experiment() {
l_mem_outerspace.setWatchAddress(maximal_data); l_mem_outerspace.setWatchAddress(maximal_data);
l_mem_outerspace.setTriggerAccessType(MemAccessEvent::MEM_WRITE); l_mem_outerspace.setTriggerAccessType(MemAccessEvent::MEM_WRITE);
l_mem_outerspace.setWatchWidth(0xfffffff0); l_mem_outerspace.setWatchWidth(0xfffffff0 - maximal_data);
} }
if (cmd[TRAP]) { if (cmd[TRAP]) {