ladybird/Libraries/LibCore
Andreas Kling 6f4096a4ca LibDNS: Run getaddrinfo on a thread pool to avoid event-loop freezes
getaddrinfo can hang for many seconds when the system stub resolver
misbehaves; running it inline on the event loop froze every other
request, IPC, and curl socket event for the duration.

New PendingSystemResolution coalesces concurrent lookups for the same
name, dispatches the call to a Threading::ThreadPool worker, and
deferred-invokes the result back to the originating event loop. Each
caller of lookup() gets its own Core::Promise so concurrent
when_resolved/when_rejected handlers can't clobber each other; the
pending state fans out to every joined caller on completion.

Workers issue A and AAAA in parallel on separate sockets to sidestep
the systemd-resolved AAAA-drop bug, and resolve the user's promise
after the first side returns records (with a 50 ms RFC 8305 grace
window for the other side).

Adds Core::Socket::AddressFamily and an optional parameter to
resolve_host so workers can request A or AAAA specifically.
2026-04-26 17:59:52 +02:00
..
Platform Everywhere: Move Mach bootstrap listener into LibIPC 2026-03-24 19:51:52 +01:00
AddressInfoVector.cpp LibCore: Move AddressInfoVector to its own file 2025-12-01 06:34:32 -05:00
AddressInfoVector.h LibCore: Move AddressInfoVector to its own file 2025-12-01 06:34:32 -05:00
AnonymousBuffer.cpp LibCore: Allow zero-size AnonymousBuffer creation 2026-04-22 09:08:39 -04:00
AnonymousBuffer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
AnonymousBufferWindows.cpp LibCore: Allow zero-size AnonymousBuffer creation 2026-04-22 09:08:39 -04:00
ArgsParser.cpp LibCore+LibJS+LibWasm: Always use a real format string 2025-04-08 20:00:18 -04:00
ArgsParser.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
CMakeLists.txt LibCore+LibWeb: Add ScopedAutoreleasePool and use it on macOS 2026-03-15 11:42:43 +01:00
ConfigFile.cpp LibCore: Remove unused header in ConfigFile 2026-02-21 19:27:35 +01:00
ConfigFile.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Directory.cpp AK+LibCore: Avoid double-negation of syscall error values 2025-05-10 21:19:46 -04:00
Directory.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
DirectoryEntry.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
DirectoryEntry.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
DirIterator.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
DirIterator.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ElapsedTimer.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ElapsedTimer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Environment.cpp Meta+LibCore: Disable --no-undefined on FreeBSD and remove LibCore hack 2025-10-22 13:54:54 +02:00
Environment.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Event.h LibCore: Don't require heap-allocated event to hold deferred invocation 2025-12-03 13:26:27 +01:00
EventLoop.cpp LibCore: Expose register_process and implement for Windows event loop 2026-04-12 16:08:07 +02:00
EventLoop.h LibCore: Expose register_process and implement for Windows event loop 2026-04-12 16:08:07 +02:00
EventLoopImplementation.cpp LibCore: Remove unused header in EventLoopImplementation 2026-02-21 19:27:35 +01:00
EventLoopImplementation.h LibCore: Expose register_process and implement for Windows event loop 2026-04-12 16:08:07 +02:00
EventLoopImplementationUnix.cpp LibCore+LibWeb: Add ScopedAutoreleasePool and use it on macOS 2026-03-15 11:42:43 +01:00
EventLoopImplementationUnix.h LibCore: Avoid UAF on the array of wake pipes when exit()ing 2026-03-02 17:06:39 -06:00
EventLoopImplementationWindows.cpp LibCore: Expose register_process and implement for Windows event loop 2026-04-12 16:08:07 +02:00
EventLoopImplementationWindows.h LibCore: Expose register_process and implement for Windows event loop 2026-04-12 16:08:07 +02:00
EventReceiver.cpp LibCore: Remove unused header in EventReceiver 2026-02-21 19:27:35 +01:00
EventReceiver.h LibCore: Stop atomically ref-counting EventReceiver 2026-03-02 17:06:39 -06:00
EventSwift.h LibCore: Add swift bindings for EventLoop as an Executor and Actor 2025-03-15 21:51:22 -06:00
File.cpp LibCore+RequestServer: Return size_t from system read/write functions 2025-12-01 16:29:48 +01:00
File.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
FileWatcher.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
FileWatcherInotify.cpp LibCore: Implement FileWatcher for any systems with inotify 2026-01-16 10:59:50 -07:00
FileWatcherUnimplemented.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Forward.h LibCore: Remove forward declaration of non-existent type 2026-02-23 12:15:23 +01:00
IOSurface.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
IOSurface.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
LocalServer.cpp LibCore: Remove unused header in LocalServer 2026-02-21 19:27:35 +01:00
LocalServer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
LocalServerWindows.cpp LibCore+Everywhere: Make Windows's System::ioctl consistent with POSIX 2026-01-19 06:53:29 -05:00
MachPort.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
MachPort.h Everywhere: Replace Unix socket IPC transport with Mach ports on macOS 2026-03-23 18:50:48 +01:00
MappedFile.cpp LibCore+LibIPC: Remove badge on File::leak_fd 2025-06-14 16:03:26 -04:00
MappedFile.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
MimeData.cpp LibCore: Remove unused header in MimeData 2026-02-21 19:27:35 +01:00
MimeData.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
NetworkResponse.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Notifier.cpp LibCore: Remove unused header in EventLoop 2026-02-21 19:27:35 +01:00
Notifier.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Process.cpp LibCore: Mark Process::wait_for_termination as const 2025-11-07 11:27:51 +01:00
Process.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ProcessWindows.cpp LibCore: Handle long paths in ProcessWindows 2026-02-02 10:35:11 +01:00
Promise.h LibCore: Remove unused header in EventReceiver 2026-02-21 19:27:35 +01:00
Proxy.h LibCore: Make ProxyData::port a u16 2026-01-22 17:38:15 +01:00
ReportTime.cpp LibCore: Introduce REPORT_TIME() for per call timing information 2025-11-11 11:47:59 +01:00
ReportTime.h LibCore: Add a CORE_API annotation to log_timing_info() 2026-04-02 20:00:06 -04:00
Resource.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Resource.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ResourceImplementation.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementation.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
ResourceImplementationFile.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementationFile.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SharedCircularQueue.h LibCore: Atomically ref-count SharedSingleProducerCircularQueue guts 2025-05-24 06:52:25 -06:00
SharedVersion.cpp LibCore: Add helpers to share arbitrary versions between processes 2026-02-05 07:28:07 -05:00
SharedVersion.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
Socket.cpp LibDNS: Run getaddrinfo on a thread pool to avoid event-loop freezes 2026-04-26 17:59:52 +02:00
Socket.h LibDNS: Run getaddrinfo on a thread pool to avoid event-loop freezes 2026-04-26 17:59:52 +02:00
SocketAddress.cpp LibCore: Define SocketAddress out-of-line to remove SocketAddressWindows 2025-12-01 06:34:32 -05:00
SocketAddress.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SocketpairWindows.cpp LibCore/LibIPC/Meta: Stop using deprecated Winsock functions 2026-02-02 10:35:11 +01:00
SocketWindows.cpp LibDNS: Run getaddrinfo on a thread pool to avoid event-loop freezes 2026-04-26 17:59:52 +02:00
StandardPaths.cpp LibCore: Remove unused header in StandardPaths 2026-02-21 19:27:35 +01:00
StandardPaths.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
System.cpp LibCore: Don’t pass O_CLOEXEC to shm_open 2026-03-31 17:21:17 +01:00
System.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SystemServerTakeover.cpp LibCore: Port SystemServerTakeover.cpp to Windows 2025-02-06 15:25:14 -07:00
SystemServerTakeover.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
SystemWindows.cpp LibCore: Remove unneeded is_null checks on StringView 2026-03-31 13:48:50 +01:00
TCPServer.cpp LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
TCPServer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
TCPServerWindows.cpp LibCore+Everywhere: Make Windows's System::ioctl consistent with POSIX 2026-01-19 06:53:29 -05:00
ThreadedPromise.h LibCore: Fix ThreadedPromise issues found with ThreadSanitizer 2025-09-24 21:05:54 -05:00
ThreadEventQueue.cpp LibCore: Remove the pending jobs functionality from ThreadEventQueue 2026-03-02 17:06:39 -06:00
ThreadEventQueue.h LibCore: Remove the pending jobs functionality from ThreadEventQueue 2026-03-02 17:06:39 -06:00
Timer.cpp LibCore: Remove unused Timer APIs for constructing with a parent 2025-08-11 16:55:25 +02:00
Timer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
TimeZoneWatcher.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
TimeZoneWatcherMacOS.mm Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
TimeZoneWatcherUnimplemented.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
TimeZoneWatcherUnix.cpp LibCore: Remove unused header in TimeZoneWatcherUnix 2026-02-21 19:27:35 +01:00
TimeZoneWatcherWindows.cpp LibCore+LibWebView+UI/Qt: Support TimeZoneWatcher on Windows 2025-10-05 15:46:15 +02:00
UDPServer.cpp LibCore: Accept ReadonlyBytes/Bytes in System::send/recv 2025-12-01 08:55:33 -05:00
UDPServer.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00
UDPServerWindows.cpp LibCore+Everywhere: Make Windows's System::ioctl consistent with POSIX 2026-01-19 06:53:29 -05:00
Version.cpp LibCore: Remove LADYBIRD_GIT_VERSION environment variable usage 2025-05-15 14:02:48 +02:00
Version.h LibCore: Explicitly export symbols from LibCore 2026-02-26 18:31:57 +01:00