Luuk de Gram 836f9fceab
llvm: add safety-check for Wasm memcpy
When lowering the `memcpy` instruction, LLVM will lower it to WebAssembly's
`memory.copy` instruction when the bulk-memory feature is enabled. This
instruction will trap when the destination or source pointer is out-of-bounds.
By Zig's semantics, it is valid to have an invalid pointer when the length is 0.
To prevent runtimes from trapping, we add a safety-check for slices to only
lower to a memcpy instruction when the length is larger than 0.
2023-07-08 17:45:04 +02:00
..
2023-06-28 09:32:10 +02:00
2023-05-26 21:42:19 -07:00
2023-06-20 12:55:38 -04:00
2022-11-04 00:09:27 +03:30
2023-01-25 20:56:23 -07:00
2023-07-06 17:28:11 +02:00