Bug 197810 - devel/armv6-freebsd10.0-xdev: fix undefined behavior in gas's tc-arm.c
Summary: devel/armv6-freebsd10.0-xdev: fix undefined behavior in gas's tc-arm.c
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 197395
  Show dependency treegraph
 
Reported: 2015-02-18 21:03 UTC by Dimitry Andric
Modified: 2015-02-18 22:27 UTC (History)
2 users (show)

See Also:


Attachments
Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro (1.24 KB, patch)
2015-02-18 21:03 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2015-02-18 21:03:47 UTC
Created attachment 153163 [details]
Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro

Similar to bug 197806, there is a failure in armv6-freebsd10.0-xdev due to gas "invalid constant after fixup" errors:

http://pb2.nyi.freebsd.org/data/headi386PR197395-default/2015-02-12_00h00m41s/logs/errors/armv6-freebsd10.0-xdev-10.0.log

This is again due to undefined behavior in gas's rotate_left() macro, as fixed in head here:

https://svnweb.freebsd.org/base?view=revision&revision=274856

Apply this revision onto the unpacked src.txz to avoid the build failure with clang 3.6.0.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2015-02-18 22:10:26 UTC
Approved as well :)
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-02-18 22:27:15 UTC
A commit references this bug:

Author: dim
Date: Wed Feb 18 22:26:46 UTC 2015
New revision: 379321
URL: https://svnweb.freebsd.org/changeset/ports/379321

Log:
  Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro, as
  in https://svnweb.freebsd.org/base?view=revision&revision=274856

  This fixes possible "invalid constant after fixup" errors from gas, when
  it has been compiled with high levels of optimization.

  PR:		197810
  Approved by:	maintainer (bapt)

Changes:
  head/devel/armv6-freebsd10.0-xdev/files/patch-contrib_binutils_gas_config_tc-arm.c
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2015-02-18 22:27:51 UTC
Fixed in r379321.