Skip to content

fix(libSceAppContent): compare the download2 quota through its own 64-bit type - #15755

Open
imellag wants to merge 1 commit into
boykopovar:mainfrom
imellag:fix/libSceAppContent-download2-quota-type
Open

imellag wants to merge 1 commit into
boykopovar:mainfrom
imellag:fix/libSceAppContent-download2-quota-type

Conversation

@imellag

@imellag imellag commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What

sceAppContentDownload2Expand (6122c5c) keeps the quota in a std::atomic<std::uint64_t> and reads it into a size_t before compare_exchange_weak(current, size). On macOS size_t is unsigned long and std::uint64_t is unsigned long long, so the expected value cannot bind to the atomic's unsigned long long& and libc++ rejects the call:

core/libs/prx/libSceAppContent/Export.cpp:341:51: error: no matching member function for call to 'compare_exchange_weak'
note: candidate function not viable: no known conversion from 'size_t' (aka 'unsigned long') to 'unsigned long long &' for 1st argument

current now has the atomic's own type. On Linux and Windows both names are the same 64-bit type, so nothing changes there.

Tested

macOS 27.2, Apple M4 Pro, x86-64 Release under Rosetta 2. main doesn't build on macOS on its own, so this was built in the support branch support/macos-boot-1103 merged with main b11c7bf84f (the open macOS port PRs #7631, #7804, #4630, #11437 and local build fixes). Without this commit the full build stops at Export.cpp:341. With it, #15700 and #15756 (two other macOS build stops that reached main today) the full build goes through, and ctest -R '^(guest_appcontent|guest_np_common_rtc|guest_np_common_state_predicates)' passes 9 of 9.

tools/check_conventions.py --base upstream/main passes, and tools/pr_overlap.py finds no overlap.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant