Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies and CI config #804

Merged
merged 7 commits into from
Dec 23, 2021
Merged

Upgrade dependencies and CI config #804

merged 7 commits into from
Dec 23, 2021

Conversation

chfast
Copy link
Collaborator

@chfast chfast commented Dec 20, 2021

No description provided.

@chfast chfast requested a review from axic December 20, 2021 11:37
@codecov
Copy link

codecov bot commented Dec 20, 2021

Codecov Report

Merging #804 (e9377fc) into master (2fe6f02) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #804      +/-   ##
==========================================
- Coverage   99.14%   99.02%   -0.13%     
==========================================
  Files          80       80              
  Lines       12374    12789     +415     
==========================================
+ Hits        12268    12664     +396     
- Misses        106      125      +19     
Flag Coverage Δ
rust 99.90% <ø> (ø)
spectests 90.08% <0.00%> (-0.46%) ⬇️
unittests 98.94% <100.00%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/fizzy/asserts.cpp 100.00% <100.00%> (ø)
test/unittests/parser_expr_test.cpp 100.00% <100.00%> (ø)
test/unittests/validation_stack_test.cpp 100.00% <100.00%> (ø)
test/utils/typed_value.hpp 100.00% <100.00%> (ø)
test/utils/wasm3_engine.cpp 98.24% <100.00%> (ø)
test/utils/leb128_encode.cpp 90.00% <0.00%> (-10.00%) ⬇️
test/utils/wasm_binary.hpp 92.85% <0.00%> (-7.15%) ⬇️
tools/wasi/main.cpp 60.00% <0.00%> (-6.67%) ⬇️
test/utils/hex.cpp 96.29% <0.00%> (-3.71%) ⬇️
lib/fizzy/capi.cpp 95.41% <0.00%> (-2.15%) ⬇️
... and 36 more

@chfast chfast changed the title ci: Upgrade rust to 1.57 Upgrade dependencies and CI config Dec 20, 2021
@chfast chfast requested a review from gumb0 December 20, 2021 12:24
@chfast chfast force-pushed the ci_rust branch 3 times, most recently from 9a6831a to 602e627 Compare December 20, 2021 13:44
@chfast chfast mentioned this pull request Dec 20, 2021
@@ -100,4 +100,4 @@ static void parse_string(benchmark::State& state)

state.SetItemsProcessed(static_cast<int64_t>(size));
}
BENCHMARK(parse_string)->RangeMultiplier(2)->Range(16, 4 * 1024);
BENCHMARK(parse_string)->RangeMultiplier(2)->Range(16, 4096);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change needed after -bugprone-implicit-widening-of-multiplication-result ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change then?

@@ -124,7 +124,7 @@ WasmEngine::Result Wasm3Engine::execute(
{
unsigned ret_valid;
uint64_t ret_value;
IM3Function function = reinterpret_cast<IM3Function>(func_ref);
auto function = reinterpret_cast<IM3Function>(func_ref); // NOLINT(performance-no-int-to-ptr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably new clang-tidy warning (as I upgraded to clang-tidy-13). Pointer to integer cast blocks some optimizations. https://clang.llvm.org/extra/clang-tidy/checks/performance-no-int-to-ptr.html.

@@ -203,7 +203,7 @@ std::tuple<bytes_ptr, Limits> allocate_memory(const std::vector<Memory>& module_
}

// NOTE: fill it with zeroes
bytes_ptr memory{new bytes(memory_min * PageSize, 0), bytes_delete};
bytes_ptr memory{new bytes(uint32_t{memory_min * PageSize}, 0), bytes_delete};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gumb0 can you double check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is non-functional change. The uint32_t{} explicitly states that the multiplication is done with 32-bit precision. This will not compile if any of multiplication operands has bigger type.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change still needed with disabled bugprone-implicit-widening-of-multiplication-result?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. I started "fixing" these but it turned out there are too many cases for constant multiplication. I reported the bug about the check but it is not worth it in current form.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well turns out we have a bug on master here, because trying to allocate 4Gb actually overflows and allocates 0.

#805

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The uint32_t{} is my proposed why of silencing the warning. I can revert these 2 changes from this PR, especially if there is a fix now in a side PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would revert them if warning is disabled anyway.

@@ -66,7 +66,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
-Wno-double-promotion
-Wno-float-equal
-Wno-padded
-Wno-return-std-move-in-c++11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this causing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag does not exist any more.

@@ -1 +1,2 @@
mut
crate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not sure why, it's a normal English word?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. The codespell suggests crate -> create.

@chfast chfast merged commit bbf7638 into master Dec 23, 2021
@chfast chfast deleted the ci_rust branch December 23, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants