Repository navigation
Conversation
|
Independent native Windows check of 0fe21921, MSVC 19.44 and Windows SDK 10.0.26100. All 11 stock The synthetic registry returned the exact match first, matched DLL names regardless of case, and found same-contract versions for both API-MS and EXT-MS names. A different major or minor version did not match, and export names remained case-sensitive. AI-assisted. |
|
Reviewed 0fe2192, clean vs main 976b3ec: the version-prefix fallback in find() resolves api-/ext-ms names by contract prefix with exact rows keeping priority and the final version free; malformed names refuse; the lower_bound scan over the sorted map is correct. registry_apiset_test.cpp's 11-case table covers case-insensitive DLL vs case-sensitive export, major/minor distinction and malformed rows, registered in CMakeLists. Windows-only test, not run here; CI pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run, C++ review-only). |
throny
left a comment
There was a problem hiding this comment.
Tested 0fe2192 on Windows 11, MSVC 14.44, i9-12900K (no SSE4a/CLZERO/MONITORX, has CLWB): pass
Commands (CMake + Ninja, RelWithDebInfo, VS 2022 BuildTools vcvars64, Vulkan SDK 1.4.363.0, -j 6):
- The build at 0fe2192 succeeds.
registry_apiset_test:11 checks, 0 failed.- Negative control: the same test compiled against the merge-base's
runtime/shims/registry.cpp(8575d36) gives11 checks, 3 failed: the API-set version fallback, the case-insensitive lookup and theext-msfallback. These are the three your description lists. - Full
ctest -j 6with the Vulkan ICD hidden (no GPU on this run): 3 of 270 failed. They ared3d12_sparse_queue_family,vk_bindless_ps_texandvk_bindless_ps_imgatomic, atvkCreateInstance(-9) because I hid the driver. They fail the same way at every other head I tested today and are unrelated to this PR.
gta6rt --dry-run on my own 1.0.2.1 package (read-only, overlay outside the package), gta6rt built at the merge-base 8575d36 and at this head:
- The per-module counts are identical:
- exe: shim 54, host 432, module 72, unimplemented 29.
- XboxBvhBuilder: 5/52. FidelityFX loader: 6/16. libHttpClient: 28/170. Bink2Scarlett: 5/55.
- 5 modules mapped, 29 unimplemented. The sorted binding lines differ in nothing.
- So against today's shim table, no import of the retail package binds differently with the fallback; every API-set name it imports is already an exact row. The change only matters for a contract version that has no row of its own.
Reviewed the whole diff. apiset_version_prefix only accepts api-ms-/ext-ms- names with three decimal version fields. The exact row is still looked up first, and the fallback iterates only the lower_bound(prefix) family. No finding.
AI-assisted.
@ItsNotRexed: an exe PR, as you asked.
Claim: #6910 (comment)
AI-assisted.
What
On an exact shim lookup miss, the registry searches
api-ms-*andext-ms-*rows for the same contract, major version, minor version, and export. Any numeric last version segment can match. DLL names are matched case-insensitively, and exact rows take precedence.Why
An image can import a shimmed export from a different version of the same API-set contract and silently bind it to the host. On Windows 11 build 26200,
ApiSetQueryApiSetPresencereportedprocessthreads-l1-1-0,-l1-1-3, and-l1-1-99present, with-l1-2-0absent. Measurements in PR #7207Tested
On p2 with clang-cl 19.1.1 and Wine 9.0, ran
/root/fast_test_exe.sh /root/c2-apiset registry_apiset_test. The test uses synthetic registry entries. It requires no GPU or game files.8575d36edwith the new test), 11 checks ran and 3 failed (exit 1). Theapi-ms-*, mixed-case, andext-ms-*version lookups missed their shims.0fe219219), all 11 checks passed (exit 0), including the-l1-2-0negative control and exact-row precedence.Known cost (from the review): a lookup that misses scans the rows of the matching contract family, and each lookup re-folds the DLL name; lookups happen at import-binding time, not per call.