Conversation
fhgffy
marked this pull request as ready for review
October 4, 2026 07:50
This branch has not been deployed
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.
Summary
An explicit
LorLLsuffix should preserve a nondecimal value as a 64-bit integer. Currently,v = 0xffffffffL;parses successfully as an INT64 setting but stores-1instead of4294967295. Binary and octal equivalents have the same problem;0x80000000LLbecomes-2147483648.libconfig_parse_integerapplies 32-bit signed interpretation before inspecting the suffix. Skip that narrowing step when the parsed number has anLsuffix, then let the existing suffix handling select the 64-bit type. Unsuffixed signed interpretation, decimal parsing, and malformed-input/overflow checks are unchanged.The regression covers all three nondecimal bases, both suffixes, the signed-32-bit boundary, values around the unsigned-32-bit upper boundary,
INT64_MAX, decimal controls, unsuffixed compatibility, and exact serialized output. This is separate from the integer-assignment conversion change in #302.Validation
Tested on Linux x86_64 with GCC/G++ 14.2.0, CMake 3.31.6 and Ninja 1.11.1, based on
1e2dedd046f5119e67b0ccbda5916e8aff55c142:ASAN_OPTIONS=detect_leaks=0; LeakSanitizer was not rungit diff --checkpassesThe additional matrix excluded six unsuffixed negative binary round trips after reproducing a separate existing binary-writer failure on the unchanged base. Their parsing checks passed; this patch does not change that writer behavior. Existing octal-to-decimal serialization is also unchanged.
Windows/MSVC, macOS, 32-bit targets, alternate C libraries, embedded hardware, fuzzing and Autotools were not tested locally. Autotools tools are unavailable in this environment. These results do not establish LeakSanitizer or cross-platform coverage.