mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-10 09:57:30 +00:00
Introduce tests which demonstrate bad wasm compiler.
This commit is contained in:
@@ -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