Commit Graph
1804 Commits
Author SHA1 Message Date
Dean a6762cac70 Merge pull request #11589 from oneandonlydean/astro/libc-registry-atomic-v2
fix(libc): stage allocation registry changes before the host mapping changes
2026-10-27 23:02:08 +13:00
Dean 801d5b9bc1 Merge pull request #11344 from thuanquang/fix/commit-every-view-of-a-run
fix(libc): reset every page of a run view that Commit reprotects
2026-10-27 22:05:59 +13:00
Dean 3bed136010 Merge pull request #10574 from edubox/feat/libc-mtx-init-default-name
feat(libc): export _Mtx_init_with_default_name_override
2026-10-27 21:34:30 +13:00
Dean 77f68f314b Merge pull request #11560 from Ragbie/fix/write-after-read-update-stream
fix(libc): set up streams for writing after a read as FreeBSD does on Windows
2026-10-27 21:27:48 +13:00
Dean 8f255109ca Merge pull request #11400 from iAbdulrrahman/feat/libc-heapsort
feat(libc): implement heapsort
2026-10-27 21:25:09 +13:00
Dean fd4a4ca3dc Merge pull request #11277 from AlexFigas/fix/libc-fpclassifyf-dinkumware-codes
fix(libc): return Dinkumware codes from __fpclassifyf
2026-10-27 21:22:30 +13:00
Dean f9b2db1d41 Merge pull request #11269 from Gruzzberry/fix/realpath-symlinks
fix(libc): realpath resolves symbolic links like FreeBSD
2026-10-27 21:22:09 +13:00
Dean e07c21ce68 Merge pull request #11157 from janzezno/feat/agc-frame-capture-linux
feat(agc): capture and replay frames on Linux
2026-10-27 21:20:55 +13:00
Dean d5f7d86ccc Merge pull request #11139 from JJenkx/fix/libc-modf-floating-environment
fix(libc): preserve modf decomposition and floating-point status
2026-10-27 21:20:33 +13:00
Dean d090e62841 Merge pull request #11074 from JJenkx/fix/libc-frexpf-floating-environment
fix(libc): preserve frexpf decomposition and exception behavior
2026-10-27 21:18:34 +13:00
Dean 4819fcf9fc Merge pull request #10813 from MarcZX10/marc/fix-swprintf-width-overflow
fix(libc): fail wide printf on a width or precision beyond int
2026-10-27 21:14:33 +13:00
Dean 2aacb376ee Merge pull request #10346 from JJenkx/windows/libc-logb-msun
fix(libc): compute logb and logbf with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-27 21:09:12 +13:00
Dean 5a36b2df1e Merge pull request #9850 from JJenkx/windows/libc-powf-msun
fix(libc): compute powf like the libc.prx that titles ship
2026-10-27 21:07:00 +13:00
Dean 853b370f01 Merge pull request #9784 from JJenkx/windows/libc-atan2f-msun
fix(libc): compute atan2f with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-27 21:06:05 +13:00
Dean 36e6c092c0 Merge pull request #9011 from JJenkx/perf/mapped-readable-run-lease-b5d763
perf(agc): lease mapped readable runs for import events
2026-10-27 21:05:23 +13:00
Dean 619ac3c2b6 Merge pull request #10467 from MarcZX10/fix/libc-tgammaf-underflow-sign
fix(libc): preserve tgammaf underflow sign
2026-10-27 20:53:02 +13:00
Adrià 8730eda992 Merge pull request #10876 from krishalivaibhav/fix/macos-process-parameters-macho
fix(macos): read application process parameters from Mach-O images
2026-10-27 07:58:53 +01:00
Dean 32906a0659 Merge pull request #11494 from iAbdulrrahman/feat/libc-bit-search-functions
feat(libc): implement ffs, ffsl, ffsll, fls and flsll bit search functions
2026-10-27 19:00:19 +13:00
Dean ce7a561cfd Merge pull request #11404 from xXPBSXx/test/libc-cxa-guard-behavior
test(libc): cover the __cxa_guard_acquire, release and abort behaviour
2026-10-27 18:35:35 +13:00
Dean 07a9a43cfe Merge pull request #11059 from MarcZX10/marc/fix-libc-fp-contract
fix(libc): build libc without floating-point contraction
2026-10-27 18:30:44 +13:00
Dean 9cc1a379c0 Merge pull request #10366 from krishalivaibhav/fix/macos-guest-allocations-dyld-himansh
fix(libc): find guest image pages through dyld on macOS hosts
2026-10-27 18:23:03 +13:00
Dean 1a13c2969f Merge pull request #9833 from MarcZX10/codex/libc-strtod-decimal-subnormal-erange
fix(libc): set ERANGE for decimal strtod subnormals
2026-10-27 18:21:37 +13:00
Dean 940c298d51 Merge pull request #9698 from mazen320/feat/libc-num-put-vtable-size
fix(libc): size the num_put facet vtable to 112 bytes
2026-10-27 18:20:54 +13:00
Dean 8aa1f9ef7f Merge pull request #9344 from MarcZX10/codex/macos-backtrace-support
feat(libc): restore macOS guest backtraces
2026-10-27 18:20:03 +13:00
Adrià 2e85f47aef Merge pull request #10659 from imellag/fix/libc-elf-pf-r-macos
fix(libc): define PF_R beside PF_X and PF_W for the macOS ELF types
2026-10-27 06:04:30 +01:00
Dean defd713929 Merge pull request #10788 from 00xDisaster/feat/libc-thread-gaps
feat(libc): implement _Thrd_lt
2026-10-27 14:59:56 +13:00
Dean 304bea47ca Merge pull request #9771 from JJenkx/windows/libc-asinf-msun
fix(libc): compute asinf with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-27 14:58:25 +13:00
Dean 8cc3be6e2b Merge pull request #9098 from EagleBearerYS/perf/libc-collect-without-region-query
perf(libc): read private write watches per allocation without a region query
2026-10-27 14:57:16 +13:00
Adrià FranchandClaude Sonnet 5.5 7466744f1d fix(main): windows_crash_stack_words regex crossed by '~' in register dump
Failing run 40410094391 (after #11365, unrelated). The crash report prints [r8] as a string of stack bytes; when it contains '~' (ASLR-dependent) the [^~]* gaps of the PASS regex stop matching. Use .* (matches newlines in CMake regex).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 01:12:24 +01:00
MarcZX10 fcdecab20a fix(libc): fail wide printf on a width or precision beyond int
swprintf and the other wide printf calls accumulated the digits of a field width or precision in an int without a bound, so 99999999999 overflowed: UndefinedBehaviorSanitizer reports signed integer overflow at FormattingWide.cpp:130. A '*' width of INT_MIN also overflowed when negated. A width or precision that does not fit an int now fails the call like any other invalid format; glibc's swprintf also returns -1 for it.
2026-10-26 22:19:58 +00:00
MarcZX10 fc4e4616c9 fix(libc): preserve tgammaf underflow sign 2026-10-26 22:18:06 +00:00
Dean c739a47136 Merge pull request #11289 from Danigamer05/feat/libc-unsigned-min64
feat(libc): implement unsigned 64-bit minimum
2026-10-27 11:06:32 +13:00
Dean b8265bf2bc Merge pull request #11241 from edubox/feat/libc-future-category
feat(libc): export the error_category members and std::future_error
2026-10-27 11:04:49 +13:00
Dean bf38c3bc34 Merge pull request #11208 from orezraey/fix/libc-random-state-measured-ps5
fix(libc): save the random state on a short initstate and take any setstate rear as measured on a PS5
2026-10-27 11:03:11 +13:00
Dean fc2594c7ac Merge pull request #11177 from orezraey/feat/libc-fe-dfl-env-measured-ps5
feat(libc): export __fe_dfl_env as measured on a PS5
2026-10-27 11:02:06 +13:00
Dean d6ac53ba34 Merge pull request #11054 from verusferro/feat/libc-num-put-do-put
feat(libc): format num_put<char>::do_put as the console's libc does
2026-10-27 11:00:12 +13:00
Dean c980e6ef33 Merge pull request #11004 from verusferro/fix/libc-strftime-iso-week
fix(libc): compute strftime week numbers as the console's libc does
2026-10-27 10:58:48 +13:00
Dean 806a573b0b Merge pull request #10139 from dotaku22/feat/libc-fpurge
feat(libc): implement buffered stream purge
2026-10-27 10:53:27 +13:00
Dean c74530e615 Merge pull request #8903 from UnhealthyKraken/feat/libc-feraiseexcept
feat(libc): implement feraiseexcept
2026-10-27 10:52:51 +13:00
Dean e95e81d96a Merge pull request #11233 from edubox/feat/libc-setprecision
feat(libc): export std::setprecision(int)
2026-10-27 10:40:17 +13:00
Dean ed8fd06177 Merge pull request #11166 from 00xDisaster/feat/libc-collate-vtable-wire
feat(libc): wire the collate<char> facet vtable
2026-10-27 10:38:27 +13:00
Dean f8c0779c48 Merge pull request #10782 from MarcZX10/marc/fix-perror-closed-stderr
fix(libc): let perror skip a closed standard error
2026-10-27 10:32:10 +13:00
Dean 6950120a69 Merge pull request #9959 from JJenkx/windows/wprintf-unsigned-flags
fix(libc): ignore the space and plus flags on wide unsigned conversions
2026-10-27 10:30:07 +13:00
Adrià ad6a8e646e Merge pull request #10487 from EagleBearerYS/feat/agc-overlay-detail-page
feat(agc): add a detailed second page to the performance overlay
2026-10-26 22:24:46 +01:00
Dean d934f802e4 Merge pull request #10814 from MarcZX10/marc/fix-ctime-fallback-buffer-race
fix(libc): give ctime's unrepresentable-time text a buffer per thread
2026-10-27 09:06:08 +13:00
Dean fd0da73ec5 Merge pull request #10781 from MarcZX10/marc/fix-printf-s-closed-stdout
fix(libc): fail printf_s on a closed standard output with EBADF
2026-10-27 09:04:40 +13:00
Dean 265c36523c Merge pull request #10175 from orezraey/fix/libc-fetestexcept-measured-ps5
fix(libc): return fetestexcept's unmasked status bits as measured on a PS5
2026-10-27 08:57:53 +13:00
Dean b9c30ee505 Merge pull request #8311 from mugurc/fix/libc-dwarf-unwind-macos
fix(libc): keep DWARF unwind tables in libc on macOS hosts
2026-10-27 08:53:43 +13:00
Yunus Shaikh b1889783be feat(agc): fill the overlay's second page from the driver's counters
Page 2 now samples its sources once a second, in NotePresent, while it
shows; nothing of it runs while the overlay is hidden or on page 1.

- Busy share per queue worker, the top 5 phases in ms per frame and queue
  0's waits (memory, lock, GPU) come from the trace's per-thread totals.
  Showing page 2 turns recording on with buffering off, so a timed scope
  only adds to its thread's totals; leaving it turns recording off again.
  Toggle switches it under a mutex, and ANYPS5_OVERLAY=2 switches it on at
  start. An APS5_TRACE_* run keeps its own recording untouched, and page 2
  then shows these lines only while that trace records. A driver thread
  names itself when it starts (BindThread without APS5_TRACE_* stores the
  name only) and binds on its first timed scope while page 2 shows;
  unnamed threads are not bound.
- Render passes per frame: the draw path counts a begun pass in the trace
  totals while page 2's totals are on (PerformanceTrace::Count).
- Flips/s and the draw cache's hit rate come from the driver through a
  source it registers at start (the draw cache's lock is only tried); the
  pipeline store's hit rate from PipelineStoreTotals; the compile backlog
  from the shader preparation and library prebuild pools (tried locks).
- Dropped frames per second are the presents that found no free swapchain
  image; repeated ones are presents of the display buffer shown just before.
  The device passes the buffer's address, its present mode and the drops.
- Commit charge against the commit limit: GetPerformanceInfo on Windows,
  Committed_AS and CommitLimit from /proc/meminfo on Linux; page faults per
  second from PageFaultCount or getrusage.
- Host imports: their count and bytes against the budget, on devices that
  import host memory.
- CPU copies: address-based builds count the bytes they copy in a
  per-thread counter (a relaxed load and store, folded once a second) with
  the largest build of each second against the address-copy cap.
- Unimplemented-function calls: libc counts NotImplemented_nid_no_patch
  calls; refused shaders are the APS5_SKIP_REFUSED_DRAWS set's size.
- Title ID (when the title has a param.json) and present mode.

The tests cover the trace deltas, hit rates, present-mode names, the
/proc/meminfo parser and the OS reads, the per-thread copy counter's fold,
the counted unimplemented call, the trace switch with page 2 and lazy
binding without buffering, and on lavapipe the sampler end to end with a
fake driver source, its reset when page 2 is left, and the cost of a
present hidden, on page 1 and on page 2.
2026-10-26 20:42:29 +01:00
Dean Galvin dd7ebf9606 fix(libc): stage allocation registry changes before the host mapping changes
A Protect or Unmap that ran out of memory while applying its range patch
had already changed the host mapping, leaving the registry and the mapping
disagreeing. The replacement nodes are now allocated before the apply
callback runs, so applying the patch cannot fail. guest_allocations_oom
injects an allocation failure at every allocation of a Protect and of an
Unmap and checks that the registry is unchanged when the call throws.
2026-10-27 08:38:31 +13:00