Skip to content

Reject trailing characters in parseSize - #142

Open
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fallintoplace/parse-size-validation
Open

Reject trailing characters in parseSize#142
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fallintoplace/parse-size-validation

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate the full suffix returned by stoull
  • reject malformed values like 4kb, 1.5m, and 12junk
  • add focused parser tests under src/perf/util, guarded by BUILD_TESTING

Test plan

  • clang-format --dry-run --Werror
  • strict Clang syntax checks for the parser and test source

@praktika-gh

praktika-gh Bot commented Aug 25, 2026

Copy link
Copy Markdown

Workflow [PR], commit [4cd749d]


Code Review

Result: ✅ No issues found

What changed: Updates parseSize to validate the entire suffix and reject malformed trailing characters. Adds focused unit tests and includes them only when BUILD_TESTING is enabled.

No issues found. The test target is now correctly guarded by BUILD_TESTING, and the parser validates the complete suffix as intended.

Investigation: 2/13 rounds, 11 tool calls.

Comment thread src/perf/CMakeLists.txt Outdated
@fallintoplace
fallintoplace force-pushed the fallintoplace/parse-size-validation branch from 855947c to 4cd749d Compare August 25, 2026 08:01
@fallintoplace fallintoplace changed the title perf: reject malformed parseSize inputs perf: reject trailing characters in parseSize Aug 25, 2026
@fallintoplace fallintoplace changed the title perf: reject trailing characters in parseSize Reject trailing characters in parseSize Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant