Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bit length vs Byte length bug fix in string_length #345

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

zwimer
Copy link
Member

@zwimer zwimer commented Mar 24, 2023

Bit length vs Byte length bug fix in string_length

@zwimer zwimer self-assigned this Mar 24, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2023

Test Results

     96 files  +     86       96 suites  +86   1h 32m 17s ⏱️ + 1h 31m 43s
1 467 tests +1 161  1 376 ✔️ +1 130  90 💤 +30  0 ±0  1 🔥 +1 
1 473 runs  +1 167  1 382 ✔️ +1 136  90 💤 +30  0 ±0  1 🔥 +1 

For more details on these errors, see this check.

Results for commit 6b81e46. ± Comparison against base commit 4b21cf9.

♻️ This comment has been updated with latest results.

@zwimer zwimer changed the title Bug fix Bit length vs Byte length bug fix in string_length Mar 24, 2023
@zwimer zwimer requested a review from rhelmot March 24, 2023 02:34
@zwimer
Copy link
Member Author

zwimer commented Mar 24, 2023

@rhelmot In case it is unintended, making an IntToStr with args (<BV32 0xc>,) and kwargs {'length': 80000, 'uninitialized': None} leads to the eager backend logic in __new__ invoking leading to creating a different AST with a different length.

I.e. The output length is 16 bits long instead of 80000 bits.

I updated the PR to keep .length and .bit_length sync'd given this, but it might be worth a look if that isn't expected.

@twizmwazin twizmwazin force-pushed the fix/claripy_strings_byte_bit_length branch from 6b81e46 to 6da6550 Compare July 22, 2024 20:30
@twizmwazin twizmwazin merged commit a2d8398 into master Jul 22, 2024
17 checks passed
@twizmwazin twizmwazin deleted the fix/claripy_strings_byte_bit_length branch July 22, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants