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
The Ohm parser generator uses recursion to parse nested items in expressions and throws a stack overflow exception for deeply nested expression like the following:
contract Foo {
get fun foo(): Int { return
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
}
}
Here is the exact error message:
💼 Compiling project test ...
Tact compilation failed
RangeError: Maximum call stack size exceeded
at Apply.evalOnce (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2252:36)
at Apply.reallyEval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2192:20)
at Apply.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2147:14)
at MatchState.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:3474:22)
at Alt.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2019:15)
at MatchState.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:3474:22)
at Apply.evalOnce (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2256:13)
at Apply.reallyEval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2192:20)
at Apply.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2147:14)
at MatchState.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:3474:22)
This can be mitigated or solved in various ways, but for now we need to document the limitation to finish the security audit process.
The text was updated successfully, but these errors were encountered:
The Ohm parser generator uses recursion to parse nested items in expressions and throws a stack overflow exception for deeply nested expression like the following:
Here is the exact error message:
💼 Compiling project test ... Tact compilation failed RangeError: Maximum call stack size exceeded at Apply.evalOnce (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2252:36) at Apply.reallyEval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2192:20) at Apply.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2147:14) at MatchState.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:3474:22) at Alt.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2019:15) at MatchState.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:3474:22) at Apply.evalOnce (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2256:13) at Apply.reallyEval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2192:20) at Apply.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:2147:14) at MatchState.eval (/Users/anton-m1/ton/tact/node_modules/ohm-js/dist/ohm.cjs:3474:22)
This can be mitigated or solved in various ways, but for now we need to document the limitation to finish the security audit process.
The text was updated successfully, but these errors were encountered: