[Bug gas/23453] New: segmentation fault in config/tc-i386.c, line 3989

2018-07-26 Thread bugs at feusi dot co
https://sourceware.org/bugzilla/show_bug.cgi?id=23453

Bug ID: 23453
   Summary: segmentation fault in config/tc-i386.c, line 3989
   Product: binutils
   Version: 2.32 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gas
  Assignee: unassigned at sourceware dot org
  Reporter: bugs at feusi dot co
  Target Milestone: ---

Created attachment 11153
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11153&action=edit
File which causes segfault

Hi,
I am working on a project in which I use the honggfuzz fuzzer to find bugs in
open-source software and I decided to fuzz gas. In doing so, I discovered a
segmentation fault in config/tc-i386.c, line 3989. Following is a detailed
backtrace, as supplied by the address sanitizer:

ASAN:DEADLYSIGNAL
=
==47033==ERROR: AddressSanitizer: SEGV on unknown address 0x55d1308f2630 (pc
0x7f7e731472c5 bp 0x7ffc7b39ab50 sp 0x7ffc7b39ab00 T0)
==47033==The signal is caused by a WRITE memory access.
#0 0x7f7e731472c4  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x262c4)
#1 0x7f7e731fa8a3 in __interceptor_free
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xd98a3)
#2 0x55d13006afe5 in md_assemble config/tc-i386.c:3989
#3 0x55d12ff9ebb6 in assemble_one
/home/jfe/binutils-gdb-noasan/gas/read.c:711
#4 0x55d12ff9ebb6 in read_a_source_file
/home/jfe/binutils-gdb-noasan/gas/read.c:1179
#5 0x55d12fec0bb9 in perform_an_assembly_pass
/home/jfe/binutils-gdb-noasan/gas/as.c:1187
#6 0x55d12fec0bb9 in main /home/jfe/binutils-gdb-noasan/gas/as.c:1331
#7 0x7f7e72b84a86 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21a86)
#8 0x55d12fec4db9 in _start
(/home/jfe/binutils-gdb-noasan/gas/as-new+0x117db9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0x262c4) 
==47033==ABORTING

To reproduce this bug, run "gas /dev/stdin -o /dev/nullhttps://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/23455] New: gold: should the discarded version information warning exist?

2018-07-26 Thread raphael.kubo.da.costa at intel dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23455

Bug ID: 23455
   Summary: gold: should the discarded version information warning
exist?
   Product: binutils
   Version: 2.31
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: raphael.kubo.da.costa at intel dot com
CC: ian at airs dot com
  Target Milestone: ---

I've been trying to build the Chromium browser here, and linking a few shared
libraries currently fails due to
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=cea6ffbd06a6ebb5c21cb51e7775b8ebb5e34f38
("Fix treatment of symbol versions with unused as-needed libraries").

Chromium uses --as-needed by default, and also builds and links all targets
with -pthread by default. This leads to failures such as

  g++ -shared -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now
-Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=gold -B -m64 -Wl,-O2
-Wl,--gc-sections -o "./libEGL.so" -Wl,-soname="libEGL.so" @"./libEGL.so.rsp"
  /usr/bin/ld.gold: warning: discarding version information for
__cxa_finalize@GLIBC_2.2.5, defined in unused shared library
/usr/lib64/libc.so.6 (linked with --as-needed)
  /usr/bin/ld.gold: error: treating warnings as errors

  g++ -shared -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now
-Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=gold -B -m64 -Wl,-O2
-Wl,--gc-sections -o "./libVkICD_mock_icd.so"
-Wl,-soname="libVkICD_mock_icd.so" @"./libVkICD_mock_icd.so.rsp"
  /usr/bin/ld.gold: warning: discarding version information for
__pthread_key_create@GLIBC_2.2.5, defined in unused shared library
/usr/lib64/libpthread.so.0 (linked with --as-needed)
  /usr/bin/ld.gold: error: treating warnings as errors

While it could be possible to avoid using -pthread everywhere, avoiding libc
itself looks overkill, so I'm wondering if the gold warning is excessive,
especially with --fatal-warnings.

-- 
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