Open BigGan opened 4 years ago
Thanks. Can you please create a Pull Request with the test case that causes the null dereference and the fix?
Thanks. Can you please create a Pull Request with the test case that causes the null dereference and the fix?
OK. I have committed a new Pull Request !
Problem
I found that VERISOL will throw an exception "VeriSol translation error: Object reference not set to an instance of an object." when my solidity code contain the to.call.value(amount)("");.
Cause
In the function TranslateCallStatement (Sources/SolToBoogie/ProcedureTranslator.cs), the parameter outParams may be null. However, This code BoogieIdentifierExpr tmpVarExpr = outParams[0]; will call directly outParams[0] without judging whether the outParams is null.
So, before the BoogieIdentifierExpr tmpVarExpr = outParams[0];, we need to judge wether outParams is null. The Fixed code as follow: