Subject: bin/12838: new expr(1) is totally broken
To: None <gnats-bugs@gnats.netbsd.org>
From: Ross Harvey <ross@ghs.com>
List: netbsd-bugs
Date: 05/04/2001 16:30:01
>Number: 12838
>Category: bin
>Synopsis: new expr(1) is totally broken
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 04 16:30:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Ross Harvey
>Release: NetBSD-current
>Organization:
>Environment:
System: NetBSD sigmet 1.5U NetBSD 1.5U (skb) #28: Thu Apr 26 19:28:16 PDT 2001 ross@sigmet:/usr/ross/skb i386
Architecture: i386
Machine: i386
>Description:
The new expr(1) implements priorities that are different from
every other commonly used unix system. It broke a script used
by my mailer.
Software
>How-To-Repeat:
$ expr 2 \> 1 \* 17
NetBSD returns 17, every one else returns 0.
>Fix:
Don't replace software that has been tested for years with casually
done rewrites. Fix the bugs. Change is the enemy of reliability.
If a rewrite is necessary, have a senior developer do it.
If a rewrite is necessary, have it reviewed by several serious
developers.
Don't commit widely used tools in critical paths without basic
testing. (Never mind, _serious_ testing.)
Don't check in code just because it compiles and runs successfully
once.
If you rewrite or extensively change a core utility, include
real regression tests. This change included a mere TWO calls
to expr as regression tests, both of which tested only a
completely obscure feature.
Working on NetBSD is a _serious_ activity and must be done
thoughtfully and with care. Find developers who understand this.
>Release-Note:
>Audit-Trail:
>Unformatted: