[Bug ld/32720] ld: add --why-live

2025-02-19 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32720

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org
   See Also||https://reviews.llvm.org/D1
   ||20377,
   ||https://github.com/llvm/llv
   ||m-project/pull/127112

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


[Bug gas/32721] New: internal error in tc-i386.c:parse_register

2025-02-19 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32721

Bug ID: 32721
   Summary: internal error in tc-i386.c:parse_register
   Product: binutils
   Version: 2.45 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: amodra at gmail dot com
  Target Milestone: ---

This one is similar to pr30117 in that fuzzed nonsense can trigger the "know"
in parse_register.

Testcase:
A=%eax%%!
Y=A
Z=A
or $6,Z

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


[Bug binutils/32722] New: [objdump] vmovdqu considered to have 24-bit displacement

2025-02-19 Thread vries at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=32722

Bug ID: 32722
   Summary: [objdump] vmovdqu considered to have 24-bit
displacement
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider the following test-case:
...
$ cat test.s
.file   "test.c"
.text
.globl  main
.type   main, @function
main:
.byte 0xc5
.byte 0xfe
.byte 0x6f
.byte 0x0d
.byte 0xff
.byte 0xff
.byte 0xff
.byte 0xff
.size   main, .-main
.ident  "GCC: (SUSE Linux) 7.5.0"
.section.note.GNU-stack,"",@progbits
...

Compiled with:
...
$ gcc test.s -c
...

Objdump thinks the instruction is 7 bytes long:
...
$ objdump -d test.o
  ...
 :
   0:   c5 fe 6f 0d ff ff ffvmovdqu -0x1(%rip),%ymm1
   7:   ff 
...

However, llvm-objdump thinks it's 8 bytes long:
...
$ llvm-objdump -d test.o
  ...
 :
   0: c5 fe 6f 0d ff ff ff ff   vmovdqu -0x1(%rip), %ymm1
...

GDB likewise:
...
$ gdb -q -batch test.o -ex "disassemble /r main"
Dump of assembler code for function main:
   0x <+0>: c5 fe 6f 0d ff ff ff ff vmovdqu
-0x1(%rip),%ymm1
End of assembler dump.
...

The instruction is in fact 8 bytes long.

It consists of:
- c5 fe: vex2 prefix
- 6f   : opcode
- 0d   : modrm
- ff ff ff ff: 32-bit displacement

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


[Bug binutils/32722] [objdump] vmovdqu considered to have 24-bit displacement

2025-02-19 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32722

H.J. Lu  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|NEW |RESOLVED

--- Comment #1 from H.J. Lu  ---
(In reply to Tom de Vries from comment #0)
> Consider the following test-case:
> ...
> $ cat test.s
>   .file   "test.c"
>   .text
>   .globl  main
>   .type   main, @function
> main:
>   .byte 0xc5
>   .byte 0xfe
>   .byte 0x6f
>   .byte 0x0d
>   .byte 0xff
>   .byte 0xff
>   .byte 0xff
>   .byte 0xff
>   .size   main, .-main
>   .ident  "GCC: (SUSE Linux) 7.5.0"
>   .section.note.GNU-stack,"",@progbits
> ...
> 
> Compiled with:
> ...
> $ gcc test.s -c
> ...
> 
> Objdump thinks the instruction is 7 bytes long:
> ...
> $ objdump -d test.o
>   ...
>  :
>0: c5 fe 6f 0d ff ff ffvmovdqu -0x1(%rip),%ymm1
>7: ff 
 ^^^ This is the 8th byte.

"objdump -dw" shows:

   0:   c5 fe 6f 0d ff ff ff ff vmovdqu -0x1(%rip),%ymm1# 0x7

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


[Bug gas/32721] internal error in tc-i386.c:parse_register

2025-02-19 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=32721

--- Comment #1 from Sourceware Commits  ---
The master branch has been updated by Alan Modra :

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

commit 46b9f07dfe79d8c6857dbfada485a3b9c0e3ffdb
Author: Alan Modra 
Date:   Thu Feb 20 11:49:25 2025 +1030

PR 32721, internal error in tc-i386.c:parse_register

pr30117 showed one of the assertions added by 4d1bb7955a8b was too
strict.  oss-fuzz also found the second assertion to be too strict,
with this testcase distilled from 7k of garbage source:

 A=%eax%%!
 Y=A
 Z=A
 or $6,Z

PR 32721
* config/tc-i386.c (parse_register): Move "know" into
condition.  Simplify.

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


[Bug gas/32721] internal error in tc-i386.c:parse_register

2025-02-19 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32721

Alan Modra  changed:

   What|Removed |Added

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

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

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