Commit Graph
38 Commits
Author SHA1 Message Date
zachdoxsee db40a1307d loader, cli: bound delay-load tables by their declared size (#244)
Address review on the delay-import probe change:

- Read only descriptors inside the delay import directory's declared
  size, and require that size to hold the terminating empty descriptor.
- Require each descriptor's DLL name, import address table and import
  name table to be present and to start in section data, with a
  diagnostic naming the missing field.
- Leave delayed rows out of the xenora imports sync backlog, so its
  totals stay ordinary-only.

Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
2026-11-24 16:28:02 +01:00
zachdoxsee b174b45bed loader: report delay-loaded PE imports in the static probe (#244)
Read the PE32+ delay-load directory (data directory 13) with a bounded
parser and list each delay-loaded import in imports.csv, marked by a new
import_table column. Ordinary totals and missing_imports.csv are
unchanged; the JSON report counts delayed slots and DLLs separately and
carries a diagnostic for truncated, out-of-range or unsupported tables.

Adds an original fixture with ordinary and delayed imports, generated by
fixtures/pe/delay-imports.py and cross-checked with llvm-readobj.

Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
2026-11-24 16:25:14 +01:00
Adeeb RahmanandCursor 17fa47f058 Add CRT onexit tables, atexit and _cexit
Exit functions are guest code run through callback tasks in reverse
registration order. Table storage lives on the default guest heap.

Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-24 09:52:50 -05:00
Adeeb RahmanandCursor 8d7f7fadb4 Add guest system information, calendar time and sleeping
The guest sees a configurable simulated machine, kept separate from the
detected host hardware. Sleeping goes through the injectable clock.
Move the PE fixture harness into a shared test support module.

Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-24 09:48:16 -05:00
Adeeb RahmanandCursor 1eae910ce1 Let services call guest code and continue after it returns
Add callback tasks to the import dispatcher. A task runs guest callbacks
on a reserved stack frame, checks the nonvolatile registers after each,
and returns to the original caller. Use it for qsort, qsort_s, bsearch,
bsearch_s, _initterm, _initterm_e, InitOnceExecuteOnce and FlsFree
cleanup callbacks.

Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-24 09:41:39 -05:00
Adeeb RahmanandCursor ac6f9daff3 Add guest mutexes, locks, one-time init, SLists and TLS slots
Ownership is keyed by guest TEB. Operations that would block another
guest thread stop with the runtime-limit fault because no guest
scheduler exists. Also stop the import generator from overriding the
semaphore handlers with stubs, and check every generator standard
service against the loader registry.

Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-24 09:33:07 -05:00
Adeeb Rahman a7a0235c79 Merge remote-tracking branch 'origin/main' into feat/system-runtime-expansion
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>

# Conflicts:
#	CHANGELOG.md
#	crates/loader/src/memory.rs
2026-11-24 06:48:06 -05:00
Ranveer Soni 08c4451e68 docs: add draw, blend and depth contract sections to the interface contracts 2026-11-24 15:01:17 +05:30
Adeeb Rahman c4ce9a4e38 Resolve named exports from built-in guest modules
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:53:16 -05:00
Adeeb Rahman 2de0483142 Share guest file positions across duplicated handles
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:50:28 -05:00
Adeeb Rahman 6ecbd14915 Enumerate the synthetic guest namespace through typed search handles
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:49:25 -05:00
Adeeb Rahman 3c9b8d988b Move closed guest files and report namespace attributes
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:47:34 -05:00
Adeeb Rahman ab598f0820 Manage directories and closed files in the guest namespace
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:46:24 -05:00
Adeeb Rahman 2bc08a1851 Seek and resize files on the synthetic guest drive
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:45:02 -05:00
Adeeb Rahman 6a60749939 Provide bounded synchronous guest file IO on a synthetic drive
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:43:49 -05:00
Adeeb Rahman 06bdf189e4 Add counted guest semaphores to immediate waits
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:41:24 -05:00
Adeeb Rahman 9b22c664bb Handle non-alertable extended guest event waits
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:39:46 -05:00
Adeeb Rahman 654e4c28b5 Resolve immediate guest waits on multiple events
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:38:04 -05:00
Adeeb Rahman b861348667 Support 64-bit integer conversion in the guest CRT
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:36:13 -05:00
Adeeb Rahman a4a2425bcc Parse Windows long integers in the guest CRT
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:35:00 -05:00
Adeeb Rahman edba4df430 Expose guest CRT errno and report allocation failures
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:33:03 -05:00
Adeeb Rahman f992721fda Back CRT allocation imports with the default guest heap
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:31:29 -05:00
Adeeb Rahman 8e29b54919 Track allocations owned by private guest heaps
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:30:00 -05:00
Adeeb Rahman cd01d04a96 Resize default guest heap blocks with transactional failure
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:27:52 -05:00
Adeeb Rahman 6b068a225d Expose a bounded default process heap to Win64 guests
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:26:23 -05:00
Adeeb Rahman 4c1ac39c7e Support Win64 wide string length and comparison
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:23:47 -05:00
Adeeb Rahman d76c7d061c Compare CRT byte strings through checked guest reads
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:22:38 -05:00
Adeeb Rahman 7134523a08 Run CRT byte memory operations through checked guest spans
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:21:38 -05:00
Adeeb Rahman e4b1898b00 Serve bounded CRT byte string lengths through the guest registry
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:20:22 -05:00
Adeeb Rahman 86467c2f6c Add guest events with shared duplicate handles
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:17:00 -05:00
Adeeb Rahman 58d0d5a088 Expand guest timing and thread handle services
Signed-off-by: Adeeb Rahman <therealabeeb@icloud.com>
2026-11-24 01:12:35 -05:00
Ranveer Soni 0be6220e47 feat(add): x17things, as well as more d3d12 testing 2026-11-24 09:49:53 +05:30
Ranveer Soni 0597ad06d1 feat: expand native guest execution and RDNA2 Metal graphics 2026-11-23 17:11:02 +05:30
Ranveer Soni 3133d8eddc docs: overhaul project documentation and maintenance checks
Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-23 11:08:43 +05:30
Ranveer Soni cc0daa79e6 fix: validate the layout of skipped fixture instructions 2026-11-22 18:29:11 +05:30
Ranveer Soni 095ec65aee test: strengthen Phase 01 mutation survivor coverage 2026-11-22 18:25:31 +05:30
Ranveer Soni 285d0d7926 docs: describe the profiled native backend entry point
Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-22 14:23:35 +05:30
Ranveer Soni 96cff7c66e feat: establish native RDNA-to-Metal recompilation foundation
Add gfx1030 decoding, semantic validation, Metal shader generation, and an independent CPU interpreter for three reproducible compute fixtures. Include native Metal tests, LLVM fixture verification, and the existing CI and Phase 01 handoff.

Verified formatting, all-features Clippy and tests, LLVM decoding, native ARM64 linkage, and all three demo fixtures with Metal API and shader validation enabled.

Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-22 13:41:55 +05:30