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-05-01 12:05:12 -07:00
2024-03-11 07:09:10 -07:00
2024-05-01 12:05:05 -07:00
2024-03-02 21:19:34 -08:00
2024-04-11 15:44:40 -07:00
2024-04-17 13:41:25 +01:00
2024-03-25 14:49:41 +00:00
2024-04-14 15:33:46 -04:00
2024-03-27 10:05:57 +00:00
2021-11-26 19:59:33 -07:00
2023-11-21 14:14:01 +02:00
2024-04-17 13:41:25 +01:00
2024-04-12 23:43:57 -07:00
2024-03-30 20:50:48 -04:00
2024-03-19 16:18:18 -07:00
2024-03-21 19:56:30 -07:00
2024-04-23 17:16:03 -07:00
2024-02-27 22:55:00 -07:00
2024-03-11 07:09:10 -07:00
2024-03-11 07:09:10 -07:00
2024-03-11 07:09:10 -07:00
2024-03-30 20:50:48 -04:00
2024-03-06 21:26:37 +00:00
2024-04-18 03:02:13 -07:00
2024-03-27 10:05:57 +00:00
2024-04-23 17:16:03 -07:00
2024-03-11 07:09:10 -07:00
2024-04-17 13:41:25 +01:00
2024-04-09 15:00:21 +02:00
2024-04-17 13:41:25 +01:00
2024-02-27 22:55:00 -07:00
2024-02-27 22:55:00 -07:00
2024-04-17 22:47:54 -07:00
2024-04-07 14:47:11 +02:00
2024-02-05 18:13:07 -07:00
2024-03-30 20:50:48 -04:00
2024-05-01 12:04:44 -07:00
2024-04-08 13:20:14 -04:00
2023-10-23 18:36:00 -07:00
2024-04-12 10:10:42 +00:00
2024-04-17 13:41:25 +01:00
2024-04-17 22:47:54 -07:00
2024-02-27 22:55:00 -07:00
2023-09-19 09:37:30 -07:00
2023-09-19 09:37:30 -07:00
2023-09-19 09:37:30 -07:00
2023-11-21 14:14:01 +02:00
2023-11-21 14:14:01 +02:00
2023-09-19 09:37:30 -07:00
2024-03-03 02:28:24 +01:00
2024-03-02 20:53:06 +01:00