Fix QPainter non-determinism on macOS (0.21 backport) #20479

pull laanwj wants to merge 1 commits into bitcoin:0.21 from laanwj:2020_11_qpainter_0_21 changing 2 files +65 −0
  1. laanwj commented at 3:34 pm on November 24, 2020: member

    Aplies a patch to Qt that fixes the non-determinism by modifying Qt. The source of the non-determinism is how LLVM 8 optimizes qt_intersect_spans when compiling. The particular optimization that seems to be causing the problems is that a temp variable is being added for spans->y. For some reason, when it does this, it chooses different instructions to use when making that variable. We bypass this problem by patching qt_intersect_spans to always make and use this local variable.

    Github-Pull: #20447 Rebased-From: 8f7d1b39efbe65ab2747c593cc3560d4a449a333 Tree-SHA512: 558da5c2bb0373e2a89f2c219170f802036e0e87cc8e808336b23d074152cb893007a440f46ec957156b0921355cd18502710f2d224f27bc26e934c50ebebc41

  2. Fix QPainter non-determinism on macOS
    Aplies a patch to Qt that fixes the non-determinism by modifying Qt. The
    source of the non-determinism is how LLVM 8 optimizes qt_intersect_spans
    when compiling. The particular optimization that seems to be causing the
    problems is that a temp variable is being added for spans->y. For some
    reason, when it does this, it chooses different instructions to use when
    making that variable. We bypass this problem by patching
    qt_intersect_spans to always make and use this local variable.
    
    Github-Pull: #20447
    Rebased-From: 8f7d1b39efbe65ab2747c593cc3560d4a449a333
    Tree-SHA512: 558da5c2bb0373e2a89f2c219170f802036e0e87cc8e808336b23d074152cb893007a440f46ec957156b0921355cd18502710f2d224f27bc26e934c50ebebc41
    ab23a83400
  3. laanwj added the label GUI on Nov 24, 2020
  4. laanwj added the label Backport on Nov 24, 2020
  5. laanwj added this to the milestone 0.21.0 on Nov 24, 2020
  6. laanwj renamed this:
    Fix QPainter non-determinism on macOS (0.21)
    Fix QPainter non-determinism on macOS (0.21 backport)
    on Nov 24, 2020
  7. jonasschnelli commented at 4:46 pm on November 24, 2020: contributor
    Thanks. codereview ACK ab23a83400d5ad13137ce0f9697a51f0b70e9d29
  8. achow101 commented at 6:31 pm on November 24, 2020: member
    ACK ab23a83400d5ad13137ce0f9697a51f0b70e9d29
  9. laanwj commented at 8:41 pm on November 24, 2020: member

    fwiw this is my gitian output for commit ab23a83400d5ad13137ce0f9697a51f0b70e9d29:

    09df7d246f4b55910bd97aa5b010f78d5c9ffd7ca44950230df39a22205d7fe2f  bitcoin-ab23a83400d5-osx-unsigned.dmg
    15a51563c3bf09248f5bce66a690a1773e964d649c45b6f6aaf82748fa5caff7d  bitcoin-ab23a83400d5-osx-unsigned.tar.gz
    2d894452b461b9b9e779b6868a0c1d9ea0c33339694470646082234217ddcc05d  bitcoin-ab23a83400d5-osx64.tar.gz
    3d671af2ac2b9ec021c1cbb4614209b504d5bb4e1b1ddc922c7f0adcd99f529b6  src/bitcoin-ab23a83400d5.tar.gz
    
  10. achow101 commented at 9:25 pm on November 24, 2020: member

    I have different gitian results:

    04470b43908a988448b2f2ea3f52fe70e21eecb22e5b1ec41e4537e7a4973a5fa  bitcoin-ab23a83400d5-osx-unsigned.dmg
    1ed3981d167801ec0202bd6a6ebbc4cd3cebed4ce5a7967a10668bf0fc1157f75  bitcoin-ab23a83400d5-osx-unsigned.tar.gz
    2e6d77e825cb102c9d3092c9d04493182acb2e9fd3223fde1a2ee327f3aadea1c  bitcoin-ab23a83400d5-osx64.tar.gz
    3d671af2ac2b9ec021c1cbb4614209b504d5bb4e1b1ddc922c7f0adcd99f529b6  src/bitcoin-ab23a83400d5.tar.gz
    

    @laanwj Did you clean the cache before building?

  11. laanwj commented at 9:50 pm on November 24, 2020: member
    No, I did not clean the cache before building. Will try…
  12. laanwj commented at 10:40 pm on November 24, 2020: member

    Unfortunately I still get the same output after cleaning my cache (deleting cache/bitcoin-core-osx-0.21)

    09df7d246f4b55910bd97aa5b010f78d5c9ffd7ca44950230df39a22205d7fe2f  bitcoin-ab23a83400d5-osx-unsigned.dmg
    15a51563c3bf09248f5bce66a690a1773e964d649c45b6f6aaf82748fa5caff7d  bitcoin-ab23a83400d5-osx-unsigned.tar.gz
    2d894452b461b9b9e779b6868a0c1d9ea0c33339694470646082234217ddcc05d  bitcoin-ab23a83400d5-osx64.tar.gz
    3d671af2ac2b9ec021c1cbb4614209b504d5bb4e1b1ddc922c7f0adcd99f529b6  src/bitcoin-ab23a83400d5.tar.gz
    
  13. fanquake commented at 11:08 pm on November 24, 2020: member

    I’m seeing the same result as @laanwj:

    0Generating report
    19df7d246f4b55910bd97aa5b010f78d5c9ffd7ca44950230df39a22205d7fe2f  bitcoin-ab23a83400d5-osx-unsigned.dmg
    25a51563c3bf09248f5bce66a690a1773e964d649c45b6f6aaf82748fa5caff7d  bitcoin-ab23a83400d5-osx-unsigned.tar.gz
    3d894452b461b9b9e779b6868a0c1d9ea0c33339694470646082234217ddcc05d  bitcoin-ab23a83400d5-osx64.tar.gz
    4d671af2ac2b9ec021c1cbb4614209b504d5bb4e1b1ddc922c7f0adcd99f529b6  src/bitcoin-ab23a83400d5.tar.gz
    54dc65a795df2c40c086ddcc76990d9c623325480a0b30e59b12157289a881180  bitcoin-core-osx-0.21-res.yml
    
  14. dongcarl commented at 11:58 pm on November 24, 2020: member

    Same here:

    09df7d246f4b55910bd97aa5b010f78d5c9ffd7ca44950230df39a22205d7fe2f  bitcoin-ab23a83400d5-osx-unsigned.dmg
    15a51563c3bf09248f5bce66a690a1773e964d649c45b6f6aaf82748fa5caff7d  bitcoin-ab23a83400d5-osx-unsigned.tar.gz
    2d894452b461b9b9e779b6868a0c1d9ea0c33339694470646082234217ddcc05d  bitcoin-ab23a83400d5-osx64.tar.gz
    3d671af2ac2b9ec021c1cbb4614209b504d5bb4e1b1ddc922c7f0adcd99f529b6  src/bitcoin-ab23a83400d5.tar.gz
    
  15. achow101 commented at 1:48 am on November 25, 2020: member

    Cleaned up everything and now I get the matching result:

    09df7d246f4b55910bd97aa5b010f78d5c9ffd7ca44950230df39a22205d7fe2f  bitcoin-ab23a83400d5-osx-unsigned.dmg
    15a51563c3bf09248f5bce66a690a1773e964d649c45b6f6aaf82748fa5caff7d  bitcoin-ab23a83400d5-osx-unsigned.tar.gz
    2d894452b461b9b9e779b6868a0c1d9ea0c33339694470646082234217ddcc05d  bitcoin-ab23a83400d5-osx64.tar.gz
    3d671af2ac2b9ec021c1cbb4614209b504d5bb4e1b1ddc922c7f0adcd99f529b6  src/bitcoin-ab23a83400d5.tar.gz
    447b50f5aed729f71cafadf49e4f000a1a78ac6f8b01e88d67e17d80b486cde3b  bitcoin-core-osx-0.21-res.yml
    
  16. fanquake merged this on Nov 25, 2020
  17. fanquake closed this on Nov 25, 2020

  18. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me