Repository navigation
Conversation
…eject unknown types
|
Tested
AI-assisted. No game files. |
|
Tested efe94cc on NVIDIA GeForce RTX 5080 Laptop GPU, driver 621.14, Windows 11 (build 26300), MSVC 14.44, RelWithDebInfo: pass. |
Kam471
left a comment
There was a problem hiding this comment.
Head efe94cc7842e · Verdict: LGTM
Built xdxr_descs_test; xdxr_descs_test.exe → exit 0 (xdxr_descs: ok). git diff --check clean.
The walk now uses size_in_bytes / sizeof(StreamRecord), so a partial leading/trailing record is never read; type > 2 is rejected before the walk; a huge size cannot wrap pointer arithmetic. Cases cover all of those. No blockers.
|
Tested
AI-assisted (Claude Code). |
|
Tested
So the new test depends on the change. From the agent's read, which I did not repeat: the huge-size case in the new test stops on an unknown record type rather than on the new count bound; the partial-record case is the one that fails on Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting. |
…ProjectLeonida#5182 ProjectLeonida#5215 ProjectLeonida#5281 ProjectLeonida#5310 ProjectLeonida#5351 ProjectLeonida#5447 ProjectLeonida#5068 ProjectLeonida#5166 ProjectLeonida#5277 ProjectLeonida#5282 ProjectLeonida#5475 ProjectLeonida#5158 ProjectLeonida#5183 ProjectLeonida#5200 ProjectLeonida#5384 ProjectLeonida#5427 ProjectLeonida#5466 ProjectLeonida#5471 ProjectLeonida#5365 ProjectLeonida#5382 ProjectLeonida#5405 ProjectLeonida#8919 fork integration. Each parent after the first is an exact reviewed PR head. ProjectLeonida#5153 88cf9ac ProjectLeonida#5153 (comment) ProjectLeonida#5157 7d40e36 ProjectLeonida#5157 (comment) ProjectLeonida#5182 4996abf ProjectLeonida#5182 (review) ProjectLeonida#5215 d3813da ProjectLeonida#5215 (comment) ProjectLeonida#5281 c7479ca ProjectLeonida#5281 (comment) ProjectLeonida#5310 4a92a11 ProjectLeonida#5310 (comment) ProjectLeonida#5351 d323535 ProjectLeonida#5351 (comment) ProjectLeonida#5447 3ea2012 ProjectLeonida#5447 (comment) ProjectLeonida#5068 c677645 ProjectLeonida#5068 (comment) ProjectLeonida#5166 f38610b ProjectLeonida#5166 (comment) ProjectLeonida#5277 1890d03 ProjectLeonida#5277 (comment) ProjectLeonida#5282 e720a87 ProjectLeonida#5282 (comment) ProjectLeonida#5475 efe94cc ProjectLeonida#5475 (comment) ProjectLeonida#5158 cd6149d ProjectLeonida#5158 (comment) ProjectLeonida#5183 411af87 ProjectLeonida#5183 (comment) ProjectLeonida#5200 8b3e1f6 ProjectLeonida#5200 (comment) ProjectLeonida#5384 4d86d07 ProjectLeonida#5384 (comment) ProjectLeonida#5427 18a1ef2 ProjectLeonida#5427 (comment) ProjectLeonida#5466 59a92c8 ProjectLeonida#5466 (comment) ProjectLeonida#5471 c85e97a ProjectLeonida#5471 (comment) ProjectLeonida#5365 24da2a0 ProjectLeonida#5365 (comment) ProjectLeonida#5382 4ce3ce2 ProjectLeonida#5382 (comment) ProjectLeonida#5405 f29b3eb ProjectLeonida#5405 (comment) AI-assisted integration.
Summary
Fixes three bounds and validation defects in
leonida::xdxr::find_stream_record()(runtime/src/xdxr_descs.h):Previously computed
end = (const uint8_t*)desc.stream + desc.size_in_bytesand walkedrecord < end. Any non-multiple ofsizeof(StreamRecord)(e.g.1..15or17..31bytes) inspected and returned aStreamRecord*whose 16 bytes extended pastdesc.size_in_bytes.size_in_bytes:Adding a huge
size_in_bytes(such as~uint64_t{0}) todesc.streamwrapped around the 64-bit address space soend < record, causing UB and returningnullptreven whenrecords[0]matched.type > 2) returned as matches:Checking
record->type == typebeforerecord->type > 2returned an unknown record when queryingtype > 2instead of stopping at unknown types (perdocs/xdxr.md§3).Fix (
efe94cc7)if (type > 2 || desc.stream == nullptr) return nullptr;.const uint64_t count = desc.size_in_bytes / sizeof(StreamRecord);complete 16-byte records by index without computing an out-of-bounds end pointer, checkingif (records[i].type > 2) return nullptr;first.runtime/src/xdxr_descs.h, staying disjoint from open PR XDXR: serialize acceleration structures and record batched builds (RT-148) #4494.Verification (Windows 11 x64, MSVC 19.52 VS2026 Build Tools, Windows SDK d3d12.h)
runtime/test/xdxr_descs_test.cpp):line 77: find_stream_record(StreamDesc{rem, records}, 0) == nullptr(exit 1).efe94cc7):cmake --build runtime/build --target xdxr_descs_test— 0 errors, 0 warnings.runtime\build\xdxr_descs_test.exe->xdxr_descs: ok (checked against d3d12.h)(exit 0).ctest --test-dir runtime/build --output-on-failure -R "^xdxr_descs$"->1/1 Test #6: xdxr_descs ... Passed.python -I -B tests/test_ctest_registration.py(4/4 OK),scripts/check_no_game_data.py(exit 0),git diff --check(exit 0),CRLF=0,git merge-tree --write-tree upstream/main HEAD(bc292b0093888b746e0ee7a891fba7c849efc422, exit 0).AI-assisted (Gemini, Antigravity); no copyrighted game files or dumps used.