You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
seq refuses more than 1e9 iterations ('seq: too many iterations'); GNU streams unbounded #1376
Probe-verified (same-source mingw+Wine harness, two runs, GNU coreutils 9.4):
seq 1000000001 | head -3 → WinuxCmd: seq: too many iterations, exit 1, no output at all. GNU streams 1 2 3 ... unbounded.
The cap is on the iteration count: seq 1000000001 1000000003 (three values, all > 1e9) works fine on both.
A hard 1e9-iteration ceiling makes seq unusable as a streaming producer for large ranges — exactly the role it plays in shell pipelines, where the consumer decides how much to read.
Expected (GNU)
seq generates lazily with no iteration cap; memory and output volume are the consumer's concern.
Source
src/commands/seq.cpp: an upfront total-iteration computation is validated against a 1'000'000'000 limit and refused before generation.
Regression seed
In-repo test named with this issue number: seq 1000000001 | head -3 (or an equivalent bounded read) yields the first values with no error.
Activity
Merge pull request #1397 from unixwin/fix/winx5-misc
fix(seq): chunked seq_fast flush + u64 counter core; rescale the #1376 …