[Bug ld/19011] Issues with ld on mingw-w64 and bad defaults

2017-09-26 Thread tom at ritter dot vg
https://sourceware.org/bugzilla/show_bug.cgi?id=19011

Tom Ritter  changed:

   What|Removed |Added

 CC||tom at ritter dot vg

-- 
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/23061] New: objcopy segfault in coff_mangle_symbols

2018-04-13 Thread tom at ritter dot vg
https://sourceware.org/bugzilla/show_bug.cgi?id=23061

Bug ID: 23061
   Summary: objcopy segfault in coff_mangle_symbols
   Product: binutils
   Version: 2.31 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: tom at ritter dot vg
  Target Milestone: ---

Using commit:

commit 4a4495d62d185bdae17ed6aae6ea8249ad07c799 (HEAD -> master, origin/master,
origin/HEAD)
Author: Markus Metzger <markus.t.metz...@intel.com>
Date:   Fri Feb 2 12:29:48 2018 +0100



(gdb) run -v --only-keep-debug xul.dll .debug/xul.dll.debug
Starting program: /home/tom/Documents/moz/mingw-tools/objcopy-trunk -v
--only-keep-debug xul.dll .debug/xul.dll.debug
copy from `xul.dll' [pei-x86-64] to `.debug/xul.dll.debug' [pei-x86-64]

Program received signal SIGSEGV, Segmentation fault.
0x55625c50 in coff_mangle_symbols
(bfd_ptr=bfd_ptr@entry=0x558c4510) at coffgen.c:849
849
a->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p->offset;
(gdb) bt
#0  0x55625c50 in coff_mangle_symbols
(bfd_ptr=bfd_ptr@entry=0x558c4510) at coffgen.c:849
#1  0x5562ec9d in coff_write_object_contents (abfd=) at
coffcode.h:4083
#2  0x555b57da in bfd_close (abfd=0x558c4510) at opncls.c:731
#3  0x55590306 in copy_file (input_filename=0x7fffeb1a "xul.dll",
output_filename=0x7fffeb22 ".debug/xul.dll.debug", input_target=,
output_target=, input_arch=0x0) at objcopy.c:3539
#4  0x5558a21f in copy_main (argv=, argc=) at objcopy.c:5487
#5  main (argc=, argv=) at objcopy.c:5591


This is not a fuzzed input or anything; it is a real file generated from a
MinGW build of Firefox. 

Repro file (xul.dll) is in 
https://queue.taskcluster.net/v1/task/eo3S-KOCTee1NmzZZTDsMA/runs/0/artifacts/public/build/target.zip

-- 
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/23061] objcopy segfault in coff_mangle_symbols

2018-04-16 Thread tom at ritter dot vg
https://sourceware.org/bugzilla/show_bug.cgi?id=23061

--- Comment #3 from Tom Ritter  ---
Thanks Nick. With the patch, I no longer get a segfault. 

However, looking at the patch, it seems to me that it just does a sanity check
to prevent doing something that would be illegal. I had thought my input data
was (supposedly) valid - but it seems that is not the case. Do you agree?

If you know, would you be able to tell me where in the file format (what
fields, etc) this illegal data is?  I previously spent some time writing my own
DWARF parser to identify some other, incorrect data
(https://ritter.vg/misc/stuff/dwarf-error.html) but I had fixed that instance
and hoped I was generating valid data now...

-- 
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/19011] Issues with ld on mingw-w64 and bad defaults

2018-10-11 Thread tom at ritter dot vg
https://sourceware.org/bugzilla/show_bug.cgi?id=19011

--- Comment #7 from Tom Ritter  ---
This is a big drive-by, as I don't have much understanding on the details of
the problem; but Tor uses the following patch to add a relocation section so
Windows builds of Tor Browser can have ASLR:
https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/binutils/enable-reloc-section-ld.patch

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