Windows: full module parity and runtime-qualified test suite
- Net/IO: Winsock sockets (UdpSocket, TlsClientStream, WebSocketClient), HttpServer port with a loopback wake socket replacing eventfd, and the select-based IO backend built on Windows (ws2_32). - Net: implement StaticFileResolver::open_safe and OpenedStaticFile on Windows (reparse-point rejection plus canonical containment check on the opened handle) and widen native handles to intptr_t. - Plugin: hot reload works on Windows by loading a fresh copy while the old DLL stays mapped; enable the reload, discovery and FSM service reload tests and retire the plugin file by rename instead of replacement. - Update: activation pointer as a directory junction on Windows. - Stacktrace: portable path comparison for wide native strings. - Docs/targets: every module allowlisted on Windows; record the Wine run (2000 tests, 1977 passed, 23 skipped, 0 failed). - CMake: add -Wa,-mbig-obj for GNU MinGW targets (COFF section limit). - Async: fix the FuturePool stopped-after-close test to wait for the executor to release its admission slot instead of racing it. Windows and Linux suites both pass: Windows 2000/1977/23 skips/0 failed, Linux 2027/2023/4 skips/0 failed.
This commit is contained in:
1 parent
1b1947340f
commit
b3c959b920
32 files changed
+1836
-401
No files matched your search
@@ -228,7 +228,8 @@ Void::Testing::Test net_static_file_resolver_open_safe_pins_root_and_rejects_sym
|
||||
std::ofstream f{secret};
|
||||
f << "top-secret";
|
||||
}
|
||||
std::filesystem::create_symlink(secret, root / "escape.txt");
|
||||
std::error_code link_ec;
|
||||
std::filesystem::create_symlink(secret, root / "escape.txt", link_ec);
|
||||
|
||||
auto resolver = Void::Net::StaticFileResolver::create(root);
|
||||
Void::Testing::require(resolver.has_value());
|
||||
@@ -248,9 +249,13 @@ Void::Testing::Test net_static_file_resolver_open_safe_pins_root_and_rejects_sym
|
||||
Void::Testing::require(missing.has_value());
|
||||
Void::Testing::expect(!missing->has_value());
|
||||
|
||||
// Symlink inside root is rejected by O_NOFOLLOW.
|
||||
auto sym = resolver->open_safe("/escape.txt");
|
||||
Void::Testing::expect(!sym.has_value());
|
||||
// Symlink inside root is rejected by O_NOFOLLOW (or reparse-point
|
||||
// rejection on Windows); without symlink privilege there is nothing to
|
||||
// create, so only that assertion is skipped.
|
||||
if (!link_ec) {
|
||||
auto sym = resolver->open_safe("/escape.txt");
|
||||
Void::Testing::expect(!sym.has_value());
|
||||
}
|
||||
|
||||
// Traversal rejected.
|
||||
auto trav = resolver->open_safe("/../secret.txt");
|
||||
|
||||
Reference in new issue
Block a user