Commit Graph

23365 Commits

Author SHA1 Message Date
Daniel
d33f2734b6
Merge pull request #13952 from ethereum/fix-abstract-nondet
fix abstract nondet exception
2023-02-08 19:39:19 +01:00
Daniel
7b35f44622
Merge pull request #13953 from lemenkov/gcc_12_strings_recognition
Type recognition workaround for some GCC compilers
2023-02-08 19:36:02 +01:00
Pawel Gebal
a38549dc19 Fixes handling bitwise operators for z3 model checker 2023-02-08 18:37:17 +01:00
Peter Lemenkov
603f9f7208 Type recognition workaround for some GCC compilers
Looks like somewhat old GCC compilers, namely 12.2.1, cannot recognize a
string literal sometimes. Let's help it to avoid error logs like this
one:

```
[ 75%] Building CXX object libsolidity/CMakeFiles/solidity.dir/codegen/ir/IRGeneratorForStatements.cpp.o
cd /builddir/build/BUILD/solidity-0.8.18/redhat-linux-build/libsolidity && /usr/bin/g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DFMT_HEADER_ONLY=1 -DHAVE_CVC4 -DHAVE_Z3 -I/builddir/build/BUILD/solidity-0.8.18/redhat-linux-build/include -I/builddir/build/BUILD/solidity-0.8.18 -isystem /usr/include/z3 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fuse-ld=gold -O3 -DNDEBUG -fstack-protector-strong -Wimplicit-fallthrough -fmacro-prefix-map=/builddir/build/BUILD/solidity-0.8.18=/solidity -Wpessimizing-move -Wredundant-move -Wall -Wextra -Werror -pedantic -Wmissing-declarations -Wno-unknown-pragmas -Wsign-conversion -Wconversion -Wextra-semi -Wduplicated-cond -Wlogical-op -fdiagnostics-color -std=c++17 -MD -MT libsolidity/CMakeFiles/solidity.dir/codegen/ir/IRGeneratorForStatements.cpp.o -MF CMakeFiles/solidity.dir/codegen/ir/IRGeneratorForStatements.cpp.o.d -o CMakeFiles/solidity.dir/codegen/ir/IRGeneratorForStatements.cpp.o -c /builddir/build/BUILD/solidity-0.8.18/libsolidity/codegen/ir/IRGeneratorForStatements.cpp
In file included from /usr/include/c++/12/string:40,
                 from /builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/ASTForward.h:27,
                 from /builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/AST.h:26,
                 from /builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/ASTVisitor.h:26,
                 from /builddir/build/BUILD/solidity-0.8.18/libsolidity/codegen/ir/IRGeneratorForStatements.h:24,
                 from /builddir/build/BUILD/solidity-0.8.18/libsolidity/codegen/ir/IRGeneratorForStatements.cpp:22:
In function 'std::char_traits<char>::copy(char*, char const*, unsigned long)',
    inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long)' at /usr/include/c++/12/bits/basic_string.h:423:21,
    inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)' at /usr/include/c++/12/bits/basic_string.tcc:532:22,
    inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)' at /usr/include/c++/12/bits/basic_string.h:1647:19,
    inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)' at /usr/include/c++/12/bits/basic_string.h:815:28,
    inlined from '(anonymous namespace)::CopyTranslate::translateReference(solidity::yul::Identifier const&)' at /builddir/build/BUILD/solidity-0.8.18/libsolidity/codegen/ir/IRGeneratorForStatements.cpp:182:13:
/usr/include/c++/12/bits/char_traits.h:431:56: error: 'memcpy' accessing 9223372036854775810 or more bytes at offsets -4611686018427387902 and [-4611686018427387903, 4611686018427387904] may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
  431 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [libsolidity/CMakeFiles/solidity.dir/build.make:695: libsolidity/CMakeFiles/solidity.dir/codegen/ir/IRGeneratorForStatements.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/builddir/build/BUILD/solidity-0.8.18/redhat-linux-build'
gmake[1]: *** [CMakeFiles/Makefile2:414: libsolidity/CMakeFiles/solidity.dir/all] Error 2
gmake[1]: Leaving directory '/builddir/build/BUILD/solidity-0.8.18/redhat-linux-build'
gmake: *** [Makefile:139: all] Error 2
```

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2023-02-08 17:51:56 +01:00
Leo Alt
db9c11a2a5 fix abstract nondet exception 2023-02-08 16:59:37 +01:00
Daniel
665bf29a84
Merge pull request #12958 from ethereum/yul-fuzzer-bound-memory-accesses
Yul grammar generator: Bound memory accesses.
2023-02-07 15:47:20 +01:00
Daniel
048aabd3ca
Merge pull request #13934 from esaulpaugh/develop
specify "receive" as having no "name"
2023-02-07 15:40:52 +01:00
Daniel
82fdc6fccc
Merge pull request #13932 from lemenkov/redundant_std_move
libsolidity: Redundant std::move
2023-02-07 15:29:41 +01:00
matheusaaguiar
88e44ed5e2
Merge pull request #13941 from ethereum/cleanup-gnosis-test
Cleanup of duplicated line leftover from previous fix
2023-02-06 18:58:25 -03:00
Matheus Aguiar
a5c5e4602a Cleanup of duplicated line leftover from previous fix 2023-02-06 18:10:31 -03:00
Nikola Matić
e48d495fb7
Merge pull request #13940 from ethereum/fix-workaround-gnosis-test
Replace quote marks with quotation marks in workaround of gnosis.sh external test
2023-02-06 21:48:38 +01:00
Leo
7176925a87
Merge pull request #11559 from ethereum/smt_trusted
[SMTChecker] Trusted mode for external calls
2023-02-06 21:39:13 +01:00
Matheus Aguiar
98c011328a Replace quote marks with quotation marks 2023-02-06 16:53:23 -03:00
Nuno Santos
411841cbb5
Tweak wording in value type docs (#13935)
* Update value-types.rst

- User-defined were written inconsistently (with/without hyphen)
- Rewording some sentences for user clarity.

* Update docs/types/value-types.rst

Co-authored-by: chriseth <chris@ethereum.org>

---------

Co-authored-by: chriseth <chris@ethereum.org>
2023-02-06 17:19:48 +00:00
Leo Alt
8d91ccf028 [SMTChecker] Add a new trusted mode which assumes that code that is
available at compile time is trusted.
2023-02-06 17:02:33 +01:00
Evan Saulpaugh
821da895ea
specify "receive" as having no "name" 2023-02-05 16:13:23 -06:00
Peter Lemenkov
b3f35f703a libsolidity: Redundant std::move
This patch suppresses warnings like this one:

```
/builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/AST.h: In constructor 'solidity::frontend::FunctionDefinition::FunctionDefinition(int64_t, const solidity::frontend::ASTNode::SourceLocation&, solidity::frontend::ASTPointer<std::__cxx11::basic_string<char> >&, const solidity::frontend::ASTNode::SourceLocation&, solidity::frontend::Visibility, solidity::frontend::StateMutability, bool, solidity::langutil::Token, bool, solidity::frontend::ASTPointer<solidity::frontend::OverrideSpecifier>&, solidity::frontend::ASTPointer<solidity::frontend::StructuredDocumentation>&, solidity::frontend::ASTPointer<solidity::frontend::ParameterList>&, std::vector<std::shared_ptr<solidity::frontend::ModifierInvocation> >, solidity::frontend::ASTPointer<solidity::frontend::ParameterList>&, solidity::frontend::ASTPointer<solidity::frontend::Block>&)':
/builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/AST.h:926:69: error: redundant move in initialization [-Werror=redundant-move]
  926 |                 CallableDeclaration(_id, _location, _name, std::move(_nameLocation), _visibility, _parameters, _isVirtual, _overrides, _returnParameters),
      |                                                            ~~~~~~~~~^~~~~~~~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/libsolidity/ast/AST.h:926:69: note: remove 'std::move' call
```

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2023-02-05 12:06:19 +01:00
Kamil Śliwak
f2bf23a067
Merge pull request #13929 from jhheider/explicit-copy-init
Fixes minor compilation errors with some clangs
2023-02-05 01:48:08 +01:00
Kamil Śliwak
acc01dadfc
Merge pull request #13919 from lemenkov/explicit_include
libsolutil: Add missing include
2023-02-05 01:46:36 +01:00
Peter Lemenkov
6a6bf303b5 libsolutil: Add missing include
This one is more obscure. It helps suppressing the following error while
compiling:

```
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:6: error: elaborated-type-specifier for a scoped enum must not use the 'class' keyword [-Werror]
   33 | enum class Instruction: uint8_t;
      | ~~~~ ^~~~~
      |      -----
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:23: error: found ':' in nested-name-specifier, expected '::'
   33 | enum class Instruction: uint8_t;
      |                       ^
      |                       ::
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:33:12: error: 'Instruction' has not been declared
   33 | enum class Instruction: uint8_t;
      |            ^~~~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:101:24: error: 'solidity::evmasm::Instruction' has not been declared
  101 |         bool hasOpcode(evmasm::Instruction _opcode) const;
      |                        ^~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.cpp:29:6: error: no declaration matches 'bool solidity::langutil::EVMVersion::hasOpcode(solidity::evmasm::Instruction) const'
   29 | bool EVMVersion::hasOpcode(Instruction _opcode) const
      |      ^~~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:101:14: note: candidate is: 'bool solidity::langutil::EVMVersion::hasOpcode(int) const'
  101 |         bool hasOpcode(evmasm::Instruction _opcode) const;
      |              ^~~~~~~~~
/builddir/build/BUILD/solidity-0.8.18/liblangutil/EVMVersion.h:43:7: note: 'class solidity::langutil::EVMVersion' defined here
   43 | class EVMVersion:
      |       ^~~~~~~~~~
cc1plus: all warnings being treated as errors
```

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2023-02-04 16:22:18 +01:00
Peter Lemenkov
8f1668ffb8 libsolutil: Add missing include
This helps suppressing the following message during compilation:

```
/builddir/build/BUILD/solidity-0.8.18/libsolutil/Common.h:55:27: error: 'uint8_t' was not declared in this scope
   55 | using bytes = std::vector<uint8_t>;
      |                           ^~~~~~~
/builddir/build/BUILD/solidity-0.8.18/libsolutil/Common.h:49:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   48 | #include <functional>
  +++ |+#include <cstdint>
   49 | #include <string>
```

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2023-02-04 16:22:18 +01:00
Jacob Heider
43431eb427
Fixes compilation errors with some clangs
resolves https://github.com/ethereum/solidity/issues/13854
2023-02-03 21:37:50 -05:00
Kamil Śliwak
77640a57c9
Merge pull request #13781 from janisozaur/patch-2
Update debian/compat to version 13
2023-02-03 22:28:20 +01:00
Kamil Śliwak
558c39dad6
Merge pull request #13855 from ethereum/allow_external_library_functions_attached
Allow library external functions to be attached with using for
2023-02-03 21:10:46 +01:00
Michał Janiszewski
6f285ad197 Update debian/compat to version 13
Compat version 13 is currently the recommended one.

An important change introduced in 10 was change of default to target parallel builds

5d1bb29841/debhelper.pod (compatibility-levels)
2023-02-03 20:56:25 +01:00
r0qs
dbf35f1c14
Merge pull request #13910 from ethereum/asan-cli-fix
Avoid printing suppressions statistics for t_ubu_asan_cli tests
2023-02-03 10:15:25 +01:00
Matheus Aguiar
2b70b08d5f Allow library external functions to be bound with using for 2023-02-02 13:39:19 -03:00
Bhargava Shastry
5c6e12b2c0 Update existing and add new test cases. 2023-02-02 11:40:39 +01:00
Rodrigo Q. Saramago
7ddb5e0c66
Change relative to absolute path for LSAN_OPTIONS 2023-02-02 09:49:59 +01:00
Rodrigo Q. Saramago
bc00063b2e
Do not print suppressions statistics for cli tests 2023-02-02 09:49:58 +01:00
Bhargava Shastry
f8880cad82 Yul grammar generator: Bound memory accesses. 2023-02-02 08:10:53 +01:00
Kamil Śliwak
ddbef8f650
Merge pull request #13918 from ethereum/set-version-to-0.8.19
Set version to 0.8.19
2023-02-01 21:15:15 +01:00
Kamil Śliwak
78608e8d17
Merge pull request #13916 from NicoAcosta/mapping-style
Fix mapping style in docs
2023-02-01 20:56:29 +01:00
Rodrigo Q. Saramago
e735ff1a95
Set version to 0.8.19 2023-02-01 20:24:50 +01:00
Nicolás Acosta
da7dfeb0c5 style(reference-types): fix mapping style 2023-02-01 15:54:32 -03:00
Nicolás Acosta
b403085fa1 style(layout_in_storage): fix mapping style 2023-02-01 15:54:08 -03:00
Nicolás Acosta
9b0556caa4 style(modular): fix mapping style 2023-02-01 15:53:33 -03:00
Nicolás Acosta
5b149adfcd style(visibility-and-getters): fix mapping style 2023-02-01 15:53:04 -03:00
Nicolás Acosta
72a17ceb71 style(function-modifiers): fix mapping style 2023-02-01 15:52:34 -03:00
Nicolás Acosta
1edfd73b37 style(security-considerations): fix mapping style 2023-02-01 15:51:56 -03:00
Nicolás Acosta
7b8478a81b style(intro-sc): fix mapping style 2023-02-01 15:51:26 -03:00
Nicolás Acosta
4ff310cc62 style(common-patterns): fix mapping style 2023-02-01 15:50:48 -03:00
Nicolás Acosta
e89efe89a6 style(mapping-types): fix mapping style 2023-02-01 15:49:34 -03:00
Kamil Śliwak
87f61d960c
Merge pull request #13913 from ethereum/changelog-v0.8.18
Sort changelog for 0.8.18 alphabetically
2023-02-01 15:36:41 +01:00
Rodrigo Q. Saramago
66007f5001
Add release date and bugs by version entry for 0.8.18 2023-02-01 14:45:13 +01:00
Rodrigo Q. Saramago
a186e60782
Sort changelog for 0.8.18 alphabetically 2023-02-01 14:45:13 +01:00
Kamil Śliwak
836e1ee1ca
Merge pull request #13914 from ethereum/pylint-2.16-fix
Fix pylint 2.16 warnings
2023-02-01 14:43:46 +01:00
Rodrigo Q. Saramago
828f95ad9e Fix pylint 2.16 warnings 2023-02-01 10:39:00 -03:00
Kamil Śliwak
37953a7eb0
Merge pull request #13911 from ethereum/fix-broken-docs-links-and-redirects
Fix broken docs links and redirects
2023-02-01 14:13:31 +01:00
Kamil Śliwak
8447baec4d docs; Link to published versions of translated docs for languages that already have them 2023-02-01 12:27:56 +01:00