Repository navigation
fix(libc): avoid spurious float Bessel exceptions at zero - #8864
oneandonlydean merged 1 commit into
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the one-line exception-flag correction and regression matrix. The tests cover both signed zeros, all three float exports, preservation of existing flags and errno, and extreme ynf orders; the reported test-first Windows run confirms the prior failure and the fix. The documented console evidence is appropriately scoped. I found no blocking issue in the diff.
|
Linux data point for
|
49419d1 to
1d0c48d
Compare
|
Refreshed to The WASM author already agreed to #8864 first in #6879 (comment), so the stale draft reason is resolved. Marked ready for review, with no dependency on that port. No full-suite rerun, new console measurement or title test is claimed. AI-assisted. |
What
Remove the explicit
FE_DIVBYZEROraise shared byy0f,y1fandynfat ±0. The result remains negative infinity, with errno and existing exception flags preserved.This closes the zero-argument float Bessel gap already recorded in
docs/dev/debt/libc.md, based on the console binary evidence documented there. No new hardware measurement or nonzero-argument implementation is claimed. Add regression coverage for both zeros, existing flags and positive/negativeynforders including the integer limits; remove the closed debt statement.Refreshed head
1d0c48d1ee1324e9edb1dbea3c1ec29a668ceccc, based on audit-start mainf57ceaad6bceeb00a7f4f09975f5932b2f20e28e.git range-diffconfirms that the one-commit patch is unchanged.The reason for keeping this PR draft is resolved: the WASM author agreed to land #8864 first and rebase the port afterward, and subsequently confirmed #8864 remains a prerequisite. This PR does not depend on the WASM port. Marking ready after fresh tests, not claiming that the port has already been rebased.
Fresh overlap review found no duplicate correctness fix. The checker still cannot compare some already-conflicting branches. Manually reviewed #6158 (gamma exports), #7201 (
acosfportability) and #6879 (WASM changes to this helper, covered by the agreed order). The other shared-file warnings concern unrelated debt entries: #3965, #5021, #5303, #6469, #6565, #7081, #7648, #7715, #8150, #8306, #8965, #9109, #9133, #9408, #9447, #9526, #9527 and #9669. A successful checker exit is not a claim that those branches merge cleanly.Tested
Windows 11 x86-64 (build 26300.9711), WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON.Fresh validation of
1d0c48d1ee, basef57ceaad6b:guest_bessel_tests,guest_math_tests,guest_index_testsand current libc.ctest --test-dir build -R '^guest_(bessel|math|index)$' --output-on-failure: 3/3 passed.ctest --test-dir build -R '^guest_bessel$' --repeat until-fail:25 --output-on-failure: 25 consecutive passes.core/libs/prxsources match the new main base, rebuilt, and reproducedGuest y0f(-2147483648, 00000000): result ff800000, flags 8, expected 0, errno 12345. Restored the fix, rebuilt, and passed 3/3 focused tests again. Working tree clean afterward.origin/main, whitespace check, and overlap checker pass, with the manual overlap limitations above.New-push GitHub checks: run 39868732964 passed the relinker matrix (Linux, Windows, both macOS variants), relinker AddressSanitizer, register-context matrix and write-watch checks. These ancillary jobs do not execute the libc Bessel regression; full Linux/Windows runtime jobs are skipped. The focused runtime validation for this head is the local Windows testing above.
Historical validation, not results for the rebased head:
e0e57a327andc58c2af63before changing the implementation.91a05f157(basec58c2af63): 1,807 passed, 18 skipped, 1 not run, 352.72 seconds, exit 8. No executed test failed;agc_driver_image_array_window_past_layer_limitwas unavailable because that unchanged main source requested alignment 65536, exceeding the Windows object-file maximum of 8192. The source has since changed upstream; this is not a current-base build claim.49419d1ccf(base56e088c1a) passed the three focused tests after rebase. An independent reviewer also reported WSL2 Ubuntu 24.04/GCC 13.3 red/green checks on that old head; it is not a Linux retest of the new head.No new hardware measurement, commercial-title retest or performance claim.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)