NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59903: rs dumps core on valid input
>Number: 59903
>Category: bin
>Synopsis: rs dumps core on valid input
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 10 01:00:00 +0000 2026
>Originator: mac%culver.net@localhost
>Release: NetBSD 10.1
>Organization:
>Environment:
System: NetBSD SS.Culver.Net 10.1 NetBSD 10.1 (MIKE-$Revision: 2025-Dec-27 $) #1: Sun Dec 28 19:39:48 UTC 2025 mac%SS.Culver.Net@localhost:/usr/src/sys/arch/amd64/compile/MIKE amd64 My kernel is just a rename of GENERIC
Architecture: x86_64
Machine: amd64
>Description:
rs appears to work properly most of the time, but by accident I found the following error
>How-To-Repeat:
file '2x2' contains:
43 76
27 29
file '2x10' contains"
43 27 8 22 12 78 18 43 41 13
76 29 85 100 34 78 45 80 24 50
$ cat 2x2
43 76
27 29
$ rs -tz < 2x2
43 76 27 29
$ cat 2x10
43 27 8 22 12 78 18 43 41 13
76 29 85 100 34 78 45 80 24 50
$ rs -tz < 2x10
zsh: segmentation fault rs -tz < 2x10
I did not try reducing the seg fault input more than this 2x10 example
test files generated by playing around with this:
$ cd /tmp
$ jot -r 100 | rs 10 10 | tee 10x10 | rs -T > T10x10
$ head -2 T10x10 > 2x10
$ rs < 2x10 | rs | head -4 | rs 2 2 > 2x2
$ rs -tz < 2x10
zsh: segmentation fault rs -tz < 2x10
I believe the problem is specific input data, to wit:
$ cat 2x10
43 27 8 22 12 78 18 43 41 13
76 29 85 100 34 78 45 80 24 50
$ rs -z -t < 2x10
zsh: segmentation fault (core dumped) rs -z -t < 2x10 ;; switch order is irrelevant
$ cat /tmp/2x10
97 2 2 29 40 6 67 36 54 78
88 14 26 77 10 85 9 65 96 97
$ rs -t -z < /tmp/2x10
97 2 2 29 40 6 67 36 54 78 88 14 26 77 10 85 9 65 96 97
FINALLY, if I change the "100" in the 'bad' file to, say, 99 --- no problem. to 101? same problem.
>Fix:
Home |
Main Index |
Thread Index |
Old Index