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
This crash occurs specifically during the multiplication of i127 items; employing different types or operators will avoid this crash. The panic arises in the "from" function, suggesting that the compiler attempts to inexplicably cast the i127 item to another type.
The panic crash occurs with the latest compiler version of the main branch. The error message is as follows:
The application panicked (crashed).
Message: Cannot convert i128 as a string to a field element
Location: /home/afredefon/.nargo/noir-lang/noir/acvm-repo/acir_field/src/generic_ark.rs:105
To Reproduce
Create a Noir project with the following command: nargo new test_issue
Paste the code below into the file main.nr
Compile the project using the following command: nargo compile
fnmain(){// Crashes if we perform multiplication between two i127 items; the values of the items and the result of the multiplication seem to not matter.let var1:i127 = 1*1;// This crashes as well because of the multiplication in the assert statement.let var2 = 1;assert(var2 * var2 == 1);// Same crash when we cast to i127 in the multiplication operation.let var3:Field = 45;assert((var3 asi127)*(var3 asi127) == 1);// No crash with other operators.let var4:i127 = 1 / 1;// No crash with other types, even with u127.let var5:Field = 1*1;}
Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered:
pventuzelo
changed the title
Compilerpanic when performing multiplication between i127 items.
Compiler panic when performing multiplication between i127 items.
Jan 23, 2024
Aim
We (https://github.com/FuzzingLabs) find that the compiler panics and crashes when we perform a multiplication between i127 items.
Expected Behavior
No crash.
Bug
This crash occurs specifically during the multiplication of i127 items; employing different types or operators will avoid this crash. The panic arises in the "from" function, suggesting that the compiler attempts to inexplicably cast the i127 item to another type.
The panic crash occurs with the latest compiler version of the main branch. The error message is as follows:
To Reproduce
nargo new test_issue
main.nr
nargo compile
Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: