Skip to content

Handle large string repeat counts on 32-bit#2713

Open
cyphercodes wants to merge 1 commit into
mikefarah:masterfrom
cyphercodes:fix-2702-multiply-i386
Open

Handle large string repeat counts on 32-bit#2713
cyphercodes wants to merge 1 commit into
mikefarah:masterfrom
cyphercodes:fix-2702-multiply-i386

Conversation

@cyphercodes
Copy link
Copy Markdown
Contributor

Summary

  • Parse string repeat counts as int64 so oversized repeat counts reach the result-size guard on 32-bit builds.
  • Keep the large-repeat regression scenario at the 64-bit overflow value from TestMultiplyOperatorScenarios fails on i386 #2702 and verify it reports the size-limit error instead of an architecture-dependent int range error.

Fixes #2702

Tests

  • go test ./pkg/yqlib -run TestMultiplyOperatorScenarios -count=1
  • GOARCH=386 go test ./pkg/yqlib -run TestMultiplyOperatorScenarios -count=1
  • go test ./pkg/yqlib -count=1
  • ./scripts/format.sh
  • ./scripts/check.sh
  • ./scripts/spelling.sh
  • git diff --check

Comment thread pkg/yqlib/operator_multiply.go Fixed
@cyphercodes cyphercodes force-pushed the fix-2702-multiply-i386 branch 2 times, most recently from 4ae05c4 to 0064662 Compare May 20, 2026 03:50
@cyphercodes cyphercodes force-pushed the fix-2702-multiply-i386 branch from 0064662 to af6b4f3 Compare May 20, 2026 03:54
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.

TestMultiplyOperatorScenarios fails on i386

2 participants