mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12227 from ethereum/smt_fix_gas
Fix ICE in CHC when using gas in the function options
This commit is contained in:
commit
f9ba1bf3c8
@ -24,6 +24,7 @@ Bugfixes:
|
||||
* Commandline Interface: Report output selection options unsupported by the selected input mode instead of ignoring them.
|
||||
* Commandline Interface: When linking only accept exact matches for library names passed to the ``--libraries`` option. Library names not prefixed with a file name used to match any library with that name.
|
||||
* SMTChecker: Fix internal error in magic type access (``block``, ``msg``, ``tx``).
|
||||
* SMTChecker: Fix internal error in the CHC engine when passing gas in the function options.
|
||||
* TypeChecker: Fix internal error when using user defined value types in public library functions.
|
||||
* TypeChecker: Fix internal error when using arrays and structs with user defined value types before declaration.
|
||||
* TypeChecker: Improved error message for constant variables with (nested) mapping types.
|
||||
|
@ -791,8 +791,8 @@ void CHC::externalFunctionCall(FunctionCall const& _funCall)
|
||||
valueIndex = i;
|
||||
break;
|
||||
}
|
||||
solAssert(valueIndex, "");
|
||||
state().addBalance(state().thisAddress(), 0 - expr(*callOptions->options().at(*valueIndex)));
|
||||
if (valueIndex)
|
||||
state().addBalance(state().thisAddress(), 0 - expr(*callOptions->options().at(*valueIndex)));
|
||||
}
|
||||
|
||||
auto preCallState = vector<smtutil::Expression>{state().state()} + currentStateVariables();
|
||||
|
@ -0,0 +1,9 @@
|
||||
library L {
|
||||
function f() public view {
|
||||
(bool success, ) = address(10).staticcall{gas: 3}("");
|
||||
require(success);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// SMTEngine: all
|
||||
// ----
|
Loading…
Reference in New Issue
Block a user