Bug 196867 - expr on FreeBSD doesn't bounds check certain values dealing with overflow very well
Summary: expr on FreeBSD doesn't bounds check certain values dealing with overflow ver...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
: 191719 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-19 06:02 UTC by Enji Cooper
Modified: 2015-11-09 10:00 UTC (History)
2 users (show)

See Also:
ngie: mfc-stable10+
ngie: mfc-stable9-
ngie: mfc-stable8-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2015-01-19 06:02:46 UTC
It doesn't handle edgecases as well as NetBSD's copy of expr(1) does. Failing testcases from contrib/netbsd-tests coming soon..
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2015-01-19 06:03:39 UTC
This is a followup to the discussion I started with bde and se offline...
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-01-19 06:10:15 UTC
A commit references this bug:

Author: ngie
Date: Mon Jan 19 06:10:01 UTC 2015
New revision: 277357
URL: https://svnweb.freebsd.org/changeset/base/277357

Log:
  Expect :overflow to fail with FreeBSD's expr as it doesn't have stringent
  overflow checks like NetBSD's expr does

  MFC after: 3 days
  PR: 196867

Changes:
  head/contrib/netbsd-tests/bin/expr/t_expr.sh
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-01-23 00:34:31 UTC
A commit references this bug:

Author: ngie
Date: Fri Jan 23 00:34:20 UTC 2015
New revision: 277549
URL: https://svnweb.freebsd.org/changeset/base/277549

Log:
  MFC r276671,r277357:

  r276671 (by ngie):

    Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD

    Sponsored by: EMC / Isilon Storage Division

  r277357 (by ngie):

    Expect :overflow to fail with FreeBSD's expr as it doesn't have stringent
    overflow checks like NetBSD's expr does

    PR: 196867

Changes:
_U  stable/10/
  stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-01-28 11:38:26 UTC
A commit references this bug:

Author: ngie
Date: Wed Jan 28 11:38:13 UTC 2015
New revision: 277829
URL: https://svnweb.freebsd.org/changeset/base/277829

Log:
  Revert r277357 as expr has been enhanced to better detect overflow conditions,
  and now the tests pass

  PR: 196867
  X-MFC with: r277798
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Changes:
  head/contrib/netbsd-tests/bin/expr/t_expr.sh
Comment 5 Enji Cooper freebsd_committer freebsd_triage 2015-02-05 11:13:38 UTC
*** Bug 191719 has been marked as a duplicate of this bug. ***
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-05-23 09:16:39 UTC
A commit references this bug:

Author: rodrigc
Date: Sat May 23 09:16:36 UTC 2015
New revision: 283311
URL: https://svnweb.freebsd.org/changeset/base/283311

Log:
  Merge: r277829

  Revert r277357 as expr has been enhanced to better detect overflow conditions,
  and now the tests pass

  PR: 196867
  X-MFC with: r277798
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Changes:
_U  stable/10/
  stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh