https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227329
Bug ID: 227329
Summary: [PATCH] bin/expr: do not fail with "overflow" if no
overflow occurs
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
Created attachment 192294
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=192294&action=edit
Patch to fix the issue
It is possible to trigger an overflow error message with expr, even though no
overflow would occur:
$ expr -- -36854775800 - \( -9223372036854775807 - 1 \)
expr: overflow
$ _
The function assert_minus() verifies subtraction in an invert addition case,
which is not correct.
See also the OpenBSD discussion here:
https://marc.info/?l=openbsd-tech&m=152245790622327&w=2
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"