-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Working on the fuzzer:
#4642
with gnu:
$ /usr/bin/expr 223 \& 0
0
$ /usr/bin/expr 223 \& 32
223
With ours:
./target/debug/expr 233 \& 0
0
./target/debug/expr 233 \& 0
0
Docs says:
Return its first argument if neither argument is null or zero, otherwise 0. It does not evaluate its second argument if its first argument is null or zero.
Probably a side effect, in the GNU tests, we can see:
# In 5.1.3 and earlier, these would report errors.
['andand', '0 \& 1 / 0', {OUT => '0'}, {EXIT => 1}],
['oror', '1 \| 1 / 0', {OUT => '1'}, {EXIT => 0}],
With our impl:
$ ./target/debug/coreutils expr 0 \& 1 / 0
expr: division by zero
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Status
Done