You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a compiler crash when compiling a program with a large constant.
Environment
Compiler version: 0.8.7
Operating system: Ubuntu 22.04.2 LTS
Steps to Reproduce
Save the following code as src.zok:
def main(private field a) {
assert(a > 8000000000000000000000000000000000000000000000000000000000000000000000000000 && a > 1);
}
The compile the code with:
zokrates compile -i src.zok
The compiler will crash with the following error:
Compiling src.zok
The compiler unexpectedly panicked
panicked at 'assertion failed: res.len() <= to', /home/Safarah4783/ZoKrates/zokrates_codegen/src/lib.rs:2020:21
This is unexpected, please submit a full bug report at https://github.com/Zokrates/ZoKrates/issues
However, if you remove the assertion condition that a > 1, the compiler will compile the code successfully.
def main(private field a) {
// Remove the `&& a > 1` part
assert(a > 8000000000000000000000000000000000000000000000000000000000000000000000000000);
}
The text was updated successfully, but these errors were encountered:
Description
I encountered a compiler crash when compiling a program with a large constant.
Environment
Steps to Reproduce
Save the following code as
src.zok
:The compile the code with:
The compiler will crash with the following error:
However, if you remove the assertion condition that
a > 1
, the compiler will compile the code successfully.The text was updated successfully, but these errors were encountered: