mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-21 18:09:55 +00:00
Introduce tests which demonstrate bad wasm compiler.
This commit is contained in:
1 parent
bbac6f8da1
commit
0b138b0fd5
12 files changed
+96
-30
No files matched your search
@@ -144,7 +144,13 @@ macro_rules! impl_stubs {
|
||||
};
|
||||
|
||||
let output = super::$name(&input[..]);
|
||||
&output[0] as *const u8 as u64 + ((output.len() as u64) << 32)
|
||||
// things break if we try to take the address of an unallocated vec, so we
|
||||
// shortcircuit the empty output case.
|
||||
if output.len() > 0 {
|
||||
&output[0] as *const u8 as u64 + ((output.len() as u64) << 32)
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
)*
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user