[Bug binutils/23466] Issues with Windows reproducible builds starting with commit 13e570f80cbfb299a8858ce6830e91a6cb40ab7b

2019-01-16 Thread boklm at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23466

Nicolas Vigier  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Nicolas Vigier  ---
After investigating the issue, it seems that what is causing our build to be
unreproductible is that an .a archive that we use to link a dll is containing
.o files in random order. It seems that before commit
13e570f80cbfb299a8858ce6830e91a6cb40ab7b the order of .o files inside an .a
archive did not matter, but not anymore.

During our build, we are building gcc 6.4.0, which is using an old version of
libtool, which is adding the .o files inside libstdc++.a in a nondeterministic
order. We can easily patch libtool to sort the .o files when adding them to an
.a archive, which is solving the issue for us.

I don't know if ld giving different output depending on the order of .o files
is a bug or not. As we can easily solve this issue at the gcc/libtool level, I
am closing this ticket, but feel free to reopen it if you think otherwise.

-- 
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/23466] Issues with Windows reproducible builds starting with commit 13e570f80cbfb299a8858ce6830e91a6cb40ab7b

2018-09-17 Thread boklm at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=23466

--- Comment #2 from Nicolas Vigier  ---
(In reply to Alan Modra from comment #1)
> The commit message for 13e570f80cb says "See the comment which I'm removing
> from elf_link_add_archive_symbols."  That's this comment:
> 
>  /* Add symbols from an ELF archive file to the linker hash table.  We
> -   don't use _bfd_generic_link_add_archive_symbols because of a
> -   problem which arises on UnixWare.  The UnixWare libc.so is an
> -   archive which includes an entry libc.so.1 which defines a bunch of
> -   symbols.  The libc.so archive also includes a number of other
> -   object files, which also define symbols, some of which are the same
> -   as those defined in libc.so.1.  Correct linking requires that we
> -   consider each object file in turn, and include it if it defines any
> -   symbols we need.  _bfd_generic_link_add_archive_symbols does not do
> -   this; it looks through the list of undefined symbols, and includes
> -   any object file which defines them.  When this algorithm is used on
> -   UnixWare, it winds up pulling in libc.so.1 early and defining a
> -   bunch of symbols.  This means that some of the other objects in the
> -   archive are not included in the link, which is incorrect since they
> -   precede libc.so.1 in the archive.
> +   don't use _bfd_generic_link_add_archive_symbols because we need to
> +   handle versioned symbols.
> 
> So...  Commit 13e570f80cb may change the order in which files are extracted
> from archives, which in turn can change the set of files extracted from
> archives.  Is that the case for your build?  Link with -Wl,-t to see.

Thanks. I will try a build using -Wl,-t to see if I can get more details about
the issue.

> 
> Also, you say "When running objdump -x on 2 builds of the same dll file". 
> Were the two builds comparing builds using different versions of the linker?
> If so,  it is quite possible that the output will differ.

I meant two builds done using the same linker version (the same binutils
commit), as it is expected that different binutils versions could produce
different outputs. When we are doing two Tor Browser builds using a binutils
commit before 13e570f80cbfb2, we get the same output in both builds. When we do
two Tor Browser builds using 13e570f80cbfb2 or a later binutils commit, we get
a different output in the two builds (although we used the same binutils commit
in both builds).

-- 
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/22762] missing static variable constructor calls

2018-03-21 Thread boklm at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22762

Nicolas Vigier  changed:

   What|Removed |Added

 CC||boklm at torproject dot org

--- Comment #14 from Nicolas Vigier  ---
*** Bug 22989 has been marked as a duplicate of this bug. ***

-- 
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/22989] Crash on mingw-w64 build caused by commit 4c2da80c2bdff7761e

2018-03-21 Thread boklm at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22989

Nicolas Vigier  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Nicolas Vigier  ---
Thanks! I tried a build using master, and I can confirm that the issue is
fixed.

*** This bug has been marked as a duplicate of bug 22762 ***

-- 
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/22989] Crash on mingw-w64 build caused by commit 4c2da80c2bdff7761e

2018-03-21 Thread boklm at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22989

Nicolas Vigier  changed:

   What|Removed |Added

Summary|Crash on mingw-w64 build|Crash on mingw-w64 build
   |caused by commit|caused by commit
   |fd4fad48def1fae4ae4d7906e   |4c2da80c2bdff7761e

-- 
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/22989] Crash on mingw-w64 build caused by commit fd4fad48def1fae4ae4d7906e

2018-03-21 Thread boklm at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22989

Nicolas Vigier  changed:

   What|Removed |Added

URL||https://trac.torproject.org
   ||/projects/tor/ticket/16472
Version|unspecified |2.30

-- 
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/22989] New: Crash on mingw-w64 build caused by commit fd4fad48def1fae4ae4d7906e

2018-03-21 Thread boklm at torproject dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22989

Bug ID: 22989
   Summary: Crash on mingw-w64 build caused by commit
fd4fad48def1fae4ae4d7906e
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: boklm at torproject dot org
  Target Milestone: ---

We are building Tor Browser for Windows using mingw-w64, gcc 5.4.0 and
binutils.

A build done using binutils commit 4c2da80c2bdff7761eb5b3d9c03ffa0c9958b6b9 is
working fine.
A build done using binutils commit ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e is
crashing when we try to start the browser.

In a debugger we can see a lot of messages like:
  warning: 0f64:0944 @ 01846240 - LdrpSnapThunk - WARNING: Hint index 0x119 for
procedure "NtEnumerateKey" in DLL "ntdll.dll" is invalid

  warning: 0f64:0944 @ 01846256 - LdrpSnapThunk - WARNING: Hint index 0x3bb for
procedure "RtlIntegerToUnicodeString" in DLL "ntdll.dll" is invalid

  warning: 0f64:0944 @ 01846287 - LdrpSnapThunk - WARNING: Hint index 0x26e for
procedure "RtlAppendUnicodeStringToString" in DLL "ntdll.dll" is invalid

  warning: 0f64:0944 @ 01846303 - LdrpSnapThunk - WARNING: Hint index 0x4a7 for
procedure "RtlStringFromGUID" in DLL "ntdll.dll" is invalid

Here is a build with commit 4c2da80c2bdff7761eb5b3d9c03ffa0c9958b6b9:
https://people.torproject.org/~boklm/builds/testbuild.4c2da80c2bdff7761eb5b3d9c03ffa0c9958b6b9/torbrowser-install-8.0a2_en-US.exe
f34b0776b28772ce285ff789ae493f6b1bfa086bdc79ff079996ab5ac1ad5344 
testbuild.4c2da80c2bdff7761eb5b3d9c03ffa0c9958b6b9/torbrowser-install-8.0a2_en-US.exe

Here is a build with commit ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e:
https://people.torproject.org/~boklm/builds/testbuild.ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e/torbrowser-install-8.0a2_en-US.exe
221e70cc10a2f1d701966043ae3017d7c31e0623b023154f8029989601aac92a 
testbuild.ca6f2be7f6bc638fd4fad48def1fae4ae4d7906e/torbrowser-install-8.0a2_en-US.exe

We are using 2 binutils patches:
https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/binutils

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