AArch64 Disassembler: Annotate undefined instructions
Discussion questions the recent commit of an AArch64 disassembler feature that annotates undefined instructions, citing potential misinterpretations and limita…
Alice Carlotti expresses concern that a recently committed feature in the AArch64 disassembler, which annotates undefined instructions, was accepted despite perceived issues. She argues it conflates 32-bit values with 64-bit addresses, has limited symbol address support, and may misinterpret instruction contents as data, questioning the value of the annotations.
- contributor
Questions a recently committed feature that annotates undefined AArch64 instructions, stating it appears to have been accepted despite issues with address handling, symbol support, and potential misinterpretations of data vs. instructions.
“The issues I see with it are that it: - Conflates 32-but values with 64-bit address, with the full address displayed as: 411030: 0040065c .inst 0x0040065c ; [func1] 411034: 00000000 udf #0 - Only supports symbols at addresses between 0 and 2^32-1 - Only supports 60% of the addresses in that range, since 40% of values are recognised as instructions. - Inte…”
In Details
This discussion revolves around a new feature in the AArch64 disassembler that attempts to provide more context for undefined instructions by annotating them with symbol information. The core issue is whether the implementation correctly resolves addresses and sufficiently distinguishes between actual executable code and arbitrary data that might coincidentally resemble instruction encodings, especially within the constraints of the AArch64 architecture.
- AArch64
- The 64-bit ARM architecture, successor to AArch32.
- Disassembler
- A tool that translates machine code (binary instructions) back into human-readable assembly language.
- Undefined Instruction
- An instruction that is not recognized by the processor's instruction set, often resulting in an exception or specific behavior.
- .inst
- An assembler directive that inserts raw machine code bytes into the output.
- Symbol
- A name given to a location in the code or data, such as a function name or a variable name, used by the linker and debugger.