8000 Error: block size must be a multiple of size · Issue #9 · uw-unsat/serval · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Error: block size must be a multiple of size #9

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 8635 related emails.

Already on GitHub? Sign in to your account

Open
yuzeng2333 opened this issue Jan 31, 2022 · 0 comments
Open

Error: block size must be a multiple of size #9

yuzeng2333 opened this issue Jan 31, 2022 · 0 comments

Comments

@yuzeng2333
Copy link
yuzeng2333 commented Jan 31, 2022

I am doing a simple experiment with arrays in c. The c code is:

`int vec0[5];

int vec_func(int num) {
vec0[0] = 1;
vec0[1] = 2;
vec0[2] = 3;
vec0[3] = 4;
vec0[4] = 5;

return vec0[num];
}`

And here is the partial code for checking:

`(define (check-vec)
(parameterize ([llvm:current-machine (llvm:make-machine cpp:symbols cpp:globals)])

; symbolic inputs
(define-symbolic num (bitvector 32))

; symbolic result
(define r (cpp:@vec_func num))

(define sol
  (solve
   (begin
     (assume (bvsle num 5))
     (assert (not equal? r 3))
    )
  )
)
sol

))

`
But when I ran the checking, an error is reported:

[assert] ~/serval/serval/lib/memory/mblock.rkt:254 mcell-path: block size (bv #x0000000000000001 64) must be a multiple of size (bv #x0000000000000004 64)

I am writing and reading int from the array, so the block size should be 4 byte. why the error says block size is #x0000000000000001?
It seems the "element-size" in mblock.rkt has some problem: it always returns 1 for the integer array, even though its element type is int.

Update: I just find the same error happens for provided array.c in the test folder.

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

1 participant
0