Skip to content

docs(debt): split wcstod out of the strtod entry and add its console measurement - #29298

Open
xXPBSXx wants to merge 1 commit into
boykopovar:mainfrom
xXPBSXx:docs-libc-wcstod-hex-console
Open

xXPBSXx wants to merge 1 commit into
boykopovar:mainfrom
xXPBSXx:docs-libc-wcstod-hex-console

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

What

The technical debt entry for strtod in docs/dev/debt/libc.md (line 229 on main, from the fragment fix-libc-strtod-hex-subnormal-rounding.md) said that the console's wcstod is unmeasured and that hexadecimal subnormal strtod and wcstod match one title's libc.prx only. This change records what a PS5 on firmware 11.60 answered, in a homebrew payload process, for strtod and wcstod of libSceLibcInternal.sprx on 14 strings (eight decimal, six hexadecimal) with a subnormal, underflowing or normal result, and moves the wcstod statement into an entry of its own. It does not change code or tests; it follows #28997 and #29001, which are merged.

The console's wcstod matched its strtod line for line (result bits, errno and the number of characters consumed) in both floating point states, and both matched this port for all 14 strings at MXCSR 0x1f80, the standard state: for example 0x1p-1074 gives bits 1 and errno 0, 0x1p-1075 gives 0 and errno 34, 0x1.8p-1074 gives 2 and errno 0, 0x1p-1076 gives 0 and errno 34. At MXCSR 0x9fc0, the value the probe process started with (flush to zero is set), three decimal subnormal strings (inputs 2, 3 and 5, 2.2250738585072011e-308, 4.9406564584124654e-324 and 2.4703282292062328e-324) return 0 with errno 34 for both functions. The comparison with this port is a small host program that calls strtod_nid_postfix and wcstod_nid_postfix from core/libs/prx/libc/include/Api.hpp on the same 14 strings (wide strings as char16_t) and prints the same fields; all 28 lines (14 per function) agree with the console at 0x1f80; at 0x9fc0 the only differences are the three flush-to-zero strings of each function.

The change is in the existing fragment docs/dev/debt/changes/fix-libc-strtod-hex-subnormal-rounding.md (one fragment per entry; the entry is not yet folded into libc.md on main). The strtod entry goes from 996 to 811 characters: the wcstod sentence leaves it and the hexadecimal sentence is kept as it was. A new entry wcstod under add Functional (543 characters, counted with the leading - , under the limit of 1000) keeps that sentence (wcstod parses through strtod and follows the rule of the strtod entry, as the libc.prx wcstod of eleven titles does, measured on Windows) and adds the console result: payload process, firmware 11.60, two runs, 2-byte wchar_t, prototypes assumed, a title process may differ, titles unmeasured.

Not measured: a title process, other MXCSR states than 0x9fc0 and 0x1f80, directed rounding modes, strings other than these 14, and wcstof. The prototypes in the probe are assumed. sizeof(wchar_t) was 2 in the probe build (case 2 of the output); the header comment of the probe still says 32-bit, which is what was assumed before the build.

In the newest run folder of each of 56 titles (2026-12-05, 04:28 UTC), the import of wcstod appears in 18 folders and that of strtod in 51, counting app.registry.json only, with the same numbers for every registry file of the folder. An import is not a call; I have not shown that any title uses these two functions with a subnormal string, so this is not a title change.

Tested

Measured on a PS5 with firmware 11.60 (kernel_get_fw_version 0x11600005), from a homebrew payload process, on 2026-12-05 at 05:01 UTC, two runs of one probe build (05:01:01 and 05:01:10 UTC). Both runs gave the same 67 cases and END 67, no signal, and an exit value of 0; their output is identical except for the pid and the clock in the PROBE line (the console clock was about 1 h 43 min ahead of UTC). The probe source and the complete output of both runs are in the first comment.

This is documentation only; no build or test was run for it. I ran tools/check_conventions.py --base upstream/main with the title and this description and tools/debt_fold.py --check on the merge of this branch (head aa9f3232b5c) with main at ec3c30e7a09d on 2026-12-06 at about 11:47 UTC: it reports "All conventions checks passed", and debt_fold.py --check exits with 0.

Overlap: counted on 2026-12-06 from the 1620 open pull requests (main at 0afe7c9b09aa at the start; 944 of them had their patches scanned, from 11:06 to 11:44 UTC) with the fragment docs/dev/debt/changes/fix-libc-strtod-hex-subnormal-rounding.md, docs/dev/debt/libc.md, the files Strings.cpp, DinkumwareInternals.cpp and LibcxxSto.cpp in core/libs/prx/libc/src/, the names strtod and wcstod, and the path libc: no open pull request changes the fragment or the entry at docs/dev/debt/libc.md:229. 38 open pull requests change libc.md or one of the three source files or name strtod or wcstod in a patch; the merge of this head with each of them was made with git merge-tree: 29 are clean, and the other 9 already conflict with main alone in as many files as with this head, so none because of this change. #28284 (fix(libc): honor strtod flush-to-zero with DAZ enabled, which changes Strings.cpp and GuestStrtodSubnormal.cpp) merges cleanly with this head and does not change a debt file; it changes what this port does under DAZ, and the new sentence describes the state 0x1f80 (DAZ off) of this port and the console result at 0x9fc0, so it stays true if #28284 is merged first, which will be checked against the then current Strings.cpp. The patches that name strtod or wcstod are those of #28892, #14915 and #24669, which change calls or other entries and none of the two entries here; all merge cleanly with this head. The count was repeated from 11:44 to 11:46 UTC for the 53 of 1619 open pull requests that were updated since 11:05 UTC (24 patch-scanned): none shares a file or a name. 23 commits have been merged to main since d25135a8604, the base of this branch; none of them changed Strings.cpp, DinkumwareInternals.cpp, LibcxxSto.cpp, libc.md or the fragment, and the merge of this head into main (ec3c30e7a09d, 11:47 UTC) is clean (git merge-tree). This pull request does not depend on any of them (Depends on: none).

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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 (no GPU code)
  • AI-assisted: yes

Summary by CodeRabbit

  • Documentation
    • Updated the strtod documentation with details on wcstod parsing, title-build comparisons, and console measurements under two MXCSR settings.
    • Retained the existing hexadecimal-subnormal comparison notes.

…measurement

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xXPBSXx

xXPBSXx commented Dec 6, 2026

Copy link
Copy Markdown
Contributor Author

Probe source and raw output for the measurement in the description. Firmware 11.60 (kernel_get_fw_version 0x11600005), homebrew payload process, 2026-12-05 05:01 UTC (run 1 of 2; run 2, nine seconds later, is identical except for the pid and the clock in the PROBE line). The prototypes are assumed; sizeof(wchar_t) was 2 in the build (case 2), although the header comment still says 32-bit. Internal references in one header comment were removed; the code is unchanged, and the build ID is the hash of the original file (fe1d0c0d9980).

probe.c
#include <errno.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <ps5/kernel.h>   /* only for kernel_get_fw_version() */

#ifndef PROBE_NAME
#define PROBE_NAME "unnamed"
#endif
#ifndef PROBE_BUILD
#define PROBE_BUILD "unbuilt"
#endif
/* Self limit: on timeout the runner can only close the connection, not end the process on the console.
   The probe ends itself after at most PROBE_MAX_S seconds (the build script sets timeout - 10 s). */
#ifndef PROBE_MAX_S
#define PROBE_MAX_S 50
#endif

static void probe_alarm(int sig) {
  static const char msg[] = "TIMEOUT\tprobe self limit\n";
  (void)sig;
  (void)!write(1, msg, sizeof msg - 1);
  _exit(124);
}

static int cases = 0;

static void probe_header(void) {
  char utc[32];
  time_t now = time(0);
  struct tm tmv;
  gmtime_r(&now, &tmv);
  strftime(utc, sizeof utc, "%Y-%m-%dT%H:%M:%SZ", &tmv);
  printf("PROBE\t%s\tfw=0x%08x\tbuild=%s\tpid=%d\tutc=%s\n", PROBE_NAME, kernel_get_fw_version(), PROBE_BUILD,
         getpid(), utc);
  fflush(stdout);
}

/* CASE: id, description of the call, return value as long, errno (0 if not set), extra (hex/bytes). */
static void probe_case(const char* id, const char* call, long ret, int err, const char* extra) {
  printf("CASE\t%s\t%s\t%ld\t%d\t%s\n", id, call, ret, err, extra ? extra : "-");
  fflush(stdout);
  cases++;
}

static void probe_end(void) {
  printf("END\t%d\n", cases);
  fflush(stdout);
}
#include <dlfcn.h>
#include <setjmp.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/mman.h>

static sigjmp_buf guard_env;
static volatile int guard_sig = 0;
static volatile int guard_active = 0;
static volatile int guard_hits = 0;
static void guard_handler(int s) {
  static const char msg[] = "FAULT\tprobe guard: fault outside a guarded call or too many faults\n";
  if(!guard_active || ++guard_hits > 8) {
    (void)!write(1, msg, sizeof msg - 1);
    _exit(125);
  }
  guard_sig = s;
  guard_active = 0;
  siglongjmp(guard_env, 1);
}
static void guard_arm(void) {
  struct sigaction sa;
  memset(&sa, 0, sizeof sa);
  sa.sa_handler = guard_handler;
  sigaction(SIGSEGV, &sa, 0);
  sigaction(SIGBUS, &sa, 0);
  sigaction(SIGABRT, &sa, 0);
  sigaction(SIGILL, &sa, 0);
  sigaction(SIGTRAP, &sa, 0);
  sigaction(SIGFPE, &sa, 0);
}
#define CALL(rvar, evar, expr) do { errno = 0; guard_sig = 0; rvar = -1; if(sigsetjmp(guard_env, 1) == 0) { guard_active = 1; rvar = (expr); } guard_active = 0; evar = errno; } while(0)

/* Probe: strtod AND wcstod of libSceLibcInternal.sprx on firmware 11.60 for decimal and hexadecimal strings with a subnormal or underflowing result, in the floating point control state the probe process starts with and in the standard state. The earlier probe libc_strtod_subnormal_mxcsr (two runs) covered decimal strtod only; the entry says the console's wcstod is unmeasured and that the hexadecimal subnormal rule matches one title's libc.prx only.
   ASSUMED prototypes (not known for the console): double strtod(const char*, char**) and double wcstod(const wchar_t*, wchar_t**) with a 32-bit wchar_t. Own static strings only (narrow and wide, the same text), the end pointer goes to an own static pointer; no file, no network, no init. THE PROBE SETS THE MXCSR OF ITS OWN PROCESS (ldmxcsr) to the standard value 0x1f80 in state s and restores the saved value afterwards.
   Case 0.dlopen.1/2, 1.ctrl, 2 (dlsym of strtod and wcstod), m (the MXCSR found, hex). Two states, each with 'next:' before it: f = the MXCSR found, s = 0x1f80 set in this process. In each state, for both functions, the 14 strings of a fixed table: decimal "1e-307", "2.2250738585072014e-308", "2.2250738585072011e-308", "4.9406564584124654e-324", "2.4703282292062327e-324", "2.4703282292062328e-324", "1e-400", "-1e-400" and hexadecimal "0x1p-1022" (normal, control), "0x1p-1074", "0x1p-1075", "0x1.8p-1074", "0x1p-1076", "0x0.0000000000001p-1022": printed per call the table index, the result as 64-bit hex, errno (set to 0 before), the number of characters consumed, and the signal. Guard (SIGSEGV, SIGBUS, SIGABRT, SIGILL, SIGTRAP, SIGFPE) around every call; the run ends at the first signal (the saved MXCSR is restored first). */
static void* probe_watchdog(void* arg) {
  static const char msg[] = "TIMEOUT\tprobe watchdog thread\n";
  (void)arg;
  { unsigned left = PROBE_MAX_S; while (left) left = sleep(left); }
  (void)!write(1, msg, sizeof msg - 1);
  _exit(124);
  return 0;
}
static void probe_watchdog_start(void) {
  pthread_t t;
  if (pthread_create(&t, 0, probe_watchdog, 0) == 0) pthread_detach(t);
}
#include <math.h>
#include <wchar.h>
#include <xmmintrin.h>
typedef double (*d_fn)(const char*, char**);
typedef double (*w_fn)(const wchar_t*, wchar_t**);
static uint64_t dbits(double d) { uint64_t u; memcpy(&u, &d, 8); return u; }
#define NSTR 14
static const char* NS[NSTR] = {"1e-307", "2.2250738585072014e-308", "2.2250738585072011e-308", "4.9406564584124654e-324", "2.4703282292062327e-324", "2.4703282292062328e-324", "1e-400", "-1e-400",
  "0x1p-1022", "0x1p-1074", "0x1p-1075", "0x1.8p-1074", "0x1p-1076", "0x0.0000000000001p-1022"};
static const wchar_t* WS[NSTR] = {L"1e-307", L"2.2250738585072014e-308", L"2.2250738585072011e-308", L"4.9406564584124654e-324", L"2.4703282292062327e-324", L"2.4703282292062328e-324", L"1e-400", L"-1e-400",
  L"0x1p-1022", L"0x1p-1074", L"0x1p-1075", L"0x1.8p-1074", L"0x1p-1076", L"0x0.0000000000001p-1022"};
int main(void) {
  signal(SIGALRM, probe_alarm);
  alarm(PROBE_MAX_S);
  probe_header();
  probe_watchdog_start();
  guard_arm();
  char line[400];
  probe_case("0.pre", "next: dlopen of libSceLibcInternal.sprx; a hang here ends the run by timeout", 0, 0, "-");
  void* h1 = dlopen("libSceLibcInternal.sprx", RTLD_LAZY);
  probe_case("0.dlopen.1", "dlopen(libSceLibcInternal.sprx) first attempt", h1 != 0, 0, "-");
  void* h2 = dlopen("libSceLibcInternal.sprx", RTLD_LAZY);
  probe_case("0.dlopen.2", "dlopen(libSceLibcInternal.sprx) second attempt", h2 != 0, 0, "-");
  void* lib = h1 ? h1 : h2;
  if(!lib) { probe_end(); return 0; }
  void* kern = dlopen("libkernel.sprx", RTLD_LAZY);
  void* ctl = kern ? dlsym(kern, "sceKernelGetCurrentCpu") : 0;
  void* neg = kern ? dlsym(kern, "sceKernelNoSuchControlAps5") : 0;
  snprintf(line, sizeof line, "control sceKernelGetCurrentCpu resolves %d, negative control resolves %d (1 yes, 0 no)", ctl != 0, neg != 0);
  probe_case("1.ctrl", "dlsym in libkernel.sprx: control and negative control", 0, 0, line);
  d_fn f_strtod = (d_fn)dlsym(lib, "strtod");
  w_fn f_wcstod = (w_fn)dlsym(lib, "wcstod");
  void* negl = dlsym(lib, "strtoNoSuchControlAps5");
  snprintf(line, sizeof line, "dlsym in libSceLibcInternal.sprx: strtod %d, wcstod %d, negative control %d, sizeof(wchar_t) %d (1 yes, 0 no)", f_strtod != 0, f_wcstod != 0, negl != 0, (int)sizeof(wchar_t));
  probe_case("2", "name stage", 0, 0, line);
  if(!ctl || neg || !f_strtod || !f_wcstod || negl) { probe_end(); return 0; }
  const unsigned saved = _mm_getcsr();
  snprintf(line, sizeof line, "mxcsr_found=0x%08x", saved);
  probe_case("m", "MXCSR of the probe process at the start", 0, 0, line);
  static const char* SN[2] = {"f", "s"};
  for(int st = 0; st < 2; st++) {
    char pre[200];
    snprintf(pre, sizeof pre, "next: state %s (%s); a signal here ends the run", SN[st], st == 0 ? "the MXCSR found" : "standard 0x1f80 set in this process, restored afterwards");
    probe_case("st.pre", pre, 0, 0, "-");
    if(st) _mm_setcsr(0x1f80u);
    snprintf(line, sizeof line, "state=%s mxcsr_now=0x%08x", SN[st], _mm_getcsr());
    probe_case(st ? "st.s" : "st.f", "MXCSR in effect for this state", 0, 0, line);
    for(int k = 0; k < 2 * NSTR; k++) {
      int wide = k >= NSTR;
      int idx = wide ? k - NSTR : k;
      int rc, e;
      (void)rc;
      double r = 0;
      long used = -1;
      errno = 0;
      if(!wide) { char* end = 0; CALL(rc, e, (r = f_strtod(NS[idx], &end), 0)); used = end ? (long)(end - NS[idx]) : -1; }
      else { wchar_t* wend = 0; CALL(rc, e, (r = f_wcstod(WS[idx], &wend), 0)); used = wend ? (long)(wend - WS[idx]) : -1; }
      char id[16];
      snprintf(id, sizeof id, "%s.%d", SN[st], k);
      snprintf(line, sizeof line, "fn=%s in=%d bits=0x%016llx errno=%d consumed=%ld signal=%d", wide ? "wcstod" : "strtod", idx, (unsigned long long)dbits(r), e, used, (int)guard_sig);
      probe_case(id, wide ? "wcstod(table[in])" : "strtod(table[in])", guard_sig ? -1 : 0, e, line);
      if(guard_sig) { _mm_setcsr(saved); probe_end(); return 0; }
    }
    if(st) _mm_setcsr(saved);
  }
  snprintf(line, sizeof line, "mxcsr_after=0x%08x (found 0x%08x)", _mm_getcsr(), saved);
  probe_case("m.end", "MXCSR at the end", 0, 0, line);
  probe_end();
  return 0;
}
output of run 1
PROBE	libc_wcstod_hex_subnormal_mxcsr	fw=0x11600005	build=fe1d0c0d9980	pid=155	utc=2026-12-05T06:43:58Z
CASE	0.pre	next: dlopen of libSceLibcInternal.sprx; a hang here ends the run by timeout	0	0	-
CASE	0.dlopen.1	dlopen(libSceLibcInternal.sprx) first attempt	1	0	-
CASE	0.dlopen.2	dlopen(libSceLibcInternal.sprx) second attempt	1	0	-
CASE	1.ctrl	dlsym in libkernel.sprx: control and negative control	0	0	control sceKernelGetCurrentCpu resolves 1, negative control resolves 0 (1 yes, 0 no)
CASE	2	name stage	0	0	dlsym in libSceLibcInternal.sprx: strtod 1, wcstod 1, negative control 0, sizeof(wchar_t) 2 (1 yes, 0 no)
CASE	m	MXCSR of the probe process at the start	0	0	mxcsr_found=0x00009fc0
CASE	st.pre	next: state f (the MXCSR found); a signal here ends the run	0	0	-
CASE	st.f	MXCSR in effect for this state	0	0	state=f mxcsr_now=0x00009fc0
CASE	f.0	strtod(table[in])	0	0	fn=strtod in=0 bits=0x0031fa182c40c60d errno=0 consumed=6 signal=0
CASE	f.1	strtod(table[in])	0	0	fn=strtod in=1 bits=0x0010000000000000 errno=0 consumed=23 signal=0
CASE	f.2	strtod(table[in])	0	34	fn=strtod in=2 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.3	strtod(table[in])	0	34	fn=strtod in=3 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.4	strtod(table[in])	0	34	fn=strtod in=4 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.5	strtod(table[in])	0	34	fn=strtod in=5 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.6	strtod(table[in])	0	34	fn=strtod in=6 bits=0x0000000000000000 errno=34 consumed=6 signal=0
CASE	f.7	strtod(table[in])	0	34	fn=strtod in=7 bits=0x8000000000000000 errno=34 consumed=7 signal=0
CASE	f.8	strtod(table[in])	0	0	fn=strtod in=8 bits=0x0010000000000000 errno=0 consumed=9 signal=0
CASE	f.9	strtod(table[in])	0	0	fn=strtod in=9 bits=0x0000000000000001 errno=0 consumed=9 signal=0
CASE	f.10	strtod(table[in])	0	34	fn=strtod in=10 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	f.11	strtod(table[in])	0	0	fn=strtod in=11 bits=0x0000000000000002 errno=0 consumed=11 signal=0
CASE	f.12	strtod(table[in])	0	34	fn=strtod in=12 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	f.13	strtod(table[in])	0	0	fn=strtod in=13 bits=0x0000000000000001 errno=0 consumed=23 signal=0
CASE	f.14	wcstod(table[in])	0	0	fn=wcstod in=0 bits=0x0031fa182c40c60d errno=0 consumed=6 signal=0
CASE	f.15	wcstod(table[in])	0	0	fn=wcstod in=1 bits=0x0010000000000000 errno=0 consumed=23 signal=0
CASE	f.16	wcstod(table[in])	0	34	fn=wcstod in=2 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.17	wcstod(table[in])	0	34	fn=wcstod in=3 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.18	wcstod(table[in])	0	34	fn=wcstod in=4 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.19	wcstod(table[in])	0	34	fn=wcstod in=5 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	f.20	wcstod(table[in])	0	34	fn=wcstod in=6 bits=0x0000000000000000 errno=34 consumed=6 signal=0
CASE	f.21	wcstod(table[in])	0	34	fn=wcstod in=7 bits=0x8000000000000000 errno=34 consumed=7 signal=0
CASE	f.22	wcstod(table[in])	0	0	fn=wcstod in=8 bits=0x0010000000000000 errno=0 consumed=9 signal=0
CASE	f.23	wcstod(table[in])	0	0	fn=wcstod in=9 bits=0x0000000000000001 errno=0 consumed=9 signal=0
CASE	f.24	wcstod(table[in])	0	34	fn=wcstod in=10 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	f.25	wcstod(table[in])	0	0	fn=wcstod in=11 bits=0x0000000000000002 errno=0 consumed=11 signal=0
CASE	f.26	wcstod(table[in])	0	34	fn=wcstod in=12 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	f.27	wcstod(table[in])	0	0	fn=wcstod in=13 bits=0x0000000000000001 errno=0 consumed=23 signal=0
CASE	st.pre	next: state s (standard 0x1f80 set in this process, restored afterwards); a signal here ends the run	0	0	-
CASE	st.s	MXCSR in effect for this state	0	0	state=s mxcsr_now=0x00001f80
CASE	s.0	strtod(table[in])	0	0	fn=strtod in=0 bits=0x0031fa182c40c60d errno=0 consumed=6 signal=0
CASE	s.1	strtod(table[in])	0	0	fn=strtod in=1 bits=0x0010000000000000 errno=0 consumed=23 signal=0
CASE	s.2	strtod(table[in])	0	34	fn=strtod in=2 bits=0x000fffffffffffff errno=34 consumed=23 signal=0
CASE	s.3	strtod(table[in])	0	34	fn=strtod in=3 bits=0x0000000000000001 errno=34 consumed=23 signal=0
CASE	s.4	strtod(table[in])	0	34	fn=strtod in=4 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	s.5	strtod(table[in])	0	34	fn=strtod in=5 bits=0x0000000000000001 errno=34 consumed=23 signal=0
CASE	s.6	strtod(table[in])	0	34	fn=strtod in=6 bits=0x0000000000000000 errno=34 consumed=6 signal=0
CASE	s.7	strtod(table[in])	0	34	fn=strtod in=7 bits=0x8000000000000000 errno=34 consumed=7 signal=0
CASE	s.8	strtod(table[in])	0	0	fn=strtod in=8 bits=0x0010000000000000 errno=0 consumed=9 signal=0
CASE	s.9	strtod(table[in])	0	0	fn=strtod in=9 bits=0x0000000000000001 errno=0 consumed=9 signal=0
CASE	s.10	strtod(table[in])	0	34	fn=strtod in=10 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	s.11	strtod(table[in])	0	0	fn=strtod in=11 bits=0x0000000000000002 errno=0 consumed=11 signal=0
CASE	s.12	strtod(table[in])	0	34	fn=strtod in=12 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	s.13	strtod(table[in])	0	0	fn=strtod in=13 bits=0x0000000000000001 errno=0 consumed=23 signal=0
CASE	s.14	wcstod(table[in])	0	0	fn=wcstod in=0 bits=0x0031fa182c40c60d errno=0 consumed=6 signal=0
CASE	s.15	wcstod(table[in])	0	0	fn=wcstod in=1 bits=0x0010000000000000 errno=0 consumed=23 signal=0
CASE	s.16	wcstod(table[in])	0	34	fn=wcstod in=2 bits=0x000fffffffffffff errno=34 consumed=23 signal=0
CASE	s.17	wcstod(table[in])	0	34	fn=wcstod in=3 bits=0x0000000000000001 errno=34 consumed=23 signal=0
CASE	s.18	wcstod(table[in])	0	34	fn=wcstod in=4 bits=0x0000000000000000 errno=34 consumed=23 signal=0
CASE	s.19	wcstod(table[in])	0	34	fn=wcstod in=5 bits=0x0000000000000001 errno=34 consumed=23 signal=0
CASE	s.20	wcstod(table[in])	0	34	fn=wcstod in=6 bits=0x0000000000000000 errno=34 consumed=6 signal=0
CASE	s.21	wcstod(table[in])	0	34	fn=wcstod in=7 bits=0x8000000000000000 errno=34 consumed=7 signal=0
CASE	s.22	wcstod(table[in])	0	0	fn=wcstod in=8 bits=0x0010000000000000 errno=0 consumed=9 signal=0
CASE	s.23	wcstod(table[in])	0	0	fn=wcstod in=9 bits=0x0000000000000001 errno=0 consumed=9 signal=0
CASE	s.24	wcstod(table[in])	0	34	fn=wcstod in=10 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	s.25	wcstod(table[in])	0	0	fn=wcstod in=11 bits=0x0000000000000002 errno=0 consumed=11 signal=0
CASE	s.26	wcstod(table[in])	0	34	fn=wcstod in=12 bits=0x0000000000000000 errno=34 consumed=9 signal=0
CASE	s.27	wcstod(table[in])	0	0	fn=wcstod in=13 bits=0x0000000000000001 errno=0 consumed=23 signal=0
CASE	m.end	MXCSR at the end	0	0	mxcsr_after=0x00009fc0 (found 0x00009fc0)
END	67

AI-assisted (Claude Code).

@coderabbitai

coderabbitai Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: wcstod documentation

Layer / File(s) Summary
Separate strtod and wcstod notes
docs/dev/debt/changes/fix-libc-strtod-hex-subnormal-rounding.md
The existing description now covers strtod. A new Functional section describes wcstod parsing through strtod and reports comparison and console results for tested strings under two MXCSR settings.

Possibly related PRs

  • boykopovar/AnyPS5#28997: Updates console strtod errno notes in the same technical-debt entry, which provides context for the strtod baseline referenced here.

Suggested labels: docs

Suggested reviewers: marczx10, plyxen

Change: Other

Merge Risk: Minimal · up to aa9f3

This is a documentation-only change that separates the wcstod notes from the strtod entry and adds measured results with stated limits. It has no runtime effect and carries no meaningful merge risk.

Architecture risk: Low · up to aa9f3

The libc behavior notes now describe wcstod separately from strtod, making its documented parsing relationship and comparison results explicit without changing the implementation.

Changed areas: docs

Review details

Systems and components

  • observed — 1 changed file mapped to docs.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: caad4136-418c-4f6e-b2b6-4f4de44c0ea2
Commits

Reviewing files that changed from the base of the PR and between 6ae9d90 and aa9f323.

Files selected for processing: 1

  • docs/dev/debt/changes/fix-libc-strtod-hex-subnormal-rounding.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

Nothing blocks this; the point below is optional.

What I ran

Reviewed head aa9f3232b5c55c84c7a60ae68e1c4e3bcb04fb9a. Read the prepared description, commit summary, diff, manifest, and the full text of the sole changed file. This is a documentation-only change; I ran no tests or builds. A repo_read.py search call for source context failed because the reader could not write its log in the read-only workspace.

Results

Check Result Note
Changed file review passed Sole changed file fully read
Source context not run Reader log write was denied
Tests and builds not run Documentation-only change

Negative control

Not applicable; this change adds documentation and does not change code or tests.

Findings

Blocking

None.

Non-blocking

  • The console measurements and host comparison are described in the PR body, but their probe output is not among the reviewed artifacts. Consider linking or attaching that evidence for readers to check the detailed claims. The new entry is at docs/dev/debt/changes/fix-libc-strtod-hex-subnormal-rounding.md:14 (head permalink).

Sources

Not verified

  • The implementation and callers behind the strtod and wcstod statements; the pinned reader could not complete its logged search in this read-only workspace.
  • Console probe output, host comparison output, and author-reported convention and debt-fold checks.
  • Excluded files: none. Reviewed files: docs/dev/debt/changes/fix-libc-strtod-hex-subnormal-rounding.md.

To get this to a good state

Nothing is required. Optional: link or attach the measurement output as noted above.

@github-actions github-actions Bot added the docs label Dec 6, 2026

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.

2 participants