[Bug ld/12808] Segfault in _bfd_elf_merge_symbol

2011-05-26 Thread kmtaylor at gmx dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12808

Kim Taylor kmtaylor at gmx dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |

--- Comment #2 from Kim Taylor kmtaylor at gmx dot com 2011-05-26 12:08:59 
UTC ---
(In reply to comment #1)
 elflink.c in 2.20.1 does not have an error in the line you show in your patch,
 so perhaps you or someone else applied an incorrect patch?

I'm not sure what you mean by this. I'll try to explain the problem clearer:

The following code has been extracted from the latest version of elflink.c
-
  if (tdef  ntdef)
(*_bfd_error_handler)
  (_(%s: TLS definition in %B section %A mismatches non-TLS definition in
%B section %A),
   tbfd, tsec, ntbfd, ntsec, h-root.root.string);
  else if (!tdef  !ntdef)
(*_bfd_error_handler)
  (_(%s: TLS reference in %B mismatches non-TLS reference in %B),
   tbfd, ntbfd, h-root.root.string);
  else if (tdef)
(*_bfd_error_handler)
  (_(%s: TLS definition in %B section %A mismatches non-TLS reference in
%B),
   tbfd, tsec, ntbfd, h-root.root.string);
  else
(*_bfd_error_handler)
  (_(%s: TLS reference in %B mismatches non-TLS definition in %B section
%A),
   tbfd, ntbfd, ntsec, h-root.root.string);
--

There are several cases where the format descriptor does not match the supplied
argument type.

eg: %s: TLS definition in %B section %A mismatches non-TLS reference in %B
(string) (bfd *)   (asection *)   (bfd *)
  tbfdtsec  btbfd h-root.root.string
 (bfd *)  (asection *)  (bfd *)  (string)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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/12808] Segfault in _bfd_elf_merge_symbol

2011-05-26 Thread kmtaylor at gmx dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12808

--- Comment #4 from Kim Taylor kmtaylor at gmx dot com 2011-05-26 13:19:33 
UTC ---
(In reply to comment #3)
 %A and %B are always processed first.

Ahhh, yes you are right. %As and %Bs get caught by _bfd_default_error_handler
then anything remaining gets sent to vfprintf. I missed that.

The segfault occurs in the Debian binutils where the attached patch shows the
first format descriptor as being incorrect.

This is thus not a binutils bug but a Debian bug as Alan was saying. I will
check the Debian tree.

Thanks

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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/12808] New: Segfault in _bfd_elf_merge_symbol

2011-05-25 Thread kmtaylor at gmx dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12808

   Summary: Segfault in _bfd_elf_merge_symbol
   Product: binutils
   Version: 2.20
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sources.redhat.com
ReportedBy: kmtay...@gmx.com


Created attachment 5752
  -- http://sourceware.org/bugzilla/attachment.cgi?id=5752
Fixes bug - Error message may not be correct

The wrong format string is used in calls to _bfd_default_error_handler. The
attached patch fixes the one that caused a crash for me. The other calls are
probably broken too. I do not know enough about what the error messages are
trying to say to fix them properly.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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