Date: Fri, 06 Apr 2018 18:53:41 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 227329] [PATCH] bin/expr: do not fail with "overflow" if no overflow occurs Message-ID: <bug-227329-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227329 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: bugs@FreeBSD.org Reporter: tobias@stoeckmann.org Created attachment 192294 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D192294&action= =3Dedit 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=3Dopenbsd-tech&m=3D152245790622327&w=3D2 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227329-227>