fix(appcontent): match the download1 quota atomic type #16797

Closed
wanderingbug wants to merge 1 commit from upstream-pr/16797 into main
wanderingbug commented 2026-11-07 16:48:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wanderingbug on 2026-11-07T16:48:35Z.


compare_exchange_weak requires a reference to the atomic value type. download1QuotaBytes is uint64_t, and the expected value was a size_t. Those are different types on Darwin even though both are 64 bits.

What

Open #16801 (fix/macos-test-compile, 38bddbff44) edits only ResourceRequest.cpp, RtcpTransportFeedback.cpp, and GuestCesGbSetters.cpp: <initializer_list> and ResourceRequestBase value initialization. None of those symbols are in this pull request.

The expected value for download1QuotaBytes.compare_exchange_weak is std::uint64_t, matching std::atomic<std::uint64_t>. The download2 quota path already used that type.

Tested

The combined libs build compiled libSceAppContent with the overlay. There is no separate quota behavior result. Published d21846bfe6 is the same patch as tested e074d9c7, replayed cleanly onto dd00a9c54e. That published SHA was not rebuilt on the Mac. Not tested on a second machine; no game tested.

Checklist

  • Based on current main; no other open PR implements the same functions. Unchecked: parent is dd00a9c54e, and upstream main is now daad891ea6. #16801 does not implement these functions. Other open pull requests were not fully scanned.
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt. The diff changes one local variable's type.
  • Unimplemented paths throw. No new stub.
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source. No 3rdparty/ change.
  • Generic behaviour, not specific to one title
  • Depends on: none. Test-only #7804 and #4630 were in the Mac tree and are not in this branch.
  • Fixes: none found in this pass. No issue search.
  • Unblocks: none claimed. No title bring-up check.
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5203827364 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16797). Originally posted by [wanderingbug](https://github.com/wanderingbug) on 2026-11-07T16:48:35Z. --- compare_exchange_weak requires a reference to the atomic value type. download1QuotaBytes is uint64_t, and the expected value was a size_t. Those are different types on Darwin even though both are 64 bits. ### What Open #16801 (`fix/macos-test-compile`, `38bddbff44`) edits only `ResourceRequest.cpp`, `RtcpTransportFeedback.cpp`, and `GuestCesGbSetters.cpp`: `<initializer_list>` and `ResourceRequestBase` value initialization. None of those symbols are in this pull request. The expected value for `download1QuotaBytes.compare_exchange_weak` is `std::uint64_t`, matching `std::atomic<std::uint64_t>`. The download2 quota path already used that type. ### Tested The combined `libs` build compiled `libSceAppContent` with the overlay. There is no separate quota behavior result. Published `d21846bfe6` is the same patch as tested `e074d9c7`, replayed cleanly onto `dd00a9c54e`. That published SHA was not rebuilt on the Mac. Not tested on a second machine; no game tested. ### Checklist - [ ] Based on current `main`; no other open PR implements the same functions. Unchecked: parent is `dd00a9c54e`, and upstream `main` is now `daad891ea6`. #16801 does not implement these functions. Other open pull requests were not fully scanned. - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt. The diff changes one local variable's type. - [x] Unimplemented paths throw. No new stub. - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source. No `3rdparty/` change. - [x] Generic behaviour, not specific to one title - [x] Depends on: none. Test-only #7804 and #4630 were in the Mac tree and are not in this branch. - [ ] Fixes: none found in this pass. No issue search. - [ ] Unblocks: none claimed. No title bring-up check. - [x] GPUs tested: n/a - [x] AI-assisted: yes
gabichuuuuu commented 2026-11-07 22:09:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-07T22:09:28Z.

Review: COMMENTED


Read d21846bfe6. download1QuotaBytes is std::atomic<std::uint64_t> (Export.cpp:65), so compare_exchange_weak needs a std::uint64_t&, which current now is. sceAppContentDownload2Expand already used std::uint64_t current for download2QuotaBytes, so the two now match, and no other size_t expected value remains in the file. The size > current comparison is unchanged on Linux and Windows, where the types are identical. Looks right.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5815226662 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16797#pullrequestreview-5815226662). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-07T22:09:28Z. **Review:** COMMENTED --- Read `d21846bfe6`. `download1QuotaBytes` is `std::atomic<std::uint64_t>` (`Export.cpp:65`), so `compare_exchange_weak` needs a `std::uint64_t&`, which `current` now is. `sceAppContentDownload2Expand` already used `std::uint64_t current` for `download2QuotaBytes`, so the two now match, and no other `size_t` expected value remains in the file. The `size > current` comparison is unchanged on Linux and Windows, where the types are identical. Looks right. AI-assisted: yes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!16797
No description provided.