Add test for GCC bug 90348 #15985

pull sipa wants to merge 1 commits into bitcoin:master from sipa:201905_gccbug90348 changing 2 files +44 −0
  1. sipa commented at 8:44 PM on May 8, 2019: member

    This adds a test for GCC bug 90348 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348), using a test case extracted from our own sha256d64 test in crypto_tests.cpp, which was failing on some platforms.

    This is based on top of #15983 to make sure the bug doesn't trigger (it does in some Travis configurations without it).

  2. sipa force-pushed on May 8, 2019
  3. MarcoFalke commented at 9:16 PM on May 8, 2019: member

    Looks like this only fails for the no-wallet build and win64 (not sure what that wine32 warning means):

    Running tests: compilerbug_tests from test/compilerbug_tests.cpp
    it looks like wine32 is missing, you should install it.
    multiarch needs to be enabled first.  as root, please
    execute "dpkg --add-architecture i386 && apt-get update &&
    apt-get install wine32"
    Running 1 test case...
    Test cases order is shuffled using seed: 1529978656
    Entering test module "Bitcoin Core Test Suite"
    test/compilerbug_tests.cpp(8): Entering test suite "compilerbug_tests"
    test/compilerbug_tests.cpp(30): Entering test case "gccbug_90348"
    test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
    test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
    test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
    test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
    test/compilerbug_tests.cpp(30): Leaving test case "gccbug_90348"; testing time: 53ms
    test/compilerbug_tests.cpp(8): Leaving test suite "compilerbug_tests"; testing time: 53ms
    Leaving test module "Bitcoin Core Test Suite"; testing time: 53ms
    
  4. sipa commented at 9:19 PM on May 8, 2019: member

    I guess that's expected; sanitizers break the bug (I think they automatically enable stack-reuse=none).

  5. DrahtBot added the label Build system on May 8, 2019
  6. DrahtBot added the label Tests on May 8, 2019
  7. sipa force-pushed on May 8, 2019
  8. MarcoFalke commented at 6:25 PM on May 9, 2019: member

    What about win32, linux32, bionic qt5 and the trusty build without sanitizers?

    The trusty one could have a gcc that is old enough to not have this bug, but the others should fail, hmm

    https://travis-ci.org/bitcoin/bitcoin/builds/529978656

  9. DrahtBot commented at 10:57 PM on May 15, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  10. DrahtBot added the label Needs rebase on May 16, 2019
  11. MarcoFalke added the label Needs backport on May 16, 2019
  12. MarcoFalke added this to the milestone 0.18.1 on May 16, 2019
  13. laanwj commented at 3:21 PM on May 20, 2019: member

    Needs update after #15983 which adds -fstack-reuse=none unconditionally for gcc.

  14. MarcoFalke commented at 10:59 AM on May 24, 2019: member

    @sipa :eyes: ^

  15. fanquake commented at 5:40 PM on May 25, 2019: member

    utACK 9d269e1 (needs rebase)

    I did some investigating using Compiler Explorer and the c test case from the GCC bug report to better understand what's happening here.

    Using the flags produced by ./configure (master) on a Debian box (GCC 8.3.0):

    -fstack-reuse=none -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wredundant-decls  -Wno-unused-parameter -Wno-implicit-fallthrough   -g -O2
    

    I setup a test to compare the assembly produced with and without -fstack-reuse=none.

    You can see my setup on Compiler Explorer here. The difference produced with and without -fstack-reuse on line 83:

    <   lea rdi, [rsp+3]
    ---
    >   lea rdi, [rsp+4]
    

    As mentioned in the original bug report, the issue is seen on GCC 7, 8 and 9.

  16. Add test for GCC bug 90348 58e291cfad
  17. MarcoFalke force-pushed on Jun 2, 2019
  18. MarcoFalke commented at 8:23 AM on June 2, 2019: member

    There hasn't been any activity in the last two weeks, so I went ahead to rebase and force push to the branch in your repo. Hope you don't mind.

  19. MarcoFalke commented at 8:32 AM on June 2, 2019: member

    Unless there are objections, this will be merged tomorrow.

  20. DrahtBot removed the label Needs rebase on Jun 2, 2019
  21. laanwj added this to the "Blockers" column in a project

  22. laanwj removed this from the "Blockers" column in a project

  23. pull[bot] referenced this in commit d936cf9eaf on Jun 5, 2019
  24. laanwj merged this on Jun 5, 2019
  25. laanwj closed this on Jun 5, 2019

  26. MarcoFalke referenced this in commit d46205098b on Jun 7, 2019
  27. fanquake removed the label Needs backport on Jun 7, 2019
  28. fanquake commented at 8:01 AM on June 7, 2019: member

    Included for backport in #16035.

  29. fanquake referenced this in commit b5a4abeca2 on Jun 7, 2019
  30. MarcoFalke referenced this in commit d1f261150b on Jun 7, 2019
  31. laanwj referenced this in commit c165df198d on Jun 13, 2019
  32. HashUnlimited referenced this in commit cceaaeb59c on Aug 23, 2019
  33. Bushstar referenced this in commit a1f0082753 on Aug 24, 2019
  34. deadalnix referenced this in commit 632478aea3 on Oct 9, 2020
  35. PastaPastaPasta referenced this in commit 244561e067 on Jun 27, 2021
  36. PastaPastaPasta referenced this in commit 56aa431ff2 on Jun 28, 2021
  37. PastaPastaPasta referenced this in commit e8d1bcf812 on Jun 29, 2021
  38. PastaPastaPasta referenced this in commit 6964c52112 on Sep 11, 2021
  39. Munkybooty referenced this in commit 1e4e0a8c0f on Oct 17, 2021
  40. Munkybooty referenced this in commit 113028f8ec on Oct 20, 2021
  41. Munkybooty referenced this in commit d65a0d249a on Oct 25, 2021
  42. Munkybooty referenced this in commit 86fb7c9be3 on Oct 26, 2021
  43. Munkybooty referenced this in commit cb9acd937f on Oct 26, 2021
  44. Munkybooty referenced this in commit 4d281cf745 on Oct 28, 2021
  45. Munkybooty referenced this in commit 8179bd5316 on Nov 9, 2021
  46. pravblockc referenced this in commit e7dff9f13f on Nov 18, 2021
  47. DrahtBot locked this on Dec 16, 2021

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: 2026-04-17 09:14 UTC

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