Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion tests/python/tests/ida/test_ida_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,9 +1553,21 @@ def _export(self, root_directory: Path, tmp_path: Path):
)

def test_no_decomp_inport_is_unknown(self):
"""Without decompilation, inport is untyped (.bss byte)."""
"""Without decompilation, inport is not promoted to the _WORD[300]
array.

Depending on the IDA version, the named .bss location at INPORT_ADDR is
either left as an undefined byte with no data item at all (IDA 9.3) or
materialised as an untyped byte. Either way it must not carry the
decompiler-derived array type -- that is the point of this control.
"""
if self.INPORT_ADDR not in self.prog_no_decomp.data:
# IDA 9.3: the symbol exists but the .bss byte is undefined, so no
# data item is exported. Not promoted -> control satisfied.
return
data = self.prog_no_decomp.data[self.INPORT_ADDR]
assert data.name == "inport"
assert not isinstance(data.type, ArrayType)
assert isinstance(data.type, BaseType)
assert data.type == BaseType.UNKNOWN

Expand Down
Loading