-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update wasm3 to 0.5.0 #739
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #739 +/- ##
==========================================
- Coverage 99.27% 99.27% -0.01%
==========================================
Files 88 88
Lines 13296 13158 -138
==========================================
- Hits 13200 13062 -138
Misses 96 96
Flags with carried forward coverage won't be shown. Click here to find out more.
|
test/utils/wasm3_engine.cpp
Outdated
if (result == m3Err_none) | ||
return {false, ret_valid ? ret_value : std::optional<uint64_t>{}}; | ||
|
||
std::vector<const void*> argPtrs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want ultimate speed you can use stack-allocated fixed-size array. Just bail out if too much arguments provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fizzy/test/utils/wasm3_engine.cpp:147:24: error: variable length arrays are a C99 feature [-Werror,-Wvla-extension]
const void* argPtrs[args.size()];
Or not sure what you've meant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you meant like allocating an array with like 32 items, and fail if args.size()
is larger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this makes a lot of speed difference, but pushed a version.
My plan is we release 0.8.0, then merge this and release 0.8.1. Then it is simple to show benchmarks for both, if needed. |
const uint32_t offset = static_cast<uint32_t>(stack[0]); | ||
const uint32_t length = static_cast<uint32_t>(stack[1]); | ||
const uint32_t offset = static_cast<uint32_t>(stack[1]); | ||
const uint32_t length = static_cast<uint32_t>(stack[2]); | ||
stack[0] = fizzy::test::adler32({reinterpret_cast<uint8_t*>(mem) + offset, length}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stack order has changed. Now the return value is on the bottom.
65e1677
to
4d0934d
Compare
8761680
to
f449879
Compare
Merging this is still blocked on benchmarks running out of stack space or something:
We did find some reason, increased something/update compiler to work it around, but it is back again. |
Apparently we run into a wasm3 bug: wasm3/wasm3#425 |
We still need a patch for the start function, see wasm3/wasm3#202. And also a memory leak issue: wasm3/wasm3#203.
At least we could get rid of wasm3/wasm3#130, wasm3/wasm3#129, and wasm3/wasm3#145.