claripy icon indicating copy to clipboard operation
claripy copied to clipboard

Change Bits and String not to edit `ast.length`

Open zwimer opened this issue 3 years ago • 3 comments

Fix for: https://github.com/angr/claripy/issues/292

Warning: This changes the semantic meaning of String.length from byte length to bit length; use .string_length for byte length.

Also, .size() and __len__ are both defined by Bits, they also change from byte to bit length; we can override these functions in the String class if we desire before merging this.

zwimer avatar Oct 04 '22 22:10 zwimer

Unit Test Results

     91 files  +     81       91 suites  +81   1h 2m 52s :stopwatch: + 1h 2m 17s 1 393 tests +1 091  1 303 :heavy_check_mark: +1 061  90 :zzz: +30  0 :x: ±0  1 399 runs  +1 097  1 309 :heavy_check_mark: +1 067  90 :zzz: +30  0 :x: ±0 

Results for commit 3babda15. ± Comparison against base commit 51d17532.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Oct 04 '22 22:10 github-actions[bot]

The test_java.test_fauxware test is failing; which, since it is java, I assume is because of the breaking semantic change.

zwimer avatar Oct 05 '22 01:10 zwimer

Fixed the string length calculations.

The only failing test case is test_techniques.test_indirectcfi; this failed due to a timeout.

@ltfish I reran the test and it passed. I'm not sure if this is an unstable test or if this indicates an issue.

zwimer avatar Oct 05 '22 02:10 zwimer

Ping @ltfish

zwimer avatar Oct 25 '22 19:10 zwimer