[Bug binutils/26438] UBSAN error: gas/config/tc-cr16.c:1962:7:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26438

Alan Modra  changed:

   What|Removed |Added

   Last reconfirmed||2020-08-30
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26436] UBSAN error: bfd/elf32-cr16.c:928:46:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26436

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
   Target Milestone|--- |2.36
 Resolution|--- |FIXED

--- Comment #3 from Alan Modra  ---
Fixed

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26438] UBSAN error: gas/config/tc-cr16.c:1962:7:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26438

Alan Modra  changed:

   What|Removed |Added

   Target Milestone|--- |2.36
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Alan Modra  ---
Fixed with commit c930281005b0

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26437] UBSAN error: gas/config/tc-cr16.c:2071:17:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26437

Alan Modra  changed:

   What|Removed |Added

   Target Milestone|--- |2.36
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #2 from Alan Modra  ---
Fixed with commit c930281005b0

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26435] UBSAN error: bfd/elf32-cr16.c:928:21:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26435

Alan Modra  changed:

   What|Removed |Added

   Target Milestone|--- |2.36
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26435] UBSAN error: bfd/elf32-cr16.c:928:21:

2020-08-30 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26435

--- Comment #1 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=34d8e6d0c5f3c51d0e7858572791d8269b9d0f1c

commit 34d8e6d0c5f3c51d0e7858572791d8269b9d0f1c
Author: Alan Modra 
Date:   Sun Aug 30 19:37:15 2020 +0930

PR26435, PR26436 UBSAN: elf32-cr16.c:928 left shift

PR 26435
PR 26436
* elf32-cr16.c (cr16_elf_final_link_relocate): Calculate reloc_bits
without undefined behaviour.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26436] UBSAN error: bfd/elf32-cr16.c:928:46:

2020-08-30 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26436

--- Comment #2 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=34d8e6d0c5f3c51d0e7858572791d8269b9d0f1c

commit 34d8e6d0c5f3c51d0e7858572791d8269b9d0f1c
Author: Alan Modra 
Date:   Sun Aug 30 19:37:15 2020 +0930

PR26435, PR26436 UBSAN: elf32-cr16.c:928 left shift

PR 26435
PR 26436
* elf32-cr16.c (cr16_elf_final_link_relocate): Calculate reloc_bits
without undefined behaviour.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26554] New: SIGSEGV in pe_dll_generate_implib

2020-08-30 Thread markus.boeck02 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26554

Bug ID: 26554
   Summary: SIGSEGV in pe_dll_generate_implib
   Product: binutils
   Version: 2.36 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: markus.boeck02 at gmail dot com
  Target Milestone: ---

Current HEAD of the repository (42afa120eb180bce52c692939cd179e3c02160d9)
causes a segmentation fault when --out-implib is specified on the command line.
The simplest reproduction is to take any C source file that has eg. an empty
main in it and compile it with the command:

gcc main.c -Wl,--out-implib,libout.dll.a

with a gcc that targets a MinGW target.

The SIGSEGV is caused by the dll_filename variable being NULL at the call to
xstrdup in pe-dll.c:2823

The backtrace generated by gdb is:
#0  0x7ff9e320d2f1 in strlen () from C:\WINDOWS\System32\msvcrt.dll
#1  0x005600c7 in xstrdup (s=0x0) at ../../libiberty/xstrdup.c:33
#2  0x0043f41c in pep_dll_generate_implib (def=0x60148d0,
impfilename=0x1797c0 "libcmTC_3e257.dll.a", info=0x6158e0 ) at
../../ld/pe-dll.c:2823
#3  0x00430984 in gld_i386pep_finish () at ei386pep.c:1775
#4  0x00425cda in ldemul_finish () at ../../ld/ldemul.c:101
#5  0x0041ae46 in lang_process () at ../../ld/ldlang.c:8185
#6  0x0041f4d8 in main (argc=71, argv=0x1725a0) at
../../ld/ldmain.c:494
#7  0x00401434 in __tmainCRTStartup () at ../crt/crtexe.c:335
#8  0x0040113d in mainCRTStartup () at ../crt/crtexe.c:219

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26442] UBSAN error: bfd/elf32-crx.c:512:21:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26442

Alan Modra  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-08-30
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26509] UBSAN error: gas/config/tc-z80.c:3656:23:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26509

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-08-30
 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26443] UBSAN error: bfd/elf32-crx.c:512:46:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26443

Alan Modra  changed:

   What|Removed |Added

   Last reconfirmed||2020-08-30
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26444] UBSAN error: bfd/elf32-crx.c:512:51:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26444

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
   Last reconfirmed||2020-08-30

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26443] UBSAN error: bfd/elf32-crx.c:512:46:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26443

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Alan Modra  ---
Dup

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26444] UBSAN error: bfd/elf32-crx.c:512:51:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26444

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Alan Modra  ---
Dup

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26442] UBSAN error: bfd/elf32-crx.c:512:21:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26442

--- Comment #2 from Alan Modra  ---
*** Bug 26444 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/26442] UBSAN error: bfd/elf32-crx.c:512:21:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26442

--- Comment #1 from Alan Modra  ---
*** Bug 26443 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/26434] UBSAN error: bfd/elf32-avr.c:1055:40:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26434

Alan Modra  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #1 from Alan Modra  ---
Fixed with commit 8c51f2f291a

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26445] UBSAN error: bfd/elf32-csky.c:3916:18:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26445

Alan Modra  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-08-31

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26417] UBSAN error: bfd/elf64-alpha.c:3465:13:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26417

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.36

--- Comment #2 from Alan Modra  ---
Yes, it is fixed

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26457] UBSAN error: bfd/som.c:1794:5:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26457

Alan Modra  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-08-31

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26461] UBSAN error: bfd/elfxx-ia64.c:747:34:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26461

Alan Modra  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
   Last reconfirmed||2020-08-31
 Status|UNCONFIRMED |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26464] UBSAN error: bfd/elf32-m32r.c:2695:20:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26464

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
   Target Milestone|--- |2.36

--- Comment #1 from Alan Modra  ---
Fixed with commit 1673aff5698

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gas/26556] New: relax_segment calculates incorrect target frag when OCTETS_PER_BYTE > 1

2020-08-30 Thread tuckkern+sourceware at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26556

Bug ID: 26556
   Summary: relax_segment calculates incorrect target frag when
OCTETS_PER_BYTE > 1
   Product: binutils
   Version: 2.34
Status: UNCONFIRMED
  Severity: minor
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: tuckkern+sourceware at gmail dot com
  Target Milestone: ---

Created attachment 12810
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12810&action=edit
Possible patch

The case statement handling rs_org in write.c around line 2937 does not appear
to calculate the correct target fragment address when OCTETS_PER_BYTE > 1

It only applies OCTETS_PER_BYTE scaling to the symbol value, but not the
offset.

The end result is symbols in .bss with overlapping addresses.

e.g. from readelf - array_ has a size of 4, but var_ is located at address 2

   Num:Value  Size TypeBind   Vis  Ndx Name
 5:  4 OBJECT  LOCAL  DEFAULT4 array_
 6: 0002 1 OBJECT  LOCAL  DEFAULT4 var_


The attached patch is a possible fix, but II am unsure if this is the correct
place to address the issue or if there is another root cause.

Using the above patch the symbol table now looks like so:

   Num:Value  Size TypeBind   Vis  Ndx Name
 5:  4 OBJECT  LOCAL  DEFAULT4 array_
 6: 0004 1 OBJECT  LOCAL  DEFAULT4 var_

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26466] UBSAN error: bfd/elf32-mep.c:300:46:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26466

Alan Modra  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Last reconfirmed||2020-08-31

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26470] UBSAN error: bfd/elf32-metag.c:1610:25:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26470

Alan Modra  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |2.36

--- Comment #1 from Alan Modra  ---
Fixed with commit 1673aff5698

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26476] UBSAN error: bfd/elfxx-mips.c:5369:16:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26476

Alan Modra  changed:

   What|Removed |Added

   Last reconfirmed||2020-08-31
 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Status|UNCONFIRMED |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26477] UBSAN error: bfd/elfxx-mips.c:2694:36:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26477

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Last reconfirmed||2020-08-31
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26493] UBSAN error: elfnn-riscv.c:3465:7:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26493

Alan Modra  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2020-08-31

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26468] UBSAN error: gas/config/tc-mep.c:1684:42:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26468

Alan Modra  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
   Last reconfirmed||2020-08-31

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26471] UBSAN error: gas/config/tc-metag.c:7038:14:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26471

Alan Modra  changed:

   What|Removed |Added

   Last reconfirmed||2020-08-31
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26479] UBSAN error: gas/config/tc-nios2.c:244:36:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26479

Alan Modra  changed:

   What|Removed |Added

   Last reconfirmed||2020-08-31
 Status|UNCONFIRMED |ASSIGNED
   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/26480] UBSAN error: gas/config/tc-nios2.c:1634:17:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26480

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Last reconfirmed||2020-08-31
   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/26495] UBSAN error: gas/config/tc-score7.c:6724:72:

2020-08-30 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26495

Alan Modra  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
   Last reconfirmed||2020-08-31
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.