diff options
author | iximeow <me@iximeow.net> | 2021-09-28 19:48:39 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2021-09-28 19:48:39 -0700 |
commit | ce99ad8e8e5260f3a8bac896e14faf54f0df6c58 (patch) | |
tree | 8daf5ccfd77d27ffaafa915a1e1f6608ce80a105 /test/armv7 | |
parent | 23bd0b37482a127c8f954ce7e068a507b9c1e09e (diff) |
fix various armv8 and armv8 panics that should be Err.
in fact the decoder should _never_ panic. included here are tests that
cover the entire 32-bit instruction space and ensure that decoding and
display do not panic. these tests run uncomfortably slowly (1168s to
decode the 4b "instruction" sequences on my desktop), but verify that
panics are no longer an issue.
Diffstat (limited to 'test/armv7')
-rw-r--r-- | test/armv7/thumb.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/armv7/thumb.rs b/test/armv7/thumb.rs index fafc65c..c74da37 100644 --- a/test/armv7/thumb.rs +++ b/test/armv7/thumb.rs @@ -77,6 +77,11 @@ fn test_display(data: &[u8], expected: &'static str) { } #[test] +fn test_unpredictable_instructions() { + test_invalid(&[0x80, 0xfa, 0x40, 0x00]); +} + +#[test] fn test_decode_add_cases() { test_display( &[0x01, 0x44], |