ASSERT: When running codec.py to generate aarch64 instructions, error triggers exception
Created by: joshua-warburton
Describe the bug When building and an invalid encoding is set in codec.txt codec.py should display a helpful error telling you exactly where the error is. Unfortunately, there is a bug in creating the error and it throws a TypeError instead
Traceback (most recent call last):
File "./codec.py", line 489, in <module>
main()
File "./codec.py", line 477, in main
consistency_check(patterns, opndtab)
File "./codec.py", line 413, in consistency_check
pattern_to_str(p)))
TypeError: pattern_to_str() takes exactly 4 arguments (1 given)
To Reproduce Steps to reproduce the behavior:
- Change an instruction so that not all of the masked bits are accounted for, such as:
0x001101010000001100xxxxxxxxxxxx n ld1r q0 : memvr
- Run codec.py
Expected behavior A traceback like below should be printed
Traceback (most recent call last):
File "./codec.py", line 489, in <module>
main()
File "./codec.py", line 477, in main
consistency_check(patterns, opndtab)
File "./codec.py", line 413, in consistency_check
pattern_to_str(*p)))
Exception: Unhandled bits:
x in:
0x1011110xxxxxxx001001xxxxxxxxxx urshr d0 : d5 sd_sz immhb
Versions
- What version of DynamoRIO are you using?
- HEAD
- Does the latest build from https://github.com/DynamoRIO/dynamorio/releases solve the problem?
- No
- What operating system version are you running on? ("Windows 10" is not sufficient: give the release number.)
- N/A
- Is your application 32-bit or 64-bit?
- N/A