[PR #1465] registry: classify libHttpClient.GDK.dll HRESULT imports (RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY) #1497

Open
opened 2026-11-26 20:21:27 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1465
Author: @piyonchu
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: pr/unimpl-libhttpclient-classify


📝 Commits (1)

  • 3e551e5 registry: classify libHttpClient.GDK.dll HRESULT imports (RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY)

📊 Changes

2 files changed (+23 additions, -0 deletions)

View changed files

📝 runtime/shims/registry.cpp (+12 -0)
📝 runtime/test/unimplemented_policy_test.cpp (+11 -0)

📄 Description

Claimed in the coordination issue as: RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY

Summary

  • Measures from game_scarlett_master.exe import and call-site analysis show 38 libHttpClient.GDK.dll imports (53 direct call/jump sites), with HCInitialize, HCCleanupAsync, and HCHttpCallCreate callers immediately testing test eax, eax; js ... (HRESULT < 0). When bundled libHttpClient.GDK.dll is absent (or gta6rt --dry-run is run on the executable alone), classify_import() previously returned ReturnClass::Other (0 / S_OK) for all 38 imports (unimplemented by return policy: hresult=0 other=72), leaving out-parameters untouched under LEONIDA_UNIMPLEMENTED=fail.
  • Classify the Microsoft GDK libHttpClient HRESULT-returning functions under libhttpclient.gdk.dll in runtime/shims/registry.cpp (HCInitialize, HCCleanupAsync, HCSettingsGetTraceLevel, HCHttpCallCreate, HCHttpCallCloseHandle, HCHttpCallPerformAsync, HCHttpCallGetRequestUrl, HCHttpCallSetTracing, HCHttpCallRequest*, and HCHttpCallResponse*), while keeping HCHttpCallDuplicateHandle (returns HCCallHandle), HCTraceImplMessage (void), and HCTraceSetEtwEnabled (void) as ReturnClass::Other.
  • Add unit tests for the new libhttpclient.gdk.dll ReturnClass::HResult / ReturnClass::Other rules in runtime/test/unimplemented_policy_test.cpp.

Verification

  • Built with MSVC (RelWithDebInfo, Windows 11, CPU-only build without Vulkan headers) and ran ctest -C RelWithDebInfo -R "^unimplemented_policy$" --output-on-failure: 1/1 passed (unimplemented_policy).
  • Verified gta6rt.exe --dry-run against a local game_scarlett_master.exe now reports unimplemented by return policy: hresult=35 other=37 (up from hresult=0 other=72).
  • python -I tests/test_build_runtime_fallback.py and python -I tests/test_text_write_line_endings.py (run below before commit).
  • git diff --check: clean.

AI-assisted; synthetic tests + --dry-run import check on Windows 11 (CPU-only build; no game files included).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1465 **Author:** [@piyonchu](https://github.com/piyonchu) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr/unimpl-libhttpclient-classify` --- ### 📝 Commits (1) - [`3e551e5`](https://github.com/ubiquitarianism/leonida/commit/3e551e5cf40554e40ce1d960f763e076a697a6e0) registry: classify libHttpClient.GDK.dll HRESULT imports (RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY) ### 📊 Changes **2 files changed** (+23 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/registry.cpp` (+12 -0) 📝 `runtime/test/unimplemented_policy_test.cpp` (+11 -0) </details> ### 📄 Description Claimed in the coordination issue as: RT-UNIMPL-LIBHTTPCLIENT-CLASSIFY ### Summary - Measures from `game_scarlett_master.exe` import and call-site analysis show 38 `libHttpClient.GDK.dll` imports (`53` direct call/jump sites), with `HCInitialize`, `HCCleanupAsync`, and `HCHttpCallCreate` callers immediately testing `test eax, eax; js ...` (`HRESULT < 0`). When bundled `libHttpClient.GDK.dll` is absent (or `gta6rt --dry-run` is run on the executable alone), `classify_import()` previously returned `ReturnClass::Other` (`0` / `S_OK`) for all 38 imports (`unimplemented by return policy: hresult=0 other=72`), leaving out-parameters untouched under `LEONIDA_UNIMPLEMENTED=fail`. - Classify the Microsoft GDK `libHttpClient` `HRESULT`-returning functions under `libhttpclient.gdk.dll` in `runtime/shims/registry.cpp` (`HCInitialize`, `HCCleanupAsync`, `HCSettingsGetTraceLevel`, `HCHttpCallCreate`, `HCHttpCallCloseHandle`, `HCHttpCallPerformAsync`, `HCHttpCallGetRequestUrl`, `HCHttpCallSetTracing`, `HCHttpCallRequest*`, and `HCHttpCallResponse*`), while keeping `HCHttpCallDuplicateHandle` (returns `HCCallHandle`), `HCTraceImplMessage` (`void`), and `HCTraceSetEtwEnabled` (`void`) as `ReturnClass::Other`. - Add unit tests for the new `libhttpclient.gdk.dll` `ReturnClass::HResult` / `ReturnClass::Other` rules in `runtime/test/unimplemented_policy_test.cpp`. ### Verification - Built with MSVC (`RelWithDebInfo`, Windows 11, CPU-only build without Vulkan headers) and ran `ctest -C RelWithDebInfo -R "^unimplemented_policy$" --output-on-failure`: **1/1 passed** (`unimplemented_policy`). - Verified `gta6rt.exe --dry-run` against a local `game_scarlett_master.exe` now reports `unimplemented by return policy: hresult=35 other=37` (up from `hresult=0 other=72`). - `python -I tests/test_build_runtime_fallback.py` and `python -I tests/test_text_write_line_endings.py` (run below before commit). - `git diff --check`: clean. *AI-assisted; synthetic tests + `--dry-run` import check on Windows 11 (CPU-only build; no game files included).* --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1497
No description provided.