mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
PVF: NaN canonicalization & deteriministic stack (#9069)
* NaN canonicalization * Introduce a simple stack depth metering * Be explicit about the wasm features we enable * Pull the latest latast fix for the pwasm-utils crate * Disable `wasm_threads` as well. * Factor out deterministic stack params * Add more docs * Remove redundant dep * Refine comments * Typo Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
@@ -109,6 +109,12 @@ sp_core::wasm_export_functions! {
|
||||
|
||||
fn test_exhaust_heap() -> Vec<u8> { Vec::with_capacity(16777216) }
|
||||
|
||||
fn test_fp_f32add(a: [u8; 4], b: [u8; 4]) -> [u8; 4] {
|
||||
let a = f32::from_le_bytes(a);
|
||||
let b = f32::from_le_bytes(b);
|
||||
f32::to_le_bytes(a + b)
|
||||
}
|
||||
|
||||
fn test_panic() { panic!("test panic") }
|
||||
|
||||
fn test_conditional_panic(input: Vec<u8>) -> Vec<u8> {
|
||||
|
||||
Reference in New Issue
Block a user