Commit Graph

467 Commits

Author SHA1 Message Date
Bhargava Shastry
22f5a82edc yul proto: Add support for generating for and switch statements. 2019-03-20 18:50:27 +00:00
Bhargava Shastry
6c1d0b62b5 Adds oss-fuzz harnesses to fuzz AssemblyStack API calls for parsing/optimizing StrictAssembly and generating EVM bytecode. 2019-03-20 16:06:45 +01:00
chriseth
8514c0bc60 Provide max iterations for stack compressor as parameter. 2019-03-20 15:07:05 +01:00
chriseth
38cbf8d230 Pass "optimize stack allocation" flag down to the stack compressor. 2019-03-20 15:03:27 +01:00
chriseth
304ef77b4a
Merge pull request #6300 from ethereum/extractedTestsEVMVersionRules
Support EVM Version rules for extracted tests.
2019-03-18 15:29:04 +01:00
Daniel Kirchner
a178486436 Review suggestions. 2019-03-18 14:34:00 +01:00
chriseth
834c23fc38
Merge pull request #6289 from ethereum/strictasm_fuzzer_ascii_only
Discard fuzz input containing non ASCII character(s).
2019-03-18 11:44:06 +01:00
Bhargava Shastry
725fc898fd Discard fuzz input containing at least one character not in the following set: "isprint"able, newline, and horizontal
Co-Authored-By: bshastry <bshastry@ethereum.org>
2019-03-18 10:36:43 +01:00
Daniel Kirchner
4a28e1eb43 Support EVM Version rules for extracted tests. 2019-03-15 17:23:20 +01:00
Bhargava Shastry
5e8ed426df Add more binary operations to the yul proto spec. 2019-03-14 22:26:25 +01:00
Bhargava Shastry
5681086d2c Proto spec and translator bug fixes. 2019-03-14 15:40:54 +01:00
chriseth
db379403fc Fix assertion in yul interpreter. 2019-03-13 20:58:15 +01:00
Christian Parpart
05e2d362c8 [Yul] Adds break/continue statements and some general tests for for-loop syntax. 2019-03-11 15:05:05 +01:00
Bhargava Shastry
54d0d153fa Reduce input file size for solc and constant optimizer fuzzers. 2019-03-06 11:35:22 +01:00
chriseth
4740dc62df
Merge pull request #6193 from ethereum/yul-opt-different-types-6181
YulOpt: Extend StructuralSimplifier to work with all types
2019-03-05 19:11:13 +01:00
Mathias Baumann
921d52bfcd Move Literal to u256 conversions to extra functions
That way we can reuse them at different places
2019-03-05 18:39:27 +01:00
Bhargava Shastry
a370551ea2 ossfuzz: Reduce test input size to less than equal to 600 bytes. 2019-03-05 16:55:55 +01:00
Bhargava Shastry
d9bcbe6ad5 LibProtobuf Mutator (LPM) based fuzzer for yul subset 2019-03-05 12:32:55 +01:00
chriseth
bbda89c428 Create a differential fuzzer using tracing facility from the yul interpreter. 2019-03-04 20:44:17 +01:00
chriseth
38831e885d
Merge pull request #5855 from ethereum/cp
[Yul] Variable Name Canonicalization
2019-03-04 17:58:45 +01:00
Christian Parpart
609855546e Yul: Adds optimizer pass to make variable names suffix-canonical. 2019-03-04 17:26:56 +01:00
chriseth
9a949c1bda Set default EVM version to Petersburg. 2019-03-04 14:53:00 +01:00
Alex Beregszaszi
ecd246aeb6 Support petersburg in evmVersion 2019-03-04 14:10:41 +01:00
Bhargava Shastry
c48cc19fae yulInterpreter: Fix u256 overflow in logMemory. 2019-02-28 16:42:50 +01:00
chriseth
5123a2afa7 Allow positional arguments for yulrun. 2019-02-27 11:44:09 +01:00
chriseth
514c9910aa Fix implementation of signextend. 2019-02-26 17:56:32 +01:00
Erik Kundt
e4182e2add Fixes wrong EVMVersion namespace in yulrun. 2019-02-25 15:56:17 +01:00
chriseth
70bbdd8fac
Merge pull request #3464 from ethereum/iulia_interp
Yul interpreter
2019-02-25 15:38:41 +01:00
Leonardo Alt
2405b2151a EVMVersion in langutil namespace instead of solidity 2019-02-25 15:29:57 +01:00
chriseth
cc88c517a2 Review changes. 2019-02-25 11:58:37 +01:00
Bhargava Shastry
d564c24f30 POP is actually a valid instruction. 2019-02-25 11:58:37 +01:00
chriseth
0e471ab811 Review comments. 2019-02-25 11:58:37 +01:00
chriseth
5eb155b894 Interpreter tests. 2019-02-25 11:58:36 +01:00
chriseth
e91be8222c Yul interpreter executable. 2019-02-25 11:57:48 +01:00
chriseth
0c432a861c Yul interpreter. 2019-02-25 11:57:48 +01:00
chriseth
7f5b335b47 Make EVM version part of EVM dialect. 2019-02-21 21:59:46 +01:00
chriseth
6a1e339b9d
Merge pull request #6068 from ethereum/fix-no-color
Fix isoltest --no-color option
2019-02-21 17:08:10 +01:00
chriseth
98012135c6
Merge pull request #6060 from ethereum/soltest-formatting
[soltest] Create dedicated formatting
2019-02-21 16:43:50 +01:00
Mathias Baumann
7a40088d95 Fix isoltest --no-color option 2019-02-21 16:42:23 +01:00
Erik Kundt
d1ad431887 Moves soltest function call to separate class. 2019-02-21 16:39:31 +01:00
Mathias Baumann
1672902abb Unify isoltest and soltest options code
Also provide a default value for ipc-path, which is the same one as aleth uses.
2019-02-21 14:04:39 +01:00
Mathias Baumann
f4110b295b Use env variable to get IPC path for isoltest 2019-02-21 13:27:24 +01:00
Erik Kundt
dacad629ef Adds semantic tests to test framework and isoltest. 2019-02-15 13:27:15 +01:00
Erik Kundt
190634e1f9 Implements infrastructure for semantic tests. 2019-02-13 13:05:58 +01:00
chriseth
91d224dfb6
Merge pull request #5966 from ethereum/AnsiColorized
Adapts tests/ to use AnsiColorized (the generalized/moved version of FormattedScope, which in turn is removed in this PR)
2019-02-11 16:41:14 +01:00
Christian Parpart
53f9be8a23 Adapts tests/ to use AnsiColorized (the generalized/moved version of FormattedScope, which in turn is removed in this PR) 2019-02-11 16:00:24 +01:00
chriseth
83083d2208 Stack compressor. 2019-02-11 15:48:29 +01:00
Bhargava Shastry
4cac45dc4a Add fuzzer config files for oss-fuzz and a solidity fuzzing dictionary.
Update ossfuzz README.md.
2019-02-04 15:58:41 +01:00
chriseth
bb46e91677
Merge pull request #5891 from ethereum/const-opt-assembly
Take only Assembly instance as an input to ConstantOptimiser
2019-01-31 18:54:12 +01:00
Alex Beregszaszi
ae1cd252b0 Take only Assembly instance as an input to ConstantOptimiser 2019-01-31 16:02:29 +00:00
Alex Beregszaszi
554511b68e Introduce solidity_free in libsolc 2019-01-31 15:53:55 +00:00
Alex Beregszaszi
1276f3c4f3 Clean up includes in the fuzzer 2019-01-29 16:14:51 +00:00
Alex Beregszaszi
0e2b43e141 Pass by reference in fuzzer 2019-01-29 16:14:48 +00:00
Alex Beregszaszi
c537321309 Add more debuggin in the fuzzer 2019-01-29 16:08:25 +00:00
Alex Beregszaszi
c19afd5ad3 Fix fuzzer_common to keep assembly intact 2019-01-28 16:18:49 +00:00
Alex Beregszaszi
06998bc8e1 Run constant optimiser on fresh inputs in the fuzzer 2019-01-28 10:40:33 +00:00
Bhargava Shastry
24b1de7df0 This PR refactors and shares oss-fuzz specific test harness code with the afl fuzzer harness. ChangeLog updated. 2019-01-23 11:06:25 +01:00
Daniel Kirchner
29f66b2674 Stabilize SSAReverser. 2019-01-17 21:05:32 +01:00
Daniel Kirchner
6de2d92f20 Add SSAReverser to the yul optimiser. 2019-01-17 20:37:43 +01:00
Daniel Kirchner
81f24f24e6 Add equivalent function combiner as Yul optimizer step. 2019-01-15 17:21:03 +01:00
chriseth
5b73c2ae3b Take special functions that require literals into account. 2019-01-07 17:23:38 +01:00
chriseth
9222eff08f Make the dialect available everywhere. 2019-01-07 16:41:03 +01:00
chriseth
2e9c70add0 Use rematerializer if variable is unreferenced or value is "cheap". 2019-01-07 14:03:32 +01:00
chriseth
bc22a25a60 Remove VarDeclPropagator. 2018-12-13 16:51:10 +01:00
chriseth
fb3a0ac1c7 Codegen for object access. 2018-12-11 19:24:44 +01:00
Mathias Baumann
55d7d327c4 Have only one source where testsuits are defined 2018-12-10 16:49:33 +01:00
Daniel Kirchner
1eb60cbb39 Add structural simplifier as optimization step for Yul. 2018-12-06 18:37:35 +01:00
chriseth
b7cfa499b0 Add tests. 2018-12-06 14:43:14 +01:00
chriseth
0e8841005c
Merge pull request #5554 from ethereum/cp-SourceReferenceFormatter-refactor
[2/3] Refactor SourceReferenceFormatter (split-out data extraction & make use of new SourceLocation knowledge)
2018-12-06 14:01:39 +01:00
Christian Parpart
073b03d90c liblangutil: refactor SourceReferenceFormatter, splitting out retrieval and making use of new SourceLocation's CharStream knowledge 2018-12-06 14:01:01 +01:00
Mathias Baumann
6e5160efa0 Relax assertion about jumps in loose mode 2018-12-05 10:25:59 +01:00
chriseth
99db4e3ff4 Introduce the concept of builtin functions. 2018-12-04 12:06:33 +01:00
Christian Parpart
435f7b3b72 liblangutil: Scanner: remove superfluous sourceName field (it's in CharStream already)
Also, ParserBase::sourceName() was dead code. Eliminating it should
increase test coverage (how sneaky) :-)
2018-11-30 17:07:17 +01:00
Christian Parpart
22eff22492 liblangutil: extends CharStream to know about the respective (file-)name (and adapt codebase to it) 2018-11-29 12:45:27 +01:00
chriseth
0b474d5299
Merge pull request #5497 from ethereum/langutil-SourceReferenceFormatter
Moving SourceReferenceFormatter into langutil namespace.
2018-11-26 12:44:25 +01:00
Lazaridis
56d5dd4668 decouple TestCase class from test/libsolidity 2018-11-25 02:34:59 +02:00
Christian Parpart
aeb66905de
Moving SourceReferenceFormatter into langutil namespace. 2018-11-24 12:33:36 +01:00
chriseth
9a94e503da
Merge pull request #5491 from ethereum/libyul-as-library
Libyul as static library (version 3 ;( )
2018-11-23 17:01:18 +01:00
Christian Parpart
ec47c8946b
Isolating libyul library API into its own namespace yul. 2018-11-23 14:29:00 +01:00
Leonardo Alt
0ff4cbe51b Add SMTChecker tests for standard JSON 2018-11-23 10:51:06 +00:00
Christian Parpart
0f4ed52a71
Rewrite header paths to adapt to recent git mv of libsolidity/inlineasm to libyul 2018-11-23 11:18:57 +01:00
Christian Parpart
d67322a186 Introduce namespace langutil in liblangutil directory.
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
2018-11-21 19:13:44 +00:00
Christian Parpart
87821c53c3 Isolating files shared between Yul- and Solidity language frontend. 2018-11-21 18:58:12 +00:00
Christian Parpart
f705a45d43
[Yul] Implements a pass to rewrite for-loop's pre block into the parent's Block. 2018-11-16 13:15:41 +01:00
Alex Beregszaszi
b6c3257752 Remove old libsolc API (compileJSON, compileJSONMulti, compileJSONCallback) 2018-11-13 13:54:01 +00:00
chriseth
37766ee8e4 Add VarDeclPropagator to full suite and interactive optimizer. 2018-11-07 23:19:42 +01:00
chriseth
0e9127a7c8 Add rematerializer to interactive optimizer. 2018-10-28 13:27:21 +01:00
chriseth
f92623063d Add redundant assign and ssa. 2018-10-24 17:54:35 +02:00
chriseth
57843f790c Interactive optimizer tool. 2018-10-24 17:52:28 +02:00
Leonardo Alt
e4851cf59e [SMTChecker] Inline calls to internal functions 2018-10-15 15:11:21 +02:00
Christian Parpart
1304361b9c
Renaming namespace dev::julia to dev::yul. 2018-10-15 11:58:51 +02:00
Christian Parpart
9a4bec7e47
Renaming libjulia to libyul 2018-10-15 11:52:35 +02:00
chriseth
4607118d2e Add Yul optimizer test framework. 2018-10-11 16:59:57 +02:00
chriseth
9da62384ee Combine test path discovery. 2018-10-11 15:01:43 +02:00
chriseth
50247dc8d1 Extract test suite runs. 2018-10-11 15:01:43 +02:00
chriseth
9081f803c7 Extract function. 2018-10-11 15:01:43 +02:00
chriseth
5b5a4d0172
Merge pull request #5134 from ethereum/fuzzer-input-file
solfuzzer: adds --input-file=FILENAME command line argument (defaulting to stdin)
2018-10-10 16:00:58 +02:00
Christian Parpart
212a6e146a adds --input-file=FILENAME to solfuzzer 2018-10-10 11:13:03 +02:00
Alex Beregszaszi
9e032bff43 Use nullptr instead of NULL where appropriate 2018-10-09 18:06:39 +01:00
Alex Beregszaszi
24563dd3ce Do not use compileJSON wrapper in the fuzzer 2018-09-29 14:58:59 +01:00
Daniel Kirchner
967bb6d999 Initialize `TestTool::m_formatted`. 2018-08-07 21:23:01 +02:00
Daniel Kirchner
a6df7b1fb8 Always count all test cases in isoltest and exit early on user request. 2018-08-07 19:28:21 +02:00
Daniel Kirchner
d923926ff7 Infrastructure for extracting JSON AST tests. 2018-08-03 20:35:50 +02:00
Alex Beregszaszi
a5a61a0b77 More consistent catch statements
Also take const& in all cases.
2018-07-25 01:18:09 +01:00
Christian Parpart
05121eebd1 isoltest: adds support for properly handling ANSI escape sequences on Win32/Win64 builds. 2018-07-16 16:34:23 +02:00
Alex Beregszaszi
b248fc6436 Catch the proper exceptions in solfuzzer 2018-07-11 23:49:14 +02:00
Daniel Kirchner
14d0f8c2f1 Refactor syntax test infrastructure to prepare introducing semantics tests. 2018-06-15 10:51:40 +02:00
Daniel Kirchner
9f546cfafc Improve exception handling in soltest and isoltest. 2018-06-12 11:06:14 +02:00
Alex Beregszaszi
0bed065ee7 Fix source location assertion in isoltest 2018-05-16 15:52:43 +02:00
mingchuan
dbd0a7ed60
Fix link error when using boost shared library 2018-05-11 11:20:19 +08:00
Daniel Kirchner
f03695731b Add source locations to syntax test expectations. 2018-04-10 14:08:22 +02:00
Daniel Kirchner
6f9644add1 SyntaxTests: extend syntax tests and isoltest to support parser errors and compiler exceptions. 2018-04-03 19:54:45 +02:00
Alex Beregszaszi
8fd53c1c03
Merge pull request #3744 from ethereum/useUsrBinEditor
Use /usr/bin/editor if exists.
2018-03-21 15:28:21 +00:00
Daniel Kirchner
e68c19c47b Only consider files ending with .sol and not starting with ~ in syntax tests. 2018-03-16 12:28:21 +01:00
chriseth
ea8d5f8afc Use /usr/bin/editor if exists. 2018-03-15 18:20:23 +01:00
Daniel Kirchner
7fa892eca9 Add interactive test tool isoltest. 2018-03-15 16:23:49 +01:00
Daniel Kirchner
121f87b043 Move test tools to the subdirectory test/tools and adjust CMakeLists.txt. 2018-03-12 18:40:20 +01:00