[Bug ld/29512] ld non-canon ref to canon protected function check breaks Solaris/x86

2022-11-04 Thread fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29512

Florian Weimer  changed:

   What|Removed |Added

 CC||fweimer at redhat dot com

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


Segmentation Fault on (%dx) [x86]

2022-11-04 Thread Cortex Auth
GNU assembler (GNU Binutils) 2.39.50.20221104

Configured for target x86_64-pc-linux-gnu

Compiled through GCC (12.1.0)

The bug causes a segmentation fault whenever (at least for the instructions
I tried it with) assembler attempts to assemble the instruction with
indirect reference to memory through %dx, that is, one of the operands is
(%dx). The dereference is invalid and thus should be reported as such, but
it instead segfaults
The reason for segmentation fault lies in a null pointer dereference, that
is caused by possibly an incorrect parse of the instruction by `parse_insn`

For example, attempting to assemble
```
_start :
  movw (%dx), %dx
```
causes a segfault at `config/tc-i386.c`, where attempt is made to
dereference `i.op[0]`'s `regs` field, which happens to be NULL
Whenever an instruction is incorrectly encoded, it generates an error when
parsing the instructions (`parse_insn`) which does not happen here, and
wrongly parses information about operands (such as `i.mem_operands` being 0)

Since I spent a significant amount of time looking into it, I would like to
fix this bug. I would appreciate any suggestions, pointers to
documentations, etc that may be helpful to me
It may have to do with some special case associated with (%dx) but I will
have to look further into it before I can reach any conclusion and make a
fix


[Bug gas/29751] New: (%dx) is mishandled

2022-11-04 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29751

Bug ID: 29751
   Summary: (%dx) is mishandled
   Product: binutils
   Version: 2.40 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
Target: i386

The memory operand of (%dx) should be only used with input/output instructions.
But we failed to properly check it:

[hjl@gnu-tgl-3 tmp]$ cat a1.s
incl (%dx)
[hjl@gnu-tgl-3 tmp]$ gcc -c a1.s
[hjl@gnu-tgl-3 tmp]$ objdump -dw a1.o

a1.o: file format elf64-x86-64


Disassembly of section .text:

 <.text>:
   0:   ff 00   incl   (%rax)
[hjl@gnu-tgl-3 tmp]$ cat a2.s
mov   (%dx), %ax
[hjl@gnu-tgl-3 tmp]$ gcc -c a2.s
a2.s: Assembler messages:
a2.s:1: Internal error (Segmentation fault).
Please report this bug.
[hjl@gnu-tgl-3 tmp]$

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


[Bug binutils/26160] [2.35 Regression] Warning: index table size is too small 0 vs 70

2022-11-04 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26160

--- Comment #5 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

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

commit d195b95c91febcdad3ec002d415586cee7f6cb16
Author: H.J. Lu 
Date:   Mon Oct 31 17:02:17 2022 -0700

binutils: Run PR binutils/26160 test

Update expected PR binutils/26160 test output for readelf out change
and run PR binutils/26160 test.

PR binutils/26160
* testsuite/binutils-all/pr26160.r: Updated.
* testsuite/binutils-all/readelf.exp: Run PR binutils/26160 test.

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