This is a followup to #8105.
More trivial changes merged into one PR.
This is a followup to #8105.
More trivial changes merged into one PR.
Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits
Also, I was wondering how much is left until we can enable Wshadow
12@@ -13,7 +13,7 @@ class reverse_lock
13 {
14 public:
15
16- explicit reverse_lock(Lock& lock) : lock(lock) {
17+ explicit reverse_lock(Lock& _lock) : lock(_lock) {
Wladimir investigated in #8793. It changes the binaries.
Technically it can be done by changing lock
to _lock
in the body of the function. But we decided that it is wrong to do that.
Well in the case of the GUI that was the decision, as an exception.
As I said there, for the consensus code I would require the binaries to be the same. This is much closer to that.
pagelocker
going to be removed in #8753…
Two functions differ:
0LockedPageManagerBase<MemoryPageLocker>::LockedPageManagerBase(unsigned long)
1TorController::TorController(event_base*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
From a quick look at the assembly differences it looks like the same problem as before.
page_size
in the body to _page_size
). The second one target
-> _target
.
Both are stupid to be done IMO 8)
I’ve put up my script here: https://github.com/laanwj/bitcoin-maintainer-tools
BTW: I don’t get identical bitcoind
binaries for 2f71490 and 4731cab but don’t see any function-level differences, will investigate further.
OK, found the reason:
0-2f71490.o/src/support/libbitcoin_util_a-pagelocker.o: file format elf64-x86-64
1+4731cab.o/src/support/libbitcoin_util_a-pagelocker.o: file format elf64-x86-64
2
3 Contents of section .group:
4 0000 01000000 57000000 ....W...
5@@ -314,9 +314,9 @@
6 0000 626f6f73 743a3a20 6d757465 7820636f boost:: mutex co
7 0010 6e737472 7563746f 72206661 696c6564 nstructor failed
8 0020 20696e20 70746872 6561645f 6d757465 in pthread_mute
9- 0030 785f696e 69740000 21287061 67655f73 x_init..!(page_s
10- 0040 697a6520 26202870 6167655f 73697a65 ize & (page_size
11- 0050 202d2031 292900 - 1)).
12+ 0030 785f696e 69740000 21285f70 6167655f x_init..!(_page_
13+ 0040 73697a65 20262028 5f706167 655f7369 size & (_page_si
14+ 0050 7a65202d 20312929 00 ze - 1)).
This is a string emitted by an assertion. You’re never going to get this right. (building without assertions would get identical binaries though, that’s probably what @MarcoFalke did) I can also confirm binaries are identical w/out assertions.
ACK https://github.com/bitcoin/bitcoin/pull/8655/commits/4731cab8fbff51a8178c85d572e2482040278616
objdump -d
and diff the output.
Then calling objdump -d and diff the output.
Ok, that explains it, because that doesn’t detect changes in data sections. I always diff the assembly as well as comparing sha256sums of the stripped executables just in case.