From 0acfe5b2e2451a8c29455de9a8ddbfc720fdb7db Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Wed, 26 Mar 2014 14:54:17 +0100 Subject: [PATCH] TracingPlugin: cap size of memory access to 8 There are instruction in the real world, that seem to read more than 8 bytes. Therefore we cap the accesses memory to 8 and don't abort with an assertion. Change-Id: Ib2bfd0ac6dc0c030cd6a22940e31f8463a3337cf --- src/plugins/tracing/TracingPlugin.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/tracing/TracingPlugin.cc b/src/plugins/tracing/TracingPlugin.cc index b17a01ec..07263476 100644 --- a/src/plugins/tracing/TracingPlugin.cc +++ b/src/plugins/tracing/TracingPlugin.cc @@ -107,7 +107,9 @@ bool TracingPlugin::run() if (m_full_trace) { Trace_Event_Extended &ext = *e.mutable_trace_ext(); // Read the accessed data - assert(width <= 8); + if (width > 8) { + width = 8; + } uint64_t data = 0; mm.getBytes(addr, width, &data); ext.set_data(data);