Files
Jonathan Grynspan 83d82a5af5 swift_slowAlloc() assumes malloc(0) returns non-NULL. (#86922)
`swift_slowAlloc()` and related functions assume that `malloc(0)` and `aligned_alloc(0)` return non-`NULL` pointers. The C standards allow implementations to return `NULL` when the allocation size is `0`.

This PR implements a check for `0` that instead allocates `1`. The cost of the check is negligible next to the cost of actually allocating, but we'll mark it `SWIFT_UNLIKELY` just in case.

Resolves rdar://169304909.
2026-02-05 21:44:47 -08:00
..
2024-08-08 09:45:06 -07:00
2025-04-11 16:11:11 -06:00
2025-04-11 16:11:11 -06:00