We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have found a place where generated C++ code uses array element out of bound.
Steps to reproduce. There is a SMTLevIns template in the circomlib repository: https://github.com/iden3/circomlib/blob/master/circuits/smt/smtlevins.circom
SMTLevIns
circomlib
We create a simple circuit circuit1.circom
circuit1.circom
pragma circom 2.0.0; include "smt/smtlevins.circom"; include "comparators.circom"; component main = SMTLevIns(40);
And compile it using recent circom version to C++ code:
circom -c -l "<path_to_circomlib>/circuits" circuit1.circom
If we take a look at the SMTLevIns_1_run function inside the generated circuit1_cpp/circuit1.cpp file we can see that there is a variable declaration
SMTLevIns_1_run
circuit1_cpp/circuit1.cpp
FrElement expaux[4];
And later in the code we are trying to use the 5th element of this 4-element long array:
Fr_sub(&expaux[4],&lvar[1],&circuitConstants[1]); // line circom 98
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have found a place where generated C++ code uses array element out of bound.
Steps to reproduce. There is a
SMTLevIns
template in thecircomlib
repository: https://github.com/iden3/circomlib/blob/master/circuits/smt/smtlevins.circomWe create a simple circuit
circuit1.circom
And compile it using recent circom version to C++ code:
If we take a look at the
SMTLevIns_1_run
function inside the generatedcircuit1_cpp/circuit1.cpp
file we can see that there is a variable declarationAnd later in the code we are trying to use the 5th element of this 4-element long array:
The text was updated successfully, but these errors were encountered: