DirectStorage: clear out pointers on failure #84
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/84"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by davutsimsekk on 2026-11-24T21:22:01Z.
DirectStorage's_COM_Outptr_methods left*ppvuntouched on failure:DStorageGetFactoryfor an unknown IID or a null IIDOpenFilefor a null path or a path that cannot be openedCreateQueuefor a null description or when the scheduler cannot be createdCreateStatusArraydid not validate the out pointer before allocatingA title that inspects
*ppvafter a failed call sees a stale pointer; the file and queue paths could also leak the object they created whenputrejected a null out pointer.This validates and clears
*ppvbefore any work, and leaves the success paths unchanged.Test
a_refused_factory_interface_clears_the_out_pointeranda_failed_file_or_queue_creation_clears_the_out_pointeruse a stale0x1234pointer and assert it is null after each failure; the second checks a null path and a null queue description. Onmainboth remain stale.cargo test -p victory-hle --lib: 98 passed, 0 failedcargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean[PR #84] DirectStorage: clear the factory out pointer on failureto [PR #84] DirectStorage: clear out pointers on failureView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.