Error: Missing branches
Here is a simple contract:
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract Test{
function p1() private returns(int) {
return 3;
}
function p2() external returns(int) {
return p1();
}
}
solc --bin-runtime a.sol outputs 6080604052348015600f57600080fd5b506004361060285760003560e01c806381d01ed314602d575b600080fd5b60336047565b604051603e91906074565b60405180910390f35b6000604f6054565b905090565b60006003905090565b6000819050919050565b606e81605d565b82525050565b6000602082019050608760008301846067565b9291505056fea26469706673582212200a7cedf97c05163dd6a5a92d897b2d089f38434e1d25e6ef981ce390a3805ba064736f6c634300080a0033
Then I tried evm_cfg_builder a.evm, the output shows ERROR:evm-cfg-builder:Missing branches p2():0x5c.
Why is the error? Thanks.
I also encountered this problem. Have you solved it?
Did you solve it?
I am having the same issue. When I compile my code using the latest compiler version it does not provide me the correct cfg. My code consists of a simple if-else loop. Is this an issue with the underlying pyevmasm library?