mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix ICE when unsafe targets are solved more than once and the cex is different
This commit is contained in:
parent
dcef56a531
commit
16535aae32
@ -8,6 +8,7 @@ Compiler Features:
|
|||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
* Code Generator: Fix a crash when using ``@use-src`` and compiling from Yul to ewasm.
|
* Code Generator: Fix a crash when using ``@use-src`` and compiling from Yul to ewasm.
|
||||||
|
* SMTChecker: Fix internal error when an unsafe target is solved more than once and the counterexample messages are different.
|
||||||
|
|
||||||
|
|
||||||
### 0.8.10 (2021-11-09)
|
### 0.8.10 (2021-11-09)
|
||||||
|
@ -972,8 +972,6 @@ void CHC::resetSourceAnalysis()
|
|||||||
{
|
{
|
||||||
SMTEncoder::resetSourceAnalysis();
|
SMTEncoder::resetSourceAnalysis();
|
||||||
|
|
||||||
m_safeTargets.clear();
|
|
||||||
m_unsafeTargets.clear();
|
|
||||||
m_unprovedTargets.clear();
|
m_unprovedTargets.clear();
|
||||||
m_invariants.clear();
|
m_invariants.clear();
|
||||||
m_functionTargetIds.clear();
|
m_functionTargetIds.clear();
|
||||||
|
42
test/libsolidity/smtCheckerTests/imports/ExtCall.sol
Normal file
42
test/libsolidity/smtCheckerTests/imports/ExtCall.sol
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
==== Source: ExtCall.sol ====
|
||||||
|
interface Unknown {
|
||||||
|
function callme() external;
|
||||||
|
}
|
||||||
|
|
||||||
|
contract ExtCall {
|
||||||
|
uint x;
|
||||||
|
|
||||||
|
bool lock;
|
||||||
|
modifier mutex {
|
||||||
|
require(!lock);
|
||||||
|
lock = true;
|
||||||
|
_;
|
||||||
|
lock = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setX(uint y) mutex public {
|
||||||
|
x = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
function xMut(Unknown u) public {
|
||||||
|
uint x_prev = x;
|
||||||
|
u.callme();
|
||||||
|
assert(x_prev == x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
==== Source: ExtCall.t.sol ====
|
||||||
|
import "ExtCall.sol";
|
||||||
|
|
||||||
|
contract ExtCallTest {
|
||||||
|
ExtCall call;
|
||||||
|
|
||||||
|
function setUp() public {
|
||||||
|
call = new ExtCall();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// SMTEngine: all
|
||||||
|
// SMTIgnoreCex: yes
|
||||||
|
// ----
|
||||||
|
// Warning 6328: (ExtCall.sol:362-381): CHC: Assertion violation happens here.
|
||||||
|
// Warning 4588: (ExtCall.t.sol:110-123): Assertion checker does not yet implement this type of function call.
|
Loading…
Reference in New Issue
Block a user