[PR #1149] xgameruntime: test the XErrorReport export and count it among the looked-up names (OLD-9914) #1184

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1149
Author: @ambroseautomation
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: carry/old-9914-xerror-export-test


📝 Commits (1)

  • 5b073fb xgameruntime: test the XErrorReport export and count it among the looked-up names

📊 Changes

2 files changed (+12 additions, -3 deletions)

View changed files

📝 runtime/shims/xgameruntime.cpp (+2 -1)
📝 runtime/test/xgameruntime_test.cpp (+10 -2)

📄 Description

Claimed in the coordination issue as: OLD-9914 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141782281)

What and why

Carries forward old-pr/9914 (draft #182, original commit author Sunkiller-qc preserved; indexed in #17), rebased cleanly onto current main.

Adds regression coverage for the XErrorReport DLL export that XGameRuntimeInitialize looks up via GetProcAddress:

  • Checks that GetProcAddress(xgameruntime.dll, "XErrorReport") resolves to the shim table's function alongside the five xgameruntime.lib thunk entry points (6 total).
  • Invokes the export using its two-argument WINAPI signature XErrorReport(HRESULT, const char*) (no this) while the XErrorImpl callback is installed and verifies that the callback receives the HRESULT and message and returns S_OK.
  • Updates the entry-point comments in runtime/shims/xgameruntime.cpp and runtime/test/xgameruntime_test.cpp.

Tested

  • Compiled and ran xgameruntime_test.exe natively on Windows 11 with MSVC (/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2): xgameruntime_test: OK (159 checks).
  • python -I scripts/check_no_game_data.py runtime/shims/xgameruntime.cpp runtime/test/xgameruntime_test.cpp: exit 0 (no game data).

GPUs tested: n/a (CPU/OS runtime shim test; built and tested on Windows 11 Pro 64-bit, MSVC VS 18)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — xgameruntime test)

🔄 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/1149 **Author:** [@ambroseautomation](https://github.com/ambroseautomation) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `carry/old-9914-xerror-export-test` --- ### 📝 Commits (1) - [`5b073fb`](https://github.com/ubiquitarianism/leonida/commit/5b073fbedf4872e1438f46f4a616ca389f903c93) xgameruntime: test the XErrorReport export and count it among the looked-up names ### 📊 Changes **2 files changed** (+12 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/xgameruntime.cpp` (+2 -1) 📝 `runtime/test/xgameruntime_test.cpp` (+10 -2) </details> ### 📄 Description Claimed in the coordination issue as: OLD-9914 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141782281) ### What and why Carries forward `old-pr/9914` (draft #182, original commit author `Sunkiller-qc` preserved; indexed in #17), rebased cleanly onto current `main`. Adds regression coverage for the `XErrorReport` DLL export that `XGameRuntimeInitialize` looks up via `GetProcAddress`: - Checks that `GetProcAddress(xgameruntime.dll, "XErrorReport")` resolves to the shim table's function alongside the five `xgameruntime.lib` thunk entry points (6 total). - Invokes the export using its two-argument `WINAPI` signature `XErrorReport(HRESULT, const char*)` (no `this`) while the `XErrorImpl` callback is installed and verifies that the callback receives the `HRESULT` and message and returns `S_OK`. - Updates the entry-point comments in `runtime/shims/xgameruntime.cpp` and `runtime/test/xgameruntime_test.cpp`. ### Tested - Compiled and ran `xgameruntime_test.exe` natively on Windows 11 with MSVC (`/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2`): `xgameruntime_test: OK (159 checks)`. - `python -I scripts/check_no_game_data.py runtime/shims/xgameruntime.cpp runtime/test/xgameruntime_test.cpp`: exit 0 (no game data). GPUs tested: n/a (CPU/OS runtime shim test; built and tested on Windows 11 Pro 64-bit, MSVC VS 18) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a — `xgameruntime` test) --- <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#1184
No description provided.