Crash on benchmark using recursive flag
RubenKelevra opened this issue · 1 comments
RubenKelevra commented
Describe the bug
I tried the benchmark function out with the -r
flag. If I use it without the -S
parameter, it will crash.
To Reproduce
Steps to reproduce the behavior:
- Install zstd 1.5.6 under CachyOS
- Run
zstd -b3 -r Pictures
with files in Pictures - Crash
Expected behavior
No crash
Screenshots and charts
$ zstd -b -r Pictures
zstd: /tmp/pkg/src/zstd-1.5.6/programs/benchzstd.c:150: formatString_u: Assertion `value <= 100' failed.
Caught SIGABRT signal, printing stack:
/usr/lib/libc.so.6(pthread_kill+0x11b) [0x737983a3e65b]
/usr/lib/libc.so.6(gsignal+0x18) [0x7379839df0a8]
/usr/lib/libc.so.6(abort+0xd7) [0x7379839c147b]
/usr/lib/libc.so.6(+0x2439f) [0x7379839c139f]
/usr/lib/libc.so.6(+0x38256) [0x7379839d5256]
zstd(+0xf3bf) [0x600c5e9d53bf]
zstd(+0x7012) [0x600c5e9cd012]
/usr/lib/libc.so.6(+0x2618e) [0x7379839c318e]
/usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7379839c324a]
zstd(+0x9ae5) [0x600c5e9cfae5]
fish: Job 1, 'zstd -b -r Pictures' terminated by signal SIGABRT (Abort)
$ zstd -b3 -S -r Pictures
3#-04-24 174906.png : 46266 -> 39335 (x1.176), 160.5 MB/s, 7891.5 MB/s
3#-02-07 214221.png : 213367 -> 201378 (x1.060), 195.9 MB/s, 15163.9 MB/s
3#-03-20 191943.png : 12871 -> 12445 (x1.034), 526.7 MB/s, 7999.9 MB/s
3#-02-07 185449.png : 244645 -> 234444 (x1.044), 165.2 MB/s, 11230.8 MB/s
3#-12-01 180247.png : 31734 -> 30456 (x1.042), 911.0 MB/s 27331.3 MB/s
3#-11-02 133914.png : 1398892 -> 1398934 (x1.000), 3559.6 MB/s, 25123.0 MB/s
3#240719_090203.jxl : 43696 -> 43706 (x1.000), 2110.4 MB/s 50011.2 MB/s
3#240722_203436.jxl : 118656 -> 118668 (x1.000), 2408.6 MB/s, 50026.5 MB/s
3#-11-01 042456.png : 13843 -> 13380 (x1.035), 1048.6 MB/s, 24124.4 MB/s
[...]
Desktop (please complete the following information):
- OS: CachyOS
- Version 1.5.6-2
- Compiler / Build system: Link
- Flags: CachyOS uses -O3 with x86_64 v4 optimizations
- Other relevant hardware specs: Intel i5-1135G7
Cyan4973 commented
Indeed, the current code limits benchmark to ~100 files.
But it's just a display limit.
I think it can be extended.