Repository navigation
feat(libc): implement bounded decimal parsing with strtonum - #8037
Merged
oneandonlydean merged 2 commits intoOct 20, 2026
Merged
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.
|
Contributor
|
Windows run (the description has Linux only): Windows 11 Home 26300, Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON. This PR merged onto
AI-assisted: yes (Claude Code); results above were run on this machine. |
12 tasks done
# Conflicts: # core/libs/tests/GuestStrings.cpp
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add the missing
strtonumexport (XrIfmNFHL4I) to libc. Parse decimal signed 64-bit values within inclusive caller bounds, returninvalid,too smallortoo largeon failure, and preserve the caller's errno on success. Malformed input takes precedence over overflow, and reversed bounds are rejected before parsing.The signature and behavior follow FreeBSD 11.4 strtonum.c. The name/NID pair is present in the pinned symbol database. Console behavior remains unverified and is recorded in libc technical debt.
No matching open or closed PR, issue, or
origin/mainsymbol-history change was found.pr_overlap.pyreported no direct overlaps. Its not-compared shared files were reviewed manually: #5021, #5303, #6226, #6469, #6819, #7081, #7332, #7386, #7417, #7473, #7525 and #7715 change unrelated libc debt entries; #6044 only renamesGuestStrings.cppintotests/runtime/with zero content changes. None implements or testsstrtonum.Tested
Ubuntu 26.04 x86-64, GCC 15.2.0, Release,
BUILD_TESTING=ON:-j12.strtonum_nid_postfixis absent.guest_strings,guest_wide_strings,guest_errors,guest_safe_errorsandguest_allocating_stringspass.guest_strings: reversed-bound validation, trailing-character rejection, signed underflow, signed overflow, successful errno preservation, successful error-pointer clearing, and failure errno assignment.XrIfmNFHL4I.No title, console, Windows or macOS execution was tested. No 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)