This repository was archived by the owner on Nov 6, 2020. It is now read-only.
Conversation
NikVolf
reviewed
Jan 11, 2018
| let cx = context.value_stack.pop_as::<i32>()? as u32; | ||
| let ct = context.value_stack.pop_as::<i32>()? as u32; | ||
|
|
||
| self.charge(|schedule| schedule.wasm.mem_copy as u64 * len as u64)?; // TODO: charge cmp |
NikVolf
reviewed
Jan 12, 2018
| let cx = self.memory.get(cx, len as usize)?; | ||
| let ct = self.memory.get(ct, len as usize)?; | ||
| let result = unsafe { | ||
| memcmp(cx.as_ptr() as *const c_void, ct.as_ptr() as *const c_void, len as usize) |
Contributor
There was a problem hiding this comment.
memcmp should fail when invoked on overlapping region, because otherwise it's undefined behaviour?
Contributor
There was a problem hiding this comment.
oh, on the second thought, it shouldn't be
NikVolf
reviewed
Jan 15, 2018
| { | ||
| // | ||
| // method signature: | ||
| // fn memcmp(cx: *const c_void, ct: *const c_void, n: usize) -> i32; |
Contributor
There was a problem hiding this comment.
tomusdrw
pushed a commit
that referenced
this pull request
Feb 14, 2018
* mem_cmp added to the Wasm runtime * schedule.wasm.mem_copy to schedule.wasm.mem_cmp for mem_cmp
5chdn
pushed a commit
that referenced
this pull request
Feb 14, 2018
* update back-references more aggressively after answering from cache (#7578) * Add new EF ropstens nodes. (#7824) * Add new EF ropstens nodes. * Fix tests * Add a timeout for light client sync requests (#7848) * Add a timeout for light client sync requests * Adjusting timeout to number of headers * Flush keyfiles. Resolves #7632 (#7868) * Fix wallet import (#7873) * rpc: generate new account id for imported wallets * ethstore: handle duplicate wallet filenames * ethstore: simplify deduplication of wallet file names * ethstore: do not dedup wallet filenames on update * ethstore: fix minor grumbles * [WASM] mem_cmp added to the Wasm runtime (#7539) * mem_cmp added to the Wasm runtime * schedule.wasm.mem_copy to schedule.wasm.mem_cmp for mem_cmp * [Wasm] memcmp fix and test added (#7590) * [Wasm] memcmp fix and test added * [Wasm] use reqrep_test! macro for memcmp test * wasmi interpreter (#7796) * adjust storage update evm-style (#7812) * disable internal memory (#7842)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to support wasm-unknown-unknown target runtime has to provide
memcmpwhich previously was provided by emscripten