Skip to content

Commit c5d400d

Browse files
chore(beads): close bd-2g7oyh.373 (transcendental route rejections documented)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 02890e8 commit c5d400d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.beads/issues.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,7 @@
948948
{"id":"bd-2g7oyh.370","title":"[bug][critical] log2f infinite recursion in shipped libc.so — core::log2f x.log2() binds to own interposed log2f symbol (stack overflow)","status":"closed","priority":0,"issue_type":"bug","created_at":"2026-06-13T02:02:16.733789260Z","created_by":"ubuntu","updated_at":"2026-06-13T02:02:49.540849953Z","closed_at":"2026-06-13T02:02:49.540756626Z","close_reason":"Shipped 9d99bff8. CRITICAL: core::math::float32::log2f used x.log2() which lowers to an indirect call through the log2f symbol = our own interposed log2f in the shipped libc.so => infinite recursion/stack overflow on every real log2f/log2f32/__log2f_finite call. CONFIRMED via cdylib GOT reloc (R_X86_64_GLOB_DAT log2f@@Base = self); post-fix disasm shows no self-call. Bench never caught it (glibc_baseline_bench links glibc, so x.log2()->glibc, even benched 'faster than glibc' = the artifact that let it ship as a perf change bd-2g7oyh.353). Fix: libm::log2f(x), consistent w/ all other f32 transcendentals (libm::* to avoid exactly this). ULP parity preserved (libm was prior path); float32 35 + conformance_diff_math 17 green. LESSON: NEVER use std .log2()/.exp()/.ln() in interposed-symbol code; verify via cdylib GOT relocs not the glibc-linked bench.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.370","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T02:02:16.733789260Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]}
949949
{"id":"bd-2g7oyh.371","title":"[bug][perf] erf/erfc: (-x*x).exp() routes through interposed exp (membrane round-trip); conformance tested glibc-exp not shipped path","status":"closed","priority":1,"issue_type":"bug","created_at":"2026-06-13T02:13:33.280002838Z","created_by":"ubuntu","updated_at":"2026-06-13T02:14:21.524537838Z","closed_at":"2026-06-13T02:14:21.524457125Z","close_reason":"Shipped a5efd381. erfc_profile_band_tail used (-x*x).exp() -> std f64::exp lowers to the exp symbol = our interposed exp in shipped libc.so => membrane round-trip on every erf(x in [1,2.5))/erfc call. Also a test/shipped divergence: glibc-linked test bound (-x*x).exp() to GLIBC exp, so conformance validated a glibc-exp-based erf NOT the shipped core::exp-based one (real shipped erf accuracy untested). Fix: libm::exp(-x*x), consistent w/ tgamma's libm::exp(-t) + rest of math tree; test+shipped now identical. Within 4-ULP glibc: conformance_diff_math(17)+_special(diff_erf/erfc_within_4_ulps)+_exact(9)+core erf/erfc sanity green. Same class as log2f recursion bd-2g7oyh.370. Audited all production math std-float-methods; this was the last one (.sqrt()=hw insn, safe).","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.371","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T02:13:33.280002838Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]}
950950
{"id":"bd-2g7oyh.372","title":"[bug] printf %g fallback used value.log10() (interposed-log10 round-trip) — completes interposed-method audit","status":"closed","priority":3,"issue_type":"bug","created_at":"2026-06-13T02:22:32.030708831Z","created_by":"ubuntu","updated_at":"2026-06-13T02:22:58.271635818Z","closed_at":"2026-06-13T02:22:58.271532783Z","close_reason":"Shipped f6491d3e. printf %g/%e exponent fallback used value.log10() (std f64::log10 -> log10 symbol -> interposed log10 = membrane round-trip; near-unreachable fallback). -> libm::log10(value). LAST production instance of the interposed-method bug class across all of frankenlibc-core/src; audit complete (3 total: log2f recursion .370, erf round-trip .371, printf log10 .372). Rest are test oracles / .sqrt (hw insn) / .powi (compiler-rt). core stdio::printf 50 green.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.372","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T02:22:32.030708831Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]}
951+
{"id":"bd-2g7oyh.373","title":"[perf][rejected] expf f64-route slower + exp10f f32-route fails 4 ULP — document measured rejections; baseline transcendental gaps are noise","status":"closed","priority":3,"issue_type":"task","created_at":"2026-06-13T02:51:37.377093788Z","created_by":"ubuntu","updated_at":"2026-06-13T02:52:11.093502181Z","closed_at":"2026-06-13T02:52:11.093406731Z","close_reason":"Shipped 02890e8c. Measured both flagged f32 transcendental 'gaps' from the baseline; both non-gaps. expf f64-route REJECTED (same-worker 223ns f32 vs 292ns f64; f32 already beats glibc ~304ns; baseline '1.70x slower' was noise - 792 vs 223 cross-session = 3.5x variance). exp10f f32-route REJECTED (5 ULP on subnormals near x~-39, fails 4-ULP contract; f64 required). Both reverted; only documenting NOTEs land. float32 exp(7)+conformance_diff_math(17) green. LESSON: glibc_baseline_bench has large variance for sub-us math - don't trust single-run transcendental gaps; expf/exp10f routes already optimal.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.373","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-13T02:51:37.377093788Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]}
951952
{"id":"bd-2g7oyh.38","title":"[perf] qsort 4-byte swap specialization","description":"Profile-backed target from fresh RCH glibc_baseline_bench after f73cafd7 on worker vmi1149989: qsort_128_i32 FrankenLibC p50=2410.516ns p95=3458.206ns p99=3540.895ns mean=2559.625; host glibc p50=1988.379ns p95=2569.028ns p99=2592.369ns mean=2026.170. Malloc remains the largest absolute gap but malloc/elimination.rs is peer-dirty and active; BlackThrush owns string bd-2g7oyh.25. This is the next clean non-string profile-backed residual.\\n\\nCandidate lever: one safe-Rust stdlib/sort.rs swap micro-kernel only. Specialize swap_chunks for width==4 so qsort_128_i32 avoids the generic split_at_mut + swap_with_slice path while preserving the exact same element swap sites, compare calls, partition decisions, recursion shape, and byte results. All non-4 widths keep the existing generic path.\\n\\nAlien primitive card: fixed-width/register micro-kernel specialization for a hot inner loop, adapted from alien-graveyard micro-kernel/superoptimizer guidance. EV before measurement=(Impact 1 * Confidence 3 * Reuse 1)/(Effort 1 * Friction 1)=3. Fallback: restore source and close rejected if golden output changes or RCH qsort p50/mean/tails do not clear Score>=2.0.\\n\\nRequired proof: focused RCH qsort baseline before edit; pre/post qsort golden-output sha256 over the reverse-ish 128-i32 sorted result; isomorphism proof for compare ordering, equality tie behavior, element swap sequence, FP/RNG N/A; RCH post-bench and confirmation if noisy; RCH sort tests/check/clippy; touched-file rustfmt/diff-check; one lever only; close only if Score>=2.0, otherwise restore source and close rejected.","status":"closed","priority":1,"issue_type":"task","assignee":"MossyFern","created_at":"2026-06-03T10:40:32.920708462Z","created_by":"ubuntu","updated_at":"2026-06-03T10:55:00.102055155Z","closed_at":"2026-06-03T10:55:00.101958783Z","close_reason":"Rejected: qsort width-4 swap specialization failed the RCH real-win gate. Broad profile vmi1149989 qsort_128_i32 p50 2410.516ns p95 3458.206ns p99 3540.895ns mean 2559.625ns vs host p50 1988.379ns. Focused baseline vmi1153651 p50 7751.337ns p95 13340.911ns p99 16677.281ns mean 8563.939ns vs host p50 4541.030ns. Golden SHA256 stayed 6f1d71d33c28656abb499ebd7177b9eda2ee8d3d369d1fb3f4e131944932851a. Post vmi1227854 p50 2735.616ns mean 2743.964ns; confirmation vmi1227854 p50 2958.296ns mean 2957.595ns. No stable Score>=2.0 win; source restored, no sort.rs change retained.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"labels":["no-gaps","perf","qsort","stdlib"],"dependencies":[{"issue_id":"bd-2g7oyh.38","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-03T10:40:32.920708462Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]}
952953
{"id":"bd-2g7oyh.39","title":"[parity] ecvt/fcvt nan/inf sign convention divergence vs glibc","description":"Phase B differential parity hunt. glibc ecvt/fcvt embed the sign char in the returned buffer for non-finite inputs (\"-inf\"/\"-nan\") and report *sign=0, even for -nan. FrankenLibC returned bare \"inf\"/\"nan\" with *sign=1 for -inf and dropped the -nan sign. Also strverscmp verified parity-clean (0 mismatches over 200k fuzz cases vs glibc). Fixed in commit 9fd72def.","status":"closed","priority":1,"issue_type":"bug","created_at":"2026-06-03T11:34:03.870005089Z","created_by":"ubuntu","updated_at":"2026-06-03T11:34:11.783383442Z","closed_at":"2026-06-03T11:34:11.783292069Z","close_reason":"Fixed in 9fd72def (pushed main+master). Core nonfinite_cvt() emits sign-embedded \"-inf\"/\"-nan\" with is_negative=false; ABI ecvt_r/fcvt_r switched to is_sign_negative() && is_finite() so only finite negatives report sign=1. Verified vs host glibc 2.38 C probes on {nan,-nan,inf,-inf} for ecvt/fcvt/ecvt_r/fcvt_r. New pinned core unit test + ABI integration test. RCH: core 9/9, abi ecvt 4/4, core+abi clippy -D warnings clean, fmt clean. Finite-value behavior (decpt, leading-zero strip, rounded-to-zero, -0.0 sign=1) unchanged.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-2g7oyh.39","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-03T11:34:03.870005089Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]}
953954
{"id":"bd-2g7oyh.4","title":"[perf] strlen safe-SIMD 32B NUL scan","description":"PROFILE-BACKED TARGET from RCH string reprofile on vmi1156319 after commit 5c13048b (2026-06-02): strlen p50 raw 16=4.907ns, 64=12.828ns, 256=37.688ns, 1024=155.556ns, 4096=542.733ns. strlen still scans NUL with 8-byte SWAR words; strrchr now spends a large share in strlen before the reverse SIMD pass.\\n\\nLever: one code lever only - add a safe std::simd Simd<u8,32> NUL probe inside strlen before the existing SWAR/scalar exact-resolution path. Candidate panels break to the existing word/scalar resolver, preserving first-NUL ordering and unterminated-slice behavior.\\n\\nAlien primitive recommendation card: contiguous SIMD panel scanning / vectorized execution over byte control planes. EV estimate: Impact 4 x Confidence 4 x Reuse 2 / (Effort 1 x Friction 1) = 32. Fallback trigger: revert if golden string-test sha256 changes, if first-NUL/unterminated behavior changes, or if RCH post p50 does not improve at 1024/4096.\\n\\nArtifact proof obligations: RCH behavior baseline first, deterministic golden-output sha256 for string::str tests, isomorphism proof for first NUL index and strlen-fed strrchr ordering, no FP/RNG impact, RCH rebench/check/test/clippy before close.","status":"closed","priority":2,"issue_type":"task","assignee":"BlackThrush","created_at":"2026-06-02T19:24:06.510955626Z","created_by":"ubuntu","updated_at":"2026-06-02T20:05:22.626645607Z","closed_at":"2026-06-02T20:05:22.626547953Z","close_reason":"Superseded duplicate target. The same profile-backed strlen safe-SIMD lever shipped and closed as bd-2g7oyh.5 in commit 29c316a8 with tracker close a6131e18: same-worker RCH p50 64B 11.911->5.528ns, 256B 41.121->11.063ns, 1024B 164.438->37.864ns, 4096B 515.187->157.133ns; existing string-test sha256 unchanged 235e4da93b185ebe3f01964dd290d33f97b492e083f8bd5e4fbc39208023a507.","source_repo":"frankenlibc","source_repo_path":"/data/projects/frankenlibc","compaction_level":0,"original_size":0,"labels":["perf","simd","string"],"dependencies":[{"issue_id":"bd-2g7oyh.4","depends_on_id":"bd-2g7oyh","type":"parent-child","created_at":"2026-06-02T19:24:06.510955626Z","created_by":"ubuntu","metadata":"{}","thread_id":""}]}

0 commit comments

Comments
 (0)