Skip to content
Snippets Groups Projects
Commit 084589ff authored by Henri Chataing's avatar Henri Chataing
Browse files

RootCanal: Improve handling of packet parsing errors

Previously simply crashed with ASSERT when an invalid packet
was received. This was problematic for a couple reasons:
 - ASSERT is not always enabled, i.e. some code could be
   executed with invalid packets as input
 - in the android emulator context it is not desirable to
   crash the emulator when receiving an invalid packet

Instead, this patch uses the following handling code when
a parsing error is found
 - report the packet through the invalid packet handler
  (same as generating a bug report with a triggered ASSERT)
 - send a Hardware Error event to the Host to signal invalid
   behavior
 - if in debug mode trigger ASSERT, else ignore the packet

Bug: 323226412
Test: m root-canal
Flag: EXEMPT, tool change
Change-Id: Ibcb89b0fc7f405e3646cfd249a3fad88a668302b
parent e5d2e677
No related branches found
No related tags found
No related merge requests found
Loading
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