lean4-htt/src/runtime/uv
Eric Wieser 6819c805b9
fix: propagate memory errors when allocating for libuv (#13546)
This PR prevents memory exhaustion turning into segfaults when using
Lean functions which call into libuv

`malloc` can return `NULL`, in which case this code would previously go
on to dereference a null pointer.
Instead, it now returns a suitable `IO.Error`.

Calling `lean_internal_panic_out_of_memory` would also be an option
here, since the adjacent `lean_promise_new` calls would fail in this
way.
2026-04-28 15:29:25 +00:00
..
dns.cpp fix: propagate memory errors when allocating for libuv (#13546) 2026-04-28 15:29:25 +00:00
dns.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
event_loop.cpp feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
event_loop.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
net_addr.cpp feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
net_addr.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
signal.cpp fix: propagate memory errors when allocating for libuv (#13546) 2026-04-28 15:29:25 +00:00
signal.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
system.cpp fix: propagate memory errors when allocating for libuv (#13546) 2026-04-28 15:29:25 +00:00
system.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
tcp.cpp fix: propagate memory errors when allocating for libuv (#13546) 2026-04-28 15:29:25 +00:00
tcp.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
timer.cpp fix: propagate memory errors when allocating for libuv (#13546) 2026-04-28 15:29:25 +00:00
timer.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
udp.cpp fix: propagate memory errors when allocating for libuv (#13546) 2026-04-28 15:29:25 +00:00
udp.h feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00