-
Notifications
You must be signed in to change notification settings - Fork 824
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
adding tests for state_creator
of import_object
#865
adding tests for state_creator
of import_object
#865
Conversation
20acb96
to
170ffa2
Compare
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.
Thanks! looks good, just a few small things (the lint is the only thing blocking this from shipping)
lib/runtime-core/src/lib.rs
Outdated
@@ -1,4 +1,4 @@ | |||
#![deny( | |||
#![allow( |
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.
This should be changed back!
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.
@MarkMcCaskey my bad
lib/runtime-core/src/import.rs
Outdated
|
||
#[test] | ||
fn state_creator_closure() { | ||
let ptr = std::ptr::null(); |
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.
Perhaps we should use a sentinel value, 0
is a common bit pattern in memory, something like:
let ptr = unsafe { std::mem::transmute(0xB7B7A0A01234) };
would make the test more robust I think
343463c
to
4adfbc4
Compare
bors r+ |
865: adding tests for `state_creator` of `import_object` r=MarkMcCaskey a=YaronWittenstein Part of the PR #807 changes was adding support for shared import objects between threads. https://github.com/wasmerio/wasmer/pull/807/files#diff-d20cb4c5a883566b85be4cc046f45aa9R49 I've added tests/examples on how to create an `import object` with a state_creator (function or closure) Co-authored-by: Yaron Wittenstein <[email protected]>
Build failed |
@MarkMcCaskey can you please re-trigger |
bors r+ |
865: adding tests for `state_creator` of `import_object` r=MarkMcCaskey a=YaronWittenstein Part of the PR #807 changes was adding support for shared import objects between threads. https://github.com/wasmerio/wasmer/pull/807/files#diff-d20cb4c5a883566b85be4cc046f45aa9R49 I've added tests/examples on how to create an `import object` with a state_creator (function or closure) Co-authored-by: Yaron Wittenstein <[email protected]>
Thanks! Sorry about not shipping this before -- I only very recently learned/realized that not everyone can use bors on Wasmer! I assumed given an approval, people could ship their own PRs, but this seems to not be the case! There are a few other PRs I didn't ship due to this misunderstanding which I'll be following up on |
Build failed |
bors r+ |
709: new feature flag: `deterministic` r=MarkMcCaskey a=YaronWittenstein The motivation for the PR is for introducing a new feature flag called `deterministic`. When `deterministic` will be enabled (turned-off by default) it'll guarantee deterministic execution of wasm programs across different hardware/circumstances. This is critical for Blockchain projects that require execution to be deterministic in order to reach a consensus of the state transition of each smart-contract transaction. 865: adding tests for `state_creator` of `import_object` r=MarkMcCaskey a=YaronWittenstein Part of the PR #807 changes was adding support for shared import objects between threads. https://github.com/wasmerio/wasmer/pull/807/files#diff-d20cb4c5a883566b85be4cc046f45aa9R49 I've added tests/examples on how to create an `import object` with a state_creator (function or closure) 1042: Make regression test work in release builds too. r=nlewycky a=nlewycky Fix this regression test to detect the bug it was looking for in release builds too. This bug triggered an assertion failure in debug, and by examining the pre-opt IR, we can check for the bug in release mode too. Co-authored-by: Yaron Wittenstein <[email protected]> Co-authored-by: Yaron Wittenstein <[email protected]> Co-authored-by: Mark McCaskey <[email protected]> Co-authored-by: Mark McCaskey <[email protected]> Co-authored-by: Nick Lewycky <[email protected]>
Build failed (retrying...) |
865: adding tests for `state_creator` of `import_object` r=MarkMcCaskey a=YaronWittenstein Part of the PR #807 changes was adding support for shared import objects between threads. https://github.com/wasmerio/wasmer/pull/807/files#diff-d20cb4c5a883566b85be4cc046f45aa9R49 I've added tests/examples on how to create an `import object` with a state_creator (function or closure) 1042: Make regression test work in release builds too. r=nlewycky a=nlewycky Fix this regression test to detect the bug it was looking for in release builds too. This bug triggered an assertion failure in debug, and by examining the pre-opt IR, we can check for the bug in release mode too. Co-authored-by: Yaron Wittenstein <[email protected]> Co-authored-by: Nick Lewycky <[email protected]>
Build failed (retrying...) |
865: adding tests for `state_creator` of `import_object` r=MarkMcCaskey a=YaronWittenstein Part of the PR #807 changes was adding support for shared import objects between threads. https://github.com/wasmerio/wasmer/pull/807/files#diff-d20cb4c5a883566b85be4cc046f45aa9R49 I've added tests/examples on how to create an `import object` with a state_creator (function or closure) Co-authored-by: Yaron Wittenstein <[email protected]>
Build failed |
bors r+ |
865: adding tests for `state_creator` of `import_object` r=syrusakbary a=YaronWittenstein Part of the PR #807 changes was adding support for shared import objects between threads. https://github.com/wasmerio/wasmer/pull/807/files#diff-d20cb4c5a883566b85be4cc046f45aa9R49 I've added tests/examples on how to create an `import object` with a state_creator (function or closure) Co-authored-by: Yaron Wittenstein <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
Build failed |
This is no longer needed on the refactor. Adding the label so we can close quickly the PR after publishing the refactor. |
State creator is no longer supported in the import object. |
Part of the PR #807 changes was adding support for shared import objects between threads.
https://github.com/wasmerio/wasmer/pull/807/files#diff-d20cb4c5a883566b85be4cc046f45aa9R49
I've added tests/examples on how to create an
import object
with a state_creator(function or closure)