From 0dc8aebcef75a36f3c47d70a6d4389e9ee939a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 13 Oct 2020 11:48:48 +0200 Subject: [PATCH 1/4] ci: Upgrade build images, Clang to version 11 --- circle.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index 4aa9e9b5d..d4823ed99 100644 --- a/circle.yml +++ b/circle.yml @@ -6,15 +6,12 @@ parameters: default: false executors: - linux-gcc-9: - docker: - - image: ethereum/cpp-build-env:15-gcc-9 linux-gcc-latest: docker: - - image: ethereum/cpp-build-env:15-gcc-10 + - image: ethereum/cpp-build-env:16-gcc-10 linux-clang-latest: docker: - - image: ethereum/cpp-build-env:15-clang-10 + - image: ethereum/cpp-build-env:16-clang-11 macos: macos: xcode: 11.6.0 @@ -294,7 +291,7 @@ jobs: - test release-linux: - executor: linux-gcc-9 + executor: linux-gcc-latest steps: - install_testfloat - checkout From 18dbf4351d1b2fc880a5bdc6a449dc892f20b26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 13 Oct 2020 12:01:09 +0200 Subject: [PATCH 2/4] test: Fix performance issue with string find methods --- test/utils/fizzy_engine.cpp | 2 +- test/utils/wasm_engine.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/utils/fizzy_engine.cpp b/test/utils/fizzy_engine.cpp index ee23ccaf4..d1bfdd406 100644 --- a/test/utils/fizzy_engine.cpp +++ b/test/utils/fizzy_engine.cpp @@ -40,7 +40,7 @@ ValType translate_valtype(char input) FuncType translate_signature(std::string_view signature) { - const auto delimiter_pos = signature.find(":"); + const auto delimiter_pos = signature.find(':'); assert(delimiter_pos != std::string_view::npos); const auto inputs = signature.substr(0, delimiter_pos); const auto outputs = signature.substr(delimiter_pos + 1); diff --git a/test/utils/wasm_engine.cpp b/test/utils/wasm_engine.cpp index 48b91c6b3..e29c17244 100644 --- a/test/utils/wasm_engine.cpp +++ b/test/utils/wasm_engine.cpp @@ -12,9 +12,9 @@ WasmEngine::~WasmEngine() noexcept = default; void validate_function_signature(std::string_view signature) { - if (signature.find_first_of(":") == std::string::npos) + if (signature.find_first_of(':') == std::string::npos) throw std::runtime_error{"Missing ':' delimiter"}; - if (signature.find_first_of(":") != signature.find_last_of(":")) + if (signature.find_first_of(':') != signature.find_last_of(':')) throw std::runtime_error{"Multiple occurrences of ':' found in signature"}; // Only allow i (i32) I (i64) as types if (signature.find_first_not_of(":iI") != std::string::npos) From 4f4f04a7d677339347ae20d19ba49cf08331dcf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 13 Oct 2020 12:06:22 +0200 Subject: [PATCH 3/4] clang-tidy: Disable misc-no-recursion Disable misc-no-recursion clang-tidy check (added in clang-tidy 11). WebAssembly requires recursion, but the depth of the recursion is controlled. --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index 6545bad20..a87670b7c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -6,6 +6,7 @@ Checks: > google-global-names-in-headers, google-runtime-int, misc-*, + -misc-no-recursion, -misc-non-private-member-variables-in-classes, performance-*, -performance-inefficient-string-concatenation, From 871e9b88024d7cd140895c7519798c9ecc676844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 13 Oct 2020 13:58:55 +0200 Subject: [PATCH 4/4] ci: Drop pointer-compare sanitizer on macos --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index d4823ed99..5ad367a69 100644 --- a/circle.yml +++ b/circle.yml @@ -389,8 +389,8 @@ jobs: - checkout - build: build_type: RelWithDebInfo - # TODO: pointer-compare produces failure in std::string operator+. - cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,pointer-subtract,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation + # TODO: Enable pointer-compare and pointer-subtract only for libfizzy. + cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation - test - benchmark: min_time: "0.01"