chriseth
f113f8e4a0
Implement datasize, dataoffset and datacopy for yul interpreter.
2019-05-06 16:59:47 +02:00
Bhargava Shastry
2d1faf53be
Reset loop state (to default) before interpreting for-loop post block
2019-05-02 22:22:19 +02:00
Bhargava Shastry
a5524983f9
[Proto fuzzer]: Add terminating opcodes
2019-05-02 15:34:26 +02:00
Bhargava Shastry
ac7bfec2c0
Support generation of calldata, code, extcode and returndata opcodes
2019-05-02 10:14:25 +02:00
Bhargava Shastry
d894ffad16
Proto fuzzer: Add missing memory and log opcodes and fix visitation bug
...
for ternary ops
2019-04-30 14:18:00 +02:00
chriseth
1d5559c350
Merge pull request #6554 from ethereum/add-ternary-ops
...
ossfuzz: Generate addmod and mulmod builtin functions
2019-04-19 00:41:57 +02:00
Bhargava Shastry
836c466f09
ossfuzz: Generate addmod and mulmod builtin functions
2019-04-18 14:21:02 +02:00
Bhargava Shastry
68b7f40184
ossfuzz: Fixes buggy generation of duplicate case literals
2019-04-18 14:12:23 +02:00
chriseth
87a4ce2679
Merge pull request #6540 from ethereum/add-for-break-continue
...
Generate break and continue statements inside for loop body.
2019-04-18 12:57:40 +02:00
Bhargava Shastry
6f673f5e81
Generate break and continue statements inside for loop body.
2019-04-17 13:02:47 +02:00
chriseth
669df0d1e5
Allow more filters and rename member.
2019-04-17 12:00:01 +02:00
Erik Kundt
827e13a2d7
Refactors passing of options in isoltest.
2019-04-17 11:36:14 +02:00
Erik Kundt
11087422d6
Adds --test | -t option to isoltest.
2019-04-17 11:36:14 +02:00
Daniel Kirchner
a4fbb06c2a
Merge pull request #6491 from ethereum/increase-maxSteps-for-opt-yul
...
Increase upper bound for number of interpreted steps for optimized code
2019-04-12 12:34:47 +02:00
Bhargava Shastry
484c14af81
Increase upper bound for number of interpreted steps for optimized code
2019-04-10 12:57:54 +02:00
mingchuan
f1374066af
Add shortcuts for formatting error information
2019-04-10 18:44:45 +08:00
chriseth
ef413bb0b3
Throw exception to allow fuzzer to report which file it failed on.
2019-04-04 14:05:38 +02:00
Bhargava Shastry
762dd24784
Reference only those variables that are in scope.
2019-04-04 13:28:56 +02:00
Bhargava Shastry
f15cedad7a
yulInterpreter: More fine-grained exception handling
2019-04-04 13:02:55 +02:00
chriseth
aeb260cde1
Add settings framework for interactive tests.
2019-04-03 14:58:20 +02:00
Bhargava Shastry
0cc6e1cb08
Use default EVMVersion instead of a hard coded one
2019-04-02 11:40:59 +02:00
chriseth
e894e0b967
Merge pull request #6410 from ethereum/eliminate-dead-code
...
Yul Optimizer: Remove dead code
2019-04-01 18:12:47 +02:00
Mathias Baumann
e20acf5d0a
Yul Optimizer: Remove dead code
2019-04-01 17:16:04 +02:00
Mathias Baumann
30820dda99
Support multiple input files with solfuzzer
2019-04-01 16:57:32 +02:00
Mathias Baumann
101ca5c120
Fix --help parameter for solfuzzer
...
the `readStandardInput()` branch would be taken if "input-file" was not
given and only "help", thus never reaching the check for "help"
2019-04-01 15:50:34 +02:00
chriseth
3264e9abf0
Make optimiser settings available to assembly stack.
2019-03-28 18:24:13 +01:00
chriseth
2308904f68
Remove "using namespace" from header and move Instruction to dev::eth.
2019-03-28 13:48:11 +01:00
Bhargava Shastry
10c3b31fa4
yulInterpreter: Add timeout based on the number of interpreted statements.
2019-03-27 12:06:02 +01:00
Bhargava Shastry
b3c3a1f9cd
Use visitor pattern for proto converter.
2019-03-26 16:39:44 +01:00
Bhargava Shastry
ef94d6d645
yul Interpreter: Move memory size limit to interpreter state.
2019-03-26 14:42:25 +01:00
Bhargava Shastry
a895ccba39
ossfuzz: Enable optimization in Assembly stack assembler call.
2019-03-26 13:42:51 +01:00
Bhargava Shastry
d1d3dd8571
yul proto: Add support for generating string and hex literals.
2019-03-21 12:25:52 +01:00
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