[Bug ld/20932] LD: Internal error during record link assignment

2017-10-03 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20932

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Alan Modra  ---
Another one I forgot to close

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19013] Section corrupted with elf64-x86-64 input -> elf32-i386 output

2017-10-03 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19013

Alan Modra  changed:

   What|Removed |Added

 CC||Jonathon.Reinhart at gmail dot 
com

--- Comment #8 from Alan Modra  ---
*** Bug 20832 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/20832] String merging elf32-i386 object files with elf64-x86-64 ld causes incorrect results

2017-10-03 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20832

Alan Modra  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||amodra at gmail dot com
 Resolution|--- |DUPLICATE

--- Comment #2 from Alan Modra  ---


*** This bug has been marked as a duplicate of bug 19013 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/20811] strip not stripped in the dynamic table

2017-10-03 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20811

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||amodra at gmail dot com
 Resolution|--- |OBSOLETE

--- Comment #2 from Alan Modra  ---
No response from reporter.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug admin/22239] New: invalid memory read in display_debug_frames (dwarf.c)

2017-10-03 Thread ago at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22239

Bug ID: 22239
   Summary: invalid memory read in display_debug_frames (dwarf.c)
   Product: binutils
   Version: 2.30 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: admin
  Assignee: unassigned at sourceware dot org
  Reporter: ago at gentoo dot org
  Target Milestone: ---

Created attachment 10498
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10498&action=edit
stacktrace

On 2.29.51.20171002:

# objdump -g -D -F -S --file-start-context -l -R -s -W -G -T --special-syms -x
$FILE

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug admin/22239] invalid memory read in display_debug_frames (dwarf.c)

2017-10-03 Thread ago at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22239

--- Comment #1 from Agostino Sarubbo  ---
Created attachment 10499
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10499&action=edit
testcase

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


-mfence-as-lock-add option in binutils 2.27

2017-10-03 Thread Parul Chahar
Hi,
I found that a new option "-mfence-as-lock-add" is added in binutils 2.27.
It generate lock instruction when "-mfence-as-lock-add=yes". Otherwise,
mfence, lfence, sfence is generated.

Please let me know why this option is required. Why lock instruction is
needed.

Thanks,
Parul
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22240] New: hang of the objdump process

2017-10-03 Thread ago at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22240

Bug ID: 22240
   Summary: hang of the objdump process
   Product: binutils
   Version: 2.30 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: ago at gentoo dot org
  Target Milestone: ---

Created attachment 10500
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10500&action=edit
testcase

On 2.29.51.20171002, the attached testcase freezes the objdump process launched
with:

# objdump -g -D -F -S --file-start-context -l -R -s -W -G -T --special-syms -x
$FILE

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22240] hang of the objdump process

2017-10-03 Thread ago at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22240

--- Comment #1 from Agostino Sarubbo  ---
also the process uses the 100% of the cpu

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


Re: -mfence-as-lock-add option in binutils 2.27

2017-10-03 Thread Ian Lance Taylor
Parul Chahar  writes:

> I found that a new option "-mfence-as-lock-add" is added in binutils 2.27.
> It generate lock instruction when "-mfence-as-lock-add=yes". Otherwise,
> mfence, lfence, sfence is generated.
>
> Please let me know why this option is required. Why lock instruction is
> needed.

It's not needed, but it can be more efficient.  See, for example,

https://shipilev.net/blog/2014/on-the-fence-with-dependencies/#_hardware

Ian

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22245] New: Potential UB in bfd_set_error

2017-10-03 Thread kryukov at frtk dot ru
https://sourceware.org/bugzilla/show_bug.cgi?id=22245

Bug ID: 22245
   Summary: Potential UB in bfd_set_error
   Product: binutils
   Version: 2.29
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: kryukov at frtk dot ru
  Target Milestone: ---

Hello

My student Kirill Nedostoev tried to build binutils 2.29.1 with Clang 7 and he
found a following message:

```
bfd.c:519:21: error: passing an object that undergoes default argument
promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]`
  va_start (ap, error_tag);
```

The description of the actual problem is available on CERT site
https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start

As a solution, we suggest to change signature of `bfd_set_error` in a following
way:

-void bfd_set_error (bfd_error_type error_tag, ...);
+void bfd_set_error (int error_tag, ...);

To get a patch, you may pull from https://github.com/pavelkryukov/binutils.git

Thanks,
Pavel Kryukov

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22245] Potential UB in bfd_set_error

2017-10-03 Thread kryukov at frtk dot ru
https://sourceware.org/bugzilla/show_bug.cgi?id=22245

--- Comment #1 from Pavel I. Kryukov  ---
Created attachment 10503
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10503&action=edit
Fix potential UB in bfd_set_error

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/21167] gas v2.28.51 does not include .rel[a] sections to groups

2017-10-03 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21167

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-10-03
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22245] Potential UB in bfd_set_error

2017-10-03 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22245

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-10-04
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Ever confirmed|0   |1

--- Comment #2 from Alan Modra  ---
Thanks for the patch.  Will apply.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22245] Potential UB in bfd_set_error

2017-10-03 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22245

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9ba5f27cdd15d22d6c5739ff5d2b1c81d796e114

commit 9ba5f27cdd15d22d6c5739ff5d2b1c81d796e114
Author: Pavel I. Kryukov 
Date:   Tue Oct 3 22:42:07 2017 +0300

PR22245, Fix potential UB in bfd_set_error

Passing enum as a first argument to variadic argument function
may lead to undefined behavior. The explanation on CERT site:
https://www.securecoding.cert.org/confluence/display/cplusplus/
EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start

The bug was found by Kirill Nedostoev (nedostoev...@phystech.edu)
when he tried to build GNU binutils with Clang 7.

PR 22245
* bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
undergoes default promotion.
* bfd-in2.h: Regenerate.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22245] Potential UB in bfd_set_error

2017-10-03 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22245

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_29-branch branch has been updated by Alan Modra
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99ca76d3db25af8e017d7d54df677db0561907f5

commit 99ca76d3db25af8e017d7d54df677db0561907f5
Author: Pavel I. Kryukov 
Date:   Tue Oct 3 22:42:07 2017 +0300

PR22245, Fix potential UB in bfd_set_error

Passing enum as a first argument to variadic argument function
may lead to undefined behavior. The explanation on CERT site:
https://www.securecoding.cert.org/confluence/display/cplusplus/
EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start

The bug was found by Kirill Nedostoev (nedostoev...@phystech.edu)
when he tried to build GNU binutils with Clang 7.

PR 22245
* bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
undergoes default promotion.
* bfd-in2.h: Regenerate.

(cherry picked from commit 9ba5f27cdd15d22d6c5739ff5d2b1c81d796e114)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/22245] Potential UB in bfd_set_error

2017-10-03 Thread kryukov at frtk dot ru
https://sourceware.org/bugzilla/show_bug.cgi?id=22245

Pavel I. Kryukov  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Pavel I. Kryukov  ---
Thank you!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils