Subject: bin/12838: new expr(1) is totally broken
To: None <>
From: Ross Harvey <>
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
>Originator:     Ross Harvey
>Release:        NetBSD-current
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
	The new expr(1) implements priorities that are different from
	every other commonly used unix system. It broke a script used
	by my mailer.

	$ expr 2 \> 1 \* 17

	NetBSD returns 17, every one else returns 0.
	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

	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

	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.