Skip to content

Commit 0895290

Browse files
committed
AST: avoid crash for aggregate MOV instructions
1 parent 86d6860 commit 0895290

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

chb/app/InstrXData.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ def _expand(self) -> None:
327327
return
328328
if self.tags[0] == "nop":
329329
return
330+
if self.tags[0] == "subsumes":
331+
chklogger.logger.error(
332+
"InstrXData: subsumes tag not yet supported")
333+
return
330334
key = self.tags[0]
331335
if key.startswith("a:"):
332336
keyletters = key[2:]

chb/arm/opcodes/ARMMove.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,12 @@ def ast_prov(
220220
if xdata.instruction_is_subsumed():
221221
return self.ast_prov_subsumed(astree, iaddr, bytestring, xdata)
222222

223+
if xdata.instruction_subsumes():
224+
chklogger.logger.warning(
225+
"MOV instruction at %s is part of an aggregate that is not yet supported",
226+
iaddr)
227+
return ([], [])
228+
223229
# low-level assignment
224230

225231
(ll_lhs, _, _) = self.opargs[0].ast_lvalue(astree)

0 commit comments

Comments
 (0)