Recover and verify static collision traversal and body contracts
This commit is contained in:
1 parent
7c0d1a4b0c
commit
df0263b26e
34 files changed
+1962
-17
No files matched your search
@@ -0,0 +1,21 @@
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT/'tools/binary'))
|
||||
from body_step_evidence import collect
|
||||
|
||||
|
||||
class BodyStepEvidenceTests(unittest.TestCase):
|
||||
def test_guarded_source_bodies_and_explicit_relocations(self):
|
||||
report = collect(ROOT.parent/'Original')
|
||||
self.assertEqual(len(report['bodies']), 15)
|
||||
operands = report['probe_operands']
|
||||
self.assertEqual(len({item['va'] for item in operands}), len(operands))
|
||||
targets = {item['target'] for item in operands}
|
||||
self.assertTrue({0x4f69e5, 0x5cfc7c, 0x695d54, 0x695d58}.issubset(targets))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user