everx-labs / TVM-Solidity-Compiler

Solidity compiler for TVM
GNU General Public License v3.0
125 stars 72 forks source link

Passing uninitialized address-type variable to format() results in a runtime exception #168

Open BorisI opened 2 months ago

BorisI commented 2 months ago
pragma ton-solidity >= 0.74.0;
contract fma {
    function foo() external pure returns (string s) {
        address v;
        s.append(format("{}\n", v));
    }
}
$ ever-cli -c etc/fma.conf debug run -m foo; tail -n11 trace.log  | head -n7

52 1893 18 NEWC fma.sol:6
53 1911 18 NULL fma.sol:6
54 1939 28 TUPLE 2 fma.sol:6
55 1961 22 PUSHSLICE x2_ fma.sol:6
56 2087 126 CALLREF stdlib.sol:215
57 2113 26 REWRITESTDADDR stdlib.sol:214
58 2163 0 UNHANDLED EXCEPTION: VM Exception: 0 1 stdlib.sol:214
IgorKoval commented 2 weeks ago

Fixed in 0.77.0