<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin/expr/expr.y, branch releng/12.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.3</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.3'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2018-04-14T04:35:10Z</updated>
<entry>
<title>expr(1): Fix overflow detection when operand is INTMAX_MIN</title>
<updated>2018-04-14T04:35:10Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2018-04-14T04:35:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=41bd31e656e776866ce3f6d64923913b3cf4a712'/>
<id>urn:sha1:41bd31e656e776866ce3f6d64923913b3cf4a712</id>
<content type='text'>
PR:		227329
Submitted by:	Tobias Stoeckmann &lt;tobias AT stoeckmann.org&gt;
</content>
</entry>
<entry>
<title>Fix overflow check for multiplication:</title>
<updated>2015-01-27T18:04:41Z</updated>
<author>
<name>Stefan Eßer</name>
<email>se@FreeBSD.org</email>
</author>
<published>2015-01-27T18:04:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8da97f00573902efb70b1732b550edacf673fef5'/>
<id>urn:sha1:8da97f00573902efb70b1732b550edacf673fef5</id>
<content type='text'>
- Add special test to detect the case of -1 * INTMAX_MIN
- Protect against elimination of the test division by the optimizer

Garrett Cooper noticed that the overflow checks were incomplete, and Bruce
Evans suggested the use of the "volatile" qualifier to counter the effect
of the undefined behaviour, when the prior multiplication caused overflow,
and he also suggested improvements to the comments.

Reviewed by:	bde
MFC after:	1 week
</content>
</entry>
<entry>
<title>Remove redundant declaration of yyparse</title>
<updated>2012-05-22T03:01:54Z</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@FreeBSD.org</email>
</author>
<published>2012-05-22T03:01:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fcae0e3887ea9cb39b2f6e93f48b29add3184dc6'/>
<id>urn:sha1:fcae0e3887ea9cb39b2f6e93f48b29add3184dc6</id>
<content type='text'>
Reported by:	tinderbox
</content>
</entry>
<entry>
<title>rm[0].rm_so must be zero (an explicit check is made for zero in the</title>
<updated>2012-03-19T00:45:01Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2012-03-19T00:45:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8c3bbba8241a0ae8804aa9d788f1475ab99e6080'/>
<id>urn:sha1:8c3bbba8241a0ae8804aa9d788f1475ab99e6080</id>
<content type='text'>
outer if condition)

Reviewed by:	se
Approved by:	cperciva
</content>
</entry>
<entry>
<title>Fix style, since this file has just been touched in a major way.</title>
<updated>2011-07-09T12:20:15Z</updated>
<author>
<name>Stefan Eßer</name>
<email>se@FreeBSD.org</email>
</author>
<published>2011-07-09T12:20:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=69759f0829c3274f38a92f0a956b324c5bc9e908'/>
<id>urn:sha1:69759f0829c3274f38a92f0a956b324c5bc9e908</id>
<content type='text'>
No actual code changes.
</content>
</entry>
<entry>
<title>Some refactoring for easier maintenance of the code. This is a follow-up</title>
<updated>2011-07-09T12:14:57Z</updated>
<author>
<name>Stefan Eßer</name>
<email>se@FreeBSD.org</email>
</author>
<published>2011-07-09T12:14:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6fbe7bf4f28203afb9f07af23d6beb21c3db34a4'/>
<id>urn:sha1:6fbe7bf4f28203afb9f07af23d6beb21c3db34a4</id>
<content type='text'>
to re-establishment of 64bit arithmetic, but is committed separately, to
not obscure that conversion. This commit does not change the observed
behaviour of expr in any way. Style will be fixed in a follow-up commit.
</content>
</entry>
<entry>
<title>Make /bin/expr support 64bit numeric range and range checks by default,</title>
<updated>2011-07-09T12:05:53Z</updated>
<author>
<name>Stefan Eßer</name>
<email>se@FreeBSD.org</email>
</author>
<published>2011-07-09T12:05:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fa717604a42dff3416a3e299da0abf01d9f8521e'/>
<id>urn:sha1:fa717604a42dff3416a3e299da0abf01d9f8521e</id>
<content type='text'>
again. This brings back the behaviour of expr in FreeBSD-4, which had been
reverted due to an assumed incompatbility with POSIX.1 for FreeBSD-5.

This issue has been discussed in the freebsd-standards list, and the
consensus was, that POSIX.1 is in fact not violated by this extension,
since it affects only cases of POSIX undefined behaviour (overflow of
signed long).

Other operating systems did upgrade their versions of expr to support
64bit range, after it had been initially brought to FreeBSD. They have
used it for a decade without problems, meanwhile.

The -e option is retained, but it will only select less strict checking
of numeric parameters (leading white-space, leading "+" are allowed and
skipped, an empty string is considered to represent 0 in numeric context.)
The call of check_utility_compat() as a means of establishing backwards
compatibility with FreeBSD-4 is considered obsolete, but preserved in
this commit. It is expected to be removed in a later revision of this
file.
Reviewed by:	bde, das, jilles
MFC after:	2 month (those parts that do not violate POLA)
</content>
</entry>
<entry>
<title>Correct typos containing my login name (plus one more in expr.y).</title>
<updated>2007-02-18T19:48:59Z</updated>
<author>
<name>Ceri Davies</name>
<email>ceri@FreeBSD.org</email>
</author>
<published>2007-02-18T19:48:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e1854a84ad9fb9b70e1b9ca134d93251ec9a0070'/>
<id>urn:sha1:e1854a84ad9fb9b70e1b9ca134d93251ec9a0070</id>
<content type='text'>
Found courtesy of a recursive grep in the wrong directory.
</content>
</entry>
<entry>
<title>/*- or .\"- or #- to begin license clauses.</title>
<updated>2005-01-10T08:39:26Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2005-01-10T08:39:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9ddb49cbe45441fa3f3a10f6dd355e9956480b5f'/>
<id>urn:sha1:9ddb49cbe45441fa3f3a10f6dd355e9956480b5f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Create a small library function, check_utility_compat(3), to determine</title>
<updated>2002-10-28T00:15:43Z</updated>
<author>
<name>Garrett Wollman</name>
<email>wollman@FreeBSD.org</email>
</author>
<published>2002-10-28T00:15:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c9885518de2f8c1da3530130cbd3a5ed88f09a28'/>
<id>urn:sha1:c9885518de2f8c1da3530130cbd3a5ed88f09a28</id>
<content type='text'>
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard).  The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.
</content>
</entry>
</feed>
