Commit Graph

46 Commits

Author SHA1 Message Date
55a62a27c9 Initial guest-to-host trampoline generation 2025-10-30 02:23:09 -06:00
9367f003c5 Refactor to use TIB LastErrorValue 2025-10-28 10:01:21 -06:00
8bd15bd272 Fix heapapi ownership checks
`mi_heap_check_owned` does not work for allocations that span
multiple blocks; `mi_is_in_heap_region` is a less precise but
working way for us to check if a pointer is in our heap.

See https://github.com/microsoft/mimalloc/issues/298
2025-10-27 17:04:57 -06:00
27860f0300 Implement ntdll NtWriteFile 2025-10-27 14:56:51 -06:00
a240e3dc4b Support TlsExpansionSlots (>64 TLS slots) 2025-10-27 12:27:26 -06:00
cf166f828a Disable exceptions and RTTI 2025-10-27 10:47:38 -06:00
50a457c5e3 Begin reworking TLS impl & add TLS loader support 2025-10-27 01:03:30 -06:00
1500a4f815 ReadFile/WriteFile: Require overlapped I/O on overlapped handles (#99) 2025-10-23 23:07:56 -07:00
5597da607a Fix GetOverlappedResult without event & improve overlapped handling 2025-10-23 11:33:09 -06:00
4d5caf91e1 Implement ConnectNamedPipe 2025-10-23 11:31:35 -06:00
8e532ccf78 Implement CreateNamedPipeA 2025-10-23 11:31:35 -06:00
2e2128b4ac Implement kernel32::FlushViewOfFile and ntdll::memset 2025-10-15 18:33:26 -06:00
0c2c0f653b Add Handles::clear() and run it on exit 2025-10-09 16:48:33 -06:00
e185629d19 Always use _exit to terminate (for now) 2025-10-09 13:14:59 -06:00
dc5a91c480 Simplify process spawning using SYS_clone 2025-10-09 12:33:58 -06:00
3078cef12b Cleanup various lints and warnings 2025-10-09 12:33:13 -06:00
cac944400f Rework subprocess spawning using clone3/execveat 2025-10-08 18:13:54 -06:00
15ea650fd5 Use VERBOSE_LOG for more common calls 2025-10-08 18:12:50 -06:00
2ffc56f5c2 Improve heapapi implementation 2025-10-08 18:11:37 -06:00
061228c971 Make liburing optional; rewrite CMakeLists.txt and enable LTO 2025-10-07 14:12:37 -06:00
df36de18bf Implement async (overlapped) I/O with io_uring 2025-10-06 23:51:09 -06:00
f366e77956 Rewrite FindFirstFile/FindNextFile (again), add comprehensive tests 2025-10-06 17:57:54 -06:00
f5aa320800 Minor cleanup 2025-10-06 13:12:00 -06:00
f52ca2803f Tests for handleapi, synchapi, processes 2025-10-06 10:14:03 -06:00
166b9036fd Dont set ERROR_SUCCESS generally
Turns out we should only be setting this in a select few cases.
2025-10-06 00:03:10 -06:00
01ed50c4b4 Fix pipe reads; add tests for NtReadFile & pipes 2025-10-05 23:24:50 -06:00
ff04eb9f41 Fix OpenProcessToken pseudo-handle regression 2025-10-05 18:16:15 -06:00
0d76e541c1 Reorg headers, module_registry -> modules, remove ActCtx msvcr80.dll hack 2025-10-05 17:46:16 -06:00
b87fb5e472 Implement some ActCtx functions for msvcr80.dll 2025-10-05 15:52:38 -06:00
5a2f8e2926 Docker build fixes 2025-10-05 14:37:45 -06:00
0bc80b6618 Split into HostContextGuard/GuestContextGuard 2025-10-05 14:32:06 -06:00
cd7baffc5e Save/restore fs/gs segments when re-entering host code 2025-10-05 13:58:40 -06:00
04516b246c More logging & some hacks 2025-10-04 21:26:46 -06:00
cf7ea70fac Some Atom function impls 2025-10-04 14:58:35 -06:00
ffdfa38591 Actually add to ProcessManager when spawning 2025-10-04 14:12:24 -06:00
166399f143 Move main source files into src/ 2025-10-04 13:34:31 -06:00
390f26b28d New handles, threading and processes subsystems 2025-10-04 13:31:26 -06:00
704dfd90ec WIP file handles refactor 2025-10-03 10:57:43 -06:00
a9581423a8 VirtualQuery rework 2025-10-02 17:11:28 -06:00
d8150e33b9 Rework thread TIB handling & DLL initialization handling 2025-10-02 16:40:23 -06:00
8330f27479 Add CreatePipe, CON* support for CreateFileA, more for cygwin 2025-10-02 09:47:41 -06:00
694eb85deb Remove advapi32/internal.cpp; move to relevant source files 2025-10-02 09:15:25 -06:00
3249ebf4bf Split advapi32 into separate files (part 2) & more impls for ee-gcc/cygwin 2025-10-02 09:05:27 -06:00
2cbd624119 Split kernel32 into separate files (part 3) 2025-10-02 01:02:26 -06:00
fa3ed4893a Split kernel32 into separate files (part 2) 2025-10-02 00:20:28 -06:00
9ea5b24b67 Split kernel32 into separate files (part 1) 2025-10-01 18:18:13 -06:00