-
Notifications
You must be signed in to change notification settings - Fork 139
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
Switch to maintained WASM instrumentation library #829
Comments
Given that this "works" right now, we can probably target M2.2 here. |
you can assigned this issue to me, i would try to resolve this during isolation |
Stay sane! And good luck! |
@Stebalien confirm that this stack overflow check work can across multiple contracts? instrument_functions(&mut ctx, &mut module_info)?; //inject calls in function body but calldirect not check
thunk::generate_thunks(&mut ctx, &mut module_info)?; //inject the export function that be called by other actor right? |
We don't track stack height across calls. The code is written this way because it instruments the code before and after every function call ( There is an inter-contract stack limit, but that's a fixed limit of 1025 calls. |
@Stebalien finished a draft version, all units and bench tests have passed. but the performance will definitely be lower than the old version. because wasmpaser/encoder can't directly modify the original file. many code basically follow, wasmparser parses the [u8] and got a section reader, make a section builder variable, read a elementsfrom the section reader, edits the element, and finally adds the elements to the builder. |
parity-wasm doesn't do this either, right? I mean, in both cases, we:
|
Implemented. |
Switch from parity-wasm (now unmaintained paritytech/parity-wasm#334) to wasmparser (https://crates.io/crates/wasmparser) and wasm-encoder (https://crates.io/crates/wasm-encoder).
This means re-implementing our instrumentation logic, unfortunately. But I'd rather not maintain parity-wasm.
See #668, #602.
The text was updated successfully, but these errors were encountered: