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

Should uext bounds check? #20

Closed
deian opened this issue Oct 16, 2018 · 3 comments
Closed

Should uext bounds check? #20

deian opened this issue Oct 16, 2018 · 3 comments
Assignees

Comments

@deian
Copy link

deian commented Oct 16, 2018

We ran into an issue when passing -1 (which when casted to uint32_t is a huge number) to boolector_uext; boolector crashes with a segfault. Here is some Haskell code demonstrating the bug:

PLSysSec/haskell-boolector#5

We can produce C code to trigger this, but I image ya'll already have an easier/faster way to test this.

Thanks!

@mpreiner
Copy link
Member

Thanks for the report! I guess the segfault is because Boolector runs out of memory. I'll have a look.
Can you generate an API trace?

BTORAPITRACE=crash.trace <your-program>

@deian
Copy link
Author

deian commented Oct 16, 2018

new
return 0x1c9f1f0
set_opt 0x1c9f1f0 model-gen 2
set_opt 0x1c9f1f0 auto-cleanup 1
set_opt 0x1c9f1f0 incremental 1
bool_sort 0x1c9f1f0
return s1@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 1
return s1@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 2
return s2@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 4
return s3@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 8
return s4@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 16
return s5@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 32
return s6@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 64
return s7@0x1c9f1f0 
bitvec_sort 0x1c9f1f0 128
return s8@0x1c9f1f0 
constd 0x1c9f1f0 35
return n-2@0x1c9f1f0 
get_width 0x1c9f1f0 n-2@0x1c9f1f0 
return 8
uext 0x1c9f1f0 n-2@0x1c9f1f0 4294967289

@mpreiner
Copy link
Member

Thanks! Issue is fixed on master with c6de121.

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

No branches or pull requests

2 participants