Paweł Bylica
52689e049e
helpers: Extend fnv1a implementation to support 32-bit architectures
2019-06-27 14:02:05 +02:00
Paweł Bylica
fb471ef3e7
loader: Standardize configuration syntax and add evmc_load_and_configure()
2019-06-27 13:43:51 +02:00
Paweł Bylica
45da8cfce8
loader: Use strcpy_sx() everywhere
...
Previously we used strcpy_s() standard library function on Windows, but it triggers some additional handlers in some cases. To have the same behavior use strcpy_sx() everywhere.
2019-06-27 13:39:43 +02:00
Paweł Bylica
a31c82373f
test: Rewrite an unit test to avoid UBSan warning
...
Previously in the last iteration of the for loop the value EVMC_MAX_REVISION + 1 is assigned to rev of type evmc_revision what triggers an UBSan warning.
2019-06-27 10:18:51 +02:00
Paweł Bylica
81db59cede
loader: Make error_code in evmc_load_and_create() optional
2019-06-05 16:07:49 +02:00
Alex Beregszaszi
4da65048a4
tests: precompile test doesn't needs a host context
2019-06-03 09:26:37 +01:00
Alex Beregszaszi
42f8d2522f
tests: add test case for precompile implementation
2019-06-03 09:26:37 +01:00
Paweł Bylica
8c3b3e61e6
loader: Change strcpy_sx() to be limited version of strcpy_s()
...
The strcpy_sx() now reports errors and behaves as strcpy_s() when buffer is too small (nulls the buffer). But it does not have all the checks.
2019-05-31 08:15:17 +02:00
Paweł Bylica
5757da5859
loader: Expose strcpy_sx() for testing
2019-05-31 08:15:17 +02:00
Paweł Bylica
7b02081f2e
loader: Destroy VM with incompatible ABI
...
When a VM is loaded but turns out is has incompatible ABI version it should be destroyed before reporting the loading error and returning a null handle.
Fixes https://github.com/ethereum/evmc/issues/305
2019-05-30 14:21:04 +02:00
Paweł Bylica
ba10da07d0
loader: Use new VM mock with wrong ABI version
2019-05-30 14:15:20 +02:00
Paweł Bylica
591ac7c3a8
loader: Add more interesting VM mocks for unit tests
2019-05-30 14:10:00 +02:00
Paweł Bylica
6292d1780e
cpp: Add vm::get_capabilities() method
2019-05-29 13:11:52 +02:00
Paweł Bylica
41db54802f
cpp: Add missing '#pragma once' in evmc.hpp
2019-05-29 10:46:11 +02:00
Paweł Bylica
594da7553e
cpp: Rename result::raw() to result::release_raw()
2019-05-16 08:55:55 +02:00
Paweł Bylica
8423fac003
Merge branch 'release/6.2'
...
# Conflicts:
# .bumpversion.cfg
# CHANGELOG.md
# CMakeLists.txt
# bindings/rust/evmc-sys/Cargo.toml
# bindings/rust/evmc-vm/Cargo.toml
2019-05-16 08:55:35 +02:00
Paweł Bylica
7b42c81f53
cmake: Add evmc/ prefix to ctest names
2019-05-15 14:45:10 +02:00
Paweł Bylica
0fb409ee83
cmake: Cleanup CMake script
2019-05-15 14:41:48 +02:00
Paweł Bylica
f4f2b5db01
test: Use the same generator in CMake integration tests
2019-05-15 14:37:42 +02:00
Paweł Bylica
ff14830784
Do not shadow variable names
2019-05-15 12:04:29 +02:00
Paweł Bylica
3c91910f52
cpp: Add unit test for moving evmc::result
2019-05-14 17:57:59 +02:00
Paweł Bylica
577340763c
cpp: Include <vector> to show MSVC compilation error
...
This is related to misuse of `std::swap<evmc_result>`. We should not use explicit template arguments, because this disabled SFINAE and forces instantiation of all overloads.
2019-05-14 16:13:00 +02:00
Paweł Bylica
60c666a612
cpp: Add unit test for evmc::result RAII
2019-05-14 16:13:00 +02:00
Paweł Bylica
3b834de095
helpers: Handle results with null release() method
2019-05-09 22:14:20 +02:00
Paweł Bylica
2e9bd6ffc5
examples: Add "Precompiles VM" example
2019-05-09 16:04:06 +02:00
Paweł Bylica
018ff5b2f0
Add experimental PRECOMPILES capability
2019-05-09 16:04:05 +02:00
Paweł Bylica
3779b533a1
vmtester: Change tests for result::create_address
2019-05-09 13:20:56 +02:00
Alex Beregszaszi
3173a07510
vmtester: move capabilities test earlier
2019-05-09 09:59:37 +02:00
Alex Beregszaszi
d5fc3c2724
test: Include helpers.h in compilation tests
2019-05-09 09:11:27 +02:00
Paweł Bylica
d0a92e6202
vmtester: Workaround MSVC C++17 compilation issue
2019-05-06 12:33:04 +02:00
Paweł Bylica
489d832a5c
cpp: Extend Host::call() unit test to show double free bug
2019-04-29 15:47:55 +02:00
Paweł Bylica
39162766df
Update copyright year, include the years of files creation
2019-04-24 18:36:28 +02:00
Paweł Bylica
a304db5c2d
test: Use loader error messages in vmtester
2019-04-24 15:02:57 +02:00
Paweł Bylica
4484a8b74a
loader: Add loading error messages
2019-04-24 15:02:56 +02:00
Paweł Bylica
51fe9f48d4
loader: Abstract and mock evmc_last_error_msg()
2019-04-24 15:02:56 +02:00
Alex Beregszaszi
13cdfd7b40
vmtester: add test case for CREATE
2019-04-24 12:08:49 +01:00
Alex Beregszaszi
cd993e1388
vmtester: better way to avoid compiler optimisations
2019-04-24 11:47:30 +01:00
Alex Beregszaszi
a2b011e334
vmtester: dereference if output_data is present
2019-04-24 10:58:26 +01:00
Alex Beregszaszi
feecf65d29
Merge pull request #238 from ethereum/vmtester-reorder
...
vmtester: reorder tests to have the simple ones first
2019-04-24 09:41:59 +01:00
Alex Beregszaszi
a1e0a0cb9e
vmtester: do not crash if create_vm returns nullptr
2019-04-24 10:38:52 +02:00
Alex Beregszaszi
c6bdf32fa9
vmtester: reorder tests to have the simple ones first
2019-04-24 09:34:13 +01:00
Paweł Bylica
14c5356ae6
loader: Expose DLL load errors with evmc_last_error_msg()
...
Currently only works for errors by dlopen() on Linux and macos, otherwise returns NULL.
2019-04-16 18:06:54 +02:00
Paweł Bylica
2717741286
CMake: Add cmake package integration tests
2019-04-02 14:08:23 +02:00
Paweł Bylica
68ffbc1a2d
CMake: Clean up vmtester tests prefix
2019-04-02 13:32:20 +02:00
Paweł Bylica
d3d21e00fc
CMake: Add test "vmtester examplevm"
2019-04-02 13:31:05 +02:00
Paweł Bylica
fcc067dd73
CMake: Add unittests to CTest
2019-04-02 13:15:00 +02:00
Paweł Bylica
61542e0444
CMake: Rename evmc-test to evmc-unittests
2019-04-02 12:36:08 +02:00
Paweł Bylica
e824942149
cpp: Make HostContext to implement HostInterface
2019-04-02 11:28:21 +02:00
Paweł Bylica
1a3ca7618d
cpp: Rename host to HostContext
2019-04-02 11:28:21 +02:00
Paweł Bylica
d5aad34707
vmtester: CLI parsing refactoring
2019-03-25 13:10:08 +01:00