SOLL
SOLL copied to clipboard
SOLL is a new compiler for generate Ewasm from solidity and yul. See a demo here: https://asciinema.org/a/ezJqNLicn5fya02zwu4VXIo8a
LLVM 13
- [x] LLVM 12 - [x] LLVM 13 - [x] Fix CreateLoad warning because it is DEPRECATED for some kinds. (https://llvm.org/doxygen/classllvm_1_1IRBuilderBase.html) - [x] Add Wno-redundant-move ? (ref : https://reviews.llvm.org/D70963)
1. Wasm section size too small When copying deploy bytecode, WasmEdge will revert due to OOB https://github.com/second-state/uniswap-v2-core/blob/vincent/upgrade_to_solc_0.8.6/contracts/yul/UniswapV2ERC20.yul#L18 This error could be solved by assigning larger memory secion to wasm-ld ```...
``` // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // RUN: %soll %s contract HelloWorld { struct Test { int x; int y; } function sayHello(string _name) public pure returns (string) { return...
Input : https://github.com/second-state/SOLL/blob/master/test/solidity/Library.sol Compile with ```-fsanitize=address -fsanitize=leak``` ``` ================================================================= ==29301==ERROR: AddressSanitizer: heap-use-after-free on address 0x60700000a858 at pc 0x55bd247e2650 bp 0x7ffff339ef10 sp 0x7ffff339ef00 READ of size 8 at 0x60700000a858 thread T0...
Input : ```sol // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // RUN: %soll %s contract HelloWorld { function sayHello(string _name) public pure returns (string) { return _name; } } /*contract HelloWorld {...
For example, in function `CodeGenModule::emitCall`: https://github.com/second-state/SOLL/blob/master/lib/CodeGen/CodeGenModule.cpp#L2142 https://github.com/second-state/SOLL/blob/master/lib/CodeGen/CodeGenModule.cpp#L2156 Type of `AddressPtr` is determined by `isEVM()` or `isEWASM()`.
The caller of `let ptr := memoryguard(size)` (where `size` has to be a literal number) promises that they only use memory in either the range `[0, size)` or the unbounded...
``` let x := and("abc":uint32, add(3:uint256, 2:uint256)) ``` ``` { let zero:uint32 := 0:uint32 let v:uint256, t:uint32 := f() let x, y := g() } ```