Files
zig/src
Andrew Kelley fa5011aa31 C backend: avoid memcpy when len=0
As of Clang 18, calling memcpy() with a misaligned pointer trips UBSAN,
even if the length is zero. This unfortunately includes any call to
`@memcpy` when source or destination are undefined and the length is
zero.

This patch makes the C backend avoid calling memcpy when the length is
zero, thereby avoiding undefined behavior.

A zig1.wasm update will be needed in the llvm18 branch to activate this
code.
2024-05-01 12:05:12 -07:00
..
2024-04-23 17:16:03 -07:00
2024-04-17 13:41:25 +01:00
2024-04-14 15:33:46 -04:00
2024-03-30 20:50:48 -04:00
2024-04-23 17:16:03 -07:00
2024-03-27 10:05:57 +00:00
2024-04-23 17:16:03 -07:00
2024-04-09 15:00:21 +02:00
2024-04-07 14:47:11 +02:00