mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-12-01 13:12:28 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a711d24946 |
No files matched your search
@@ -10,6 +10,7 @@ Guest execution uses original, purpose-built test programs. Commercial Xbox game
|
||||
remains unsupported.
|
||||
|
||||
### Fixed
|
||||
- **`xgameruntime`: the IXStore dispatch table covers every slot titles call** (#774). The table behind `QueryApiImpl` for the store interface (CLSID `0DD112AC-…`, IID `B09D803C-…`) had 40 entries, while the console runtime library calls it at slots up to 69 (call-site observation of a project-authorized target build); such a call read past the end of the table and jumped to whatever followed it. The table now has 80 entries, like the IXStoreDurables table under the same CLSID, and every slot without an implementation is the logged `E_NOTIMPL` stub. `test_xgameruntime` calls slots 40 to 79 through `QueryApiImpl`.
|
||||
- **`gfx10-translate`: scan all `XBCH` candidates and support version 2/3 payloads** (#721). `container_code` previously stopped at the first `b"XBCH"` byte sequence in a container, so incidental `b"XBCH"` bytes earlier in the blob (for example in `STAT` or `DXIL` bitcode) caused it to read garbage sizes and fail with `XBCH record: compressed size past the end`. It now scans all `b"XBCH"` occurrences, validates the 24-byte header, bounds, version (`2` uncompressed `FSSM`, `1` and `3` zlib-compressed `FSSM`), and `FSSM` magic, and skips non-matching candidates. Covered by synthetic unit tests in `gfx10_translate::container::tests`.
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -629,8 +629,12 @@ HRESULT WINAPI store_dur_lic_result(void*, void* async, void** out) {
|
||||
return XStoreAcquireLicenseForDurablesResult(async, out);
|
||||
}
|
||||
|
||||
const std::array<const void*, 40> kStoreVtbl = [] {
|
||||
auto v = make_default_vtbl<40>();
|
||||
// The console runtime library calls IXStore at slots up to 69 (call-site observation of a
|
||||
// project-authorized target build), and IXStoreDurables under the same CLSID at 71 and 72. A
|
||||
// 40-entry table let those calls read past its end and jump to whatever followed it (#774).
|
||||
// 80 entries, like the durables table; every slot without an implementation is a logged stub.
|
||||
const std::array<const void*, 80> kStoreVtbl = [] {
|
||||
auto v = make_default_vtbl<80>();
|
||||
v[3] = reinterpret_cast<const void*>(&store_create_ctx);
|
||||
v[4] = reinterpret_cast<const void*>(&store_close_ctx);
|
||||
v[5] = reinterpret_cast<const void*>(&store_assoc_async);
|
||||
|
||||
@@ -971,6 +971,23 @@ int main() {
|
||||
close(com_user, second);
|
||||
}
|
||||
|
||||
// IXStore (#774). The console runtime library calls this interface at slots up to 69, and
|
||||
// IXStoreDurables (same CLSID) at 71 and 72. Every slot of an 80-slot table must be callable:
|
||||
// the ones BetterXen does not implement answer E_NOTIMPL. A shorter table makes these calls
|
||||
// read past its end, which crashes or returns garbage.
|
||||
{
|
||||
const GUID store_clsid = {0x0DD112AC, 0x7C24, 0x448C, {0xB9, 0x2B, 0x39, 0x60, 0xFB, 0x5B, 0xD3, 0x0C}};
|
||||
const GUID store_iid = {0xB09D803C, 0x2414, 0x4A05, {0x82, 0xC6, 0x66, 0xDF, 0xDC, 0x9E, 0x9A, 0x44}};
|
||||
void* com_store = nullptr;
|
||||
CHECK(SUCCEEDED(query_api(&store_clsid, &store_iid, &com_store)) && com_store);
|
||||
auto** store_vtbl = *static_cast<void***>(com_store);
|
||||
for (int slot = 40; slot < 80; ++slot) {
|
||||
auto stub = reinterpret_cast<HRESULT(WINAPI*)(void*)>(store_vtbl[slot]);
|
||||
CHECK(stub(com_store) == E_NOTIMPL);
|
||||
}
|
||||
CHECK(reinterpret_cast<ULONG(WINAPI*)(void*)>(store_vtbl[2])(com_store) >= 1);
|
||||
}
|
||||
|
||||
check_delayed_callback(query_api);
|
||||
check_async_run_and_queue_handles(query_api);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user