contrib: Check symbols in the bitcoinconsensus shared library #25020

pull hebasto wants to merge 4 commits into bitcoin:master from hebasto:220428-shared changing 3 files +54 −29
  1. hebasto commented at 6:36 pm on April 28, 2022: member

    In the light of a new shared library it looks reasonable to start checking shared library symbols.

    During testing this PR, it was pointed that libbitcoinconsensus.so has “a ton of unnecessary symbols being exported”. Fortunately, it could be fixed in #24994.

    Therefore, it makes sense to draft this PR until #24994 is merged.

    Guix builds on x86_64:

  2. contrib, refactor: Replace `split`->`library` in `check_MACHO_libraries` 319db4c78b
  3. contrib: Use `filename` in `symbol-check.py` output consistently 4df14510b0
  4. contrib: Always explicitly cast `lief.Binary` object 2012abe043
  5. contrib: Check symbols in the `bitcoinconsensus` shared library 39947be795
  6. laanwj added the label Build system on Apr 28, 2022
  7. laanwj added the label Scripts and tools on Apr 28, 2022
  8. laanwj commented at 12:34 pm on May 3, 2022: member

    In the light of a new shared library it looks reasonable to start checking shared library symbols.

    Yes, very good idea, Concept ACK.

  9. in contrib/devtools/symbol-check.py:199 in 39947be795
    196     return ok
    197 
    198 def check_exported_symbols(binary) -> bool:
    199     ok: bool = True
    200+    if binary.abstract.header.object_type == lief.OBJECT_TYPES.LIBRARY:
    201+        return ok
    


    laanwj commented at 12:36 pm on May 3, 2022:
    I think one of the most important things to check for shared libraries is that they export the right symbols (to make sure their entire API is available), and only the right symbols (extra and re-exported symbols can cause conflicts).

    fanquake commented at 1:18 pm on May 3, 2022:
    Yea, that is what I assumed this would be doing when I first looked. Otherwise I think the checks currently being added are ~0.

    hebasto commented at 11:47 am on June 5, 2022:
    Exactly. It was the initial idea of this PR. When I faced with a crowd of exported symbols, I decided to make this PR focused on introducing a tool, and leave fighting with linker issues for follow ups.

    fanquake commented at 12:15 pm on December 5, 2022:
    I think the PR should be renamed then? If it’s not actually doing the thing in the PR title.
  10. in contrib/devtools/symbol-check.py:179 in 2012abe043 outdated
    175@@ -176,76 +176,76 @@ def check_version(max_versions, version, arch) -> bool:
    176 def check_imported_symbols(binary) -> bool:
    177     ok: bool = True
    178 
    179-    for symbol in binary.imported_symbols:
    180+    for symbol in binary.concrete.imported_symbols:
    


    fanquake commented at 1:21 pm on May 3, 2022:

    2012abe043ca00525ef39b31c844f52ecf1963d9: contrib: Always explicitly cast lief.Binary object

    Why?


    laanwj commented at 1:30 pm on May 31, 2022:
    I also wonder, it’s a bit ugly to have .concrete everywhere.
  11. in contrib/devtools/symbol-check.py:223 in 39947be795
    228-        split = dylib.name.split('/')
    229-        if split[-1] not in MACHO_ALLOWED_LIBRARIES:
    230-            print(f'{split[-1]} is not in ALLOWED_LIBRARIES!')
    231+    for dylib in binary.concrete.libraries:
    232+        library = dylib.name.split('/')[-1]
    233+        if binary.abstract.header.object_type == lief.OBJECT_TYPES.LIBRARY and library == 'libbitcoinconsensus.0.dylib':
    


    laanwj commented at 1:27 pm on May 31, 2022:
    Let’s not hardcode this name here. If we need to skip this, please define another constant for the list of libraries to skip.

    fanquake commented at 12:14 pm on December 5, 2022:
    In general, I don’t really like how these changes are mixing up the binary and library checks.
  12. laanwj commented at 1:40 pm on May 31, 2022: member

    Speaking of checking exported symbols, I checked libbitcoinconsensus.so from 23.0 and there’s a ton of unnecessary symbols being exported:

     0$ objdump -T bitcoin-23.0/lib/libbitcoinconsensus.so|grep -v UND
     1bitcoin-23.0/lib/libbitcoinconsensus.so:     file format elf64-x86-64
     2
     3DYNAMIC SYMBOL TABLE:
     400000000000203f0  w   DF .text  00000000000000d3  Base        _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_
     5000000000002b850  w   DF .text  0000000000000373  Base        _ZNSt20__uninitialized_copyILb0EE13__uninit_copyIPK5CTxInPS2_EET0_T_S7_S6_
     60000000000026100  w   DF .text  0000000000000062  Base        _ZNSt12_Vector_baseIhSaIhEED1Ev
     700000000000293d0 g    DF .text  0000000000000037  Base        bitcoinconsensus_version
     80000000000042aa0  w   DF .text  00000000000000e2  Base        _ZNSt6vectorIhSaIhEE7reserveEm
     90000000000038010  w   DF .text  0000000000000178  Base        _ZNSt6vectorIhSaIhEE17_M_realloc_insertIJhEEEvN9__gnu_cxx17__normal_iteratorIPhS1_EEDpOT_
    100000000000037aa0  w   DF .text  000000000000012d  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EES7_
    1100000000000059b9  w   DF .text  0000000000000048  Base        _ZSt27__throw_bad_optional_accessv
    1200000000000375f0  w   DF .text  00000000000000b6  Base        _ZNSt6vectorIhSaIhEEC2ERKS1_
    130000000000037e20  w   DF .text  00000000000001e5  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE17_M_default_appendEm
    1400000000000366d0  w   DF .text  0000000000000042  Base        _ZNSt19bad_optional_accessD2Ev
    1500000000001719f0  w   DO .data.rel.ro   0000000000000028  Base        _ZTVSt19bad_optional_access
    1600000000000366d0  w   DF .text  0000000000000042  Base        _ZNSt19bad_optional_accessD1Ev
    170000000000054e80  w   DO .rodata        0000000000000018  Base        _ZTSSt19bad_optional_access
    1800000000000429f0  w   DF .text  00000000000000a7  Base        _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_
    190000000000042fb0  w   DF .text  00000000000000d4  Base        _ZNSt8__detail18__from_chars_digitIjEEbRPKcS2_RT_i
    200000000000036720  w   DF .text  0000000000000054  Base        _ZNSt19bad_optional_accessD0Ev
    210000000000020260  w   DF .text  0000000000000034  Base        _ZNKSt5ctypeIcE8do_widenEc
    220000000000021230  w   DF .text  0000000000000073  Base        _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED2Ev
    230000000000037980  w   DF .text  0000000000000120  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE9push_backERKS1_
    24000000000002b680  w   DF .text  00000000000001cd  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
    250000000000038190  w   DF .text  00000000000001e5  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
    260000000000021230  w   DF .text  0000000000000073  Base        _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED1Ev
    2700000000000212b0  w   DF .text  0000000000000081  Base        _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED0Ev
    2800000000000361e0  w   DF .text  0000000000000039  Base        _ZNKSt19bad_optional_access4whatEv
    2900000000000267f0  w   DF .text  0000000000000373  Base        _ZNSt20__uninitialized_copyILb0EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPK5CTxInSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_
    3000000000001719a8  w   DO .data.rel.ro   0000000000000018  Base        _ZTISt19bad_optional_access
    310000000000036820  w   DF .text  0000000000000062  Base        _ZNSt6vectorIhSaIhEED2Ev
    3200000000000375f0  w   DF .text  00000000000000b6  Base        _ZNSt6vectorIhSaIhEEC1ERKS1_
    3300000000000203f0  w   DF .text  00000000000000d3  Base        _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1IS3_EEPKcRKS3_
    340000000000036820  w   DF .text  0000000000000062  Base        _ZNSt6vectorIhSaIhEED1Ev
    35000000000002ae10 g    DF .text  000000000000006d  Base        bitcoinconsensus_verify_script
    360000000000051994 g    DF .fini  0000000000000000  Base        _fini
    370000000000004000 g    DF .init  0000000000000000  Base        _init
    380000000000037550  w   DF .text  000000000000009e  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EED2Ev
    3900000000000376b0  w   DF .text  00000000000002cd  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
    400000000000037550  w   DF .text  000000000000009e  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EED1Ev
    410000000000037cc0  w   DF .text  0000000000000160  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE13_M_insert_auxIS1_EEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEOT_
    420000000000037bd0  w   DF .text  00000000000000e3  Base        _ZNSt6vectorIS_IhSaIhEESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EE
    43000000000002adc0 g    DF .text  0000000000000049  Base        bitcoinconsensus_verify_script_with_amount
    440000000000042b90  w   DF .text  0000000000000178  Base        _ZNSt6vectorIhSaIhEE17_M_realloc_insertIJRKhEEEvN9__gnu_cxx17__normal_iteratorIPhS1_EEDpOT_
    450000000000042d10  w   DF .text  00000000000000dc  Base        _ZNSt8__detail18__from_chars_digitImEEbRPKcS2_RT_i
    46000000000002af00  w   DF .text  00000000000000ce  Base        _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_
    470000000000026100  w   DF .text  0000000000000062  Base        _ZNSt12_Vector_baseIhSaIhEED2Ev
    

    Most are related to C++ standard library (like vector), it seems? I wonder if there’s a way to avoid this.

  13. hebasto commented at 11:17 am on June 5, 2022: member

    @laanwj

    Speaking of checking exported symbols, I checked libbitcoinconsensus.so from 23.0 and there’s a ton of unnecessary symbols being exported:

    Most are related to C++ standard library (like vector), it seems? I wonder if there’s a way to avoid this.

    It appears, #24994 fixes it:

    0$ objdump -T bitcoin-c28bb15a117e-x86_64-linux-gnu/bitcoin-c28bb15a117e/lib/libbitcoinconsensus.so.0 | grep -v UND
    1
    2bitcoin-c28bb15a117e-x86_64-linux-gnu/bitcoin-c28bb15a117e/lib/libbitcoinconsensus.so.0:     file format elf64-x86-64
    3
    4DYNAMIC SYMBOL TABLE:
    50000000000003000 g    DF .init	0000000000000000  Base        _init
    60000000000045494 g    DF .fini	0000000000000000  Base        _fini
    70000000000004de0 g    DF .text	0000000000000037  Base        bitcoinconsensus_version
    80000000000005230 g    DF .text	0000000000000049  Base        bitcoinconsensus_verify_script_with_amount
    90000000000005280 g    DF .text	000000000000006d  Base        bitcoinconsensus_verify_script
    
  14. laanwj commented at 7:28 am on June 27, 2022: member

    It appears, #24994 fixes it:

    That’s beautiful!

  15. DrahtBot commented at 2:01 am on July 9, 2022: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK laanwj

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25573 ([POC] guix: produce a fully -static-pie x86_64 bitcoind using GCC and glibc by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  16. jarolrod commented at 4:28 am on July 29, 2022: member

    GUIX hashes

    x86:

     0$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     1
     2685eafd7b1826282626d56c3163675f439075175f4f2260ec9888d3409455d49  guix-build-39947be79510/output/aarch64-linux-gnu/SHA256SUMS.part
     3767b608e51868ba8dcf3ea3ad6eedbed33dbb90e2cd9eb0e1474bf83189e3134  guix-build-39947be79510/output/aarch64-linux-gnu/bitcoin-39947be79510-aarch64-linux-gnu-debug.tar.gz
     466705528b8caf1a084b5f0b2243899334c882144ead3c9c8da4395283a6cb08b  guix-build-39947be79510/output/aarch64-linux-gnu/bitcoin-39947be79510-aarch64-linux-gnu.tar.gz
     53d2e68cd61c69a78285f6f9af4391767b0051130e17d36522e2773a78590f875  guix-build-39947be79510/output/arm-linux-gnueabihf/SHA256SUMS.part
     6b3e8e66bb49599630b6f0ed8afdf36b659752e5db9d7d624969ea9b7baf12350  guix-build-39947be79510/output/arm-linux-gnueabihf/bitcoin-39947be79510-arm-linux-gnueabihf-debug.tar.gz
     78ba02617f70e311bcce65a042f9bf6f61438180fba1778bb16e207e9800d5e53  guix-build-39947be79510/output/arm-linux-gnueabihf/bitcoin-39947be79510-arm-linux-gnueabihf.tar.gz
     81cf0a2d9d5ea4bd3cce72ef3b85346ab7a88408f3abb4d950f889a5a0fa4493d  guix-build-39947be79510/output/arm64-apple-darwin/SHA256SUMS.part
     910701eb3db3c5e149671de41c869660a477657ddcf36eeff2fb5ed26d8d80e1f  guix-build-39947be79510/output/arm64-apple-darwin/bitcoin-39947be79510-arm64-apple-darwin-unsigned.dmg
    10da367910b71a8276ae3d037754d98eaf2160b0ddd1b239a9e158a2b10f994dd6  guix-build-39947be79510/output/arm64-apple-darwin/bitcoin-39947be79510-arm64-apple-darwin-unsigned.tar.gz
    11257d838cecaa16696369cff794cc6cd40ce937a3536c20947116e35244ec9cfb  guix-build-39947be79510/output/arm64-apple-darwin/bitcoin-39947be79510-arm64-apple-darwin.tar.gz
    12eba655f2303debef2332e57b14be2639c1c2e0f9e94b40ea0709e79868cb7ac5  guix-build-39947be79510/output/dist-archive/bitcoin-39947be79510.tar.gz
    1322e90ffa6022d6cbf4fa6e61e1ac4072fe7143af798ad8439f270854ac872c54  guix-build-39947be79510/output/powerpc64-linux-gnu/SHA256SUMS.part
    149bdd90ab918ff84be1011162e768195accf93a7cf9f9b01c2e3aff130ed8676c  guix-build-39947be79510/output/powerpc64-linux-gnu/bitcoin-39947be79510-powerpc64-linux-gnu-debug.tar.gz
    1522895d20bc3758dbb8b98e9c4ab42e447ce83af19ff259ea32ed15889907e972  guix-build-39947be79510/output/powerpc64-linux-gnu/bitcoin-39947be79510-powerpc64-linux-gnu.tar.gz
    16278f5e8d22b9aacb08926d888d02d0e8cf16be325d8667fa99272297d78bad70  guix-build-39947be79510/output/powerpc64le-linux-gnu/SHA256SUMS.part
    170691d58065ef1442d04e7213c288ab0209825a0a0ea6f58b390fb33d604805e8  guix-build-39947be79510/output/powerpc64le-linux-gnu/bitcoin-39947be79510-powerpc64le-linux-gnu-debug.tar.gz
    18a25aad55afd40b639f83ed47c4b5c3b4d5f79f561ba2836b49c58145641b3dfd  guix-build-39947be79510/output/powerpc64le-linux-gnu/bitcoin-39947be79510-powerpc64le-linux-gnu.tar.gz
    199d0e17eda2b4c7a61e602a047fb410ced01ba61065e45b8c3a0229ebec4f1970  guix-build-39947be79510/output/riscv64-linux-gnu/SHA256SUMS.part
    201bf94397e26474bb44cf0c330325733accbf90a773f8b3e8d4b26873fca399ad  guix-build-39947be79510/output/riscv64-linux-gnu/bitcoin-39947be79510-riscv64-linux-gnu-debug.tar.gz
    2170cb2fce41838a0147bdaec6647c747082793e53c1866bd2da459a1a6824fbc6  guix-build-39947be79510/output/riscv64-linux-gnu/bitcoin-39947be79510-riscv64-linux-gnu.tar.gz
    224d471e209f6064eb7dc58bc19ee863453d6721847a0356ef5d5ad593b8bbbb73  guix-build-39947be79510/output/x86_64-apple-darwin/SHA256SUMS.part
    2364db9126af7e8e8cb8a6f52d656ebe041fc8f306bff3ca6b5b2d1ad84296a0fc  guix-build-39947be79510/output/x86_64-apple-darwin/bitcoin-39947be79510-x86_64-apple-darwin-unsigned.dmg
    242e5f2a30f949974ceebda65237dc9ebb9414090142aba1ab974581fda271790d  guix-build-39947be79510/output/x86_64-apple-darwin/bitcoin-39947be79510-x86_64-apple-darwin-unsigned.tar.gz
    258a3d18b0d926d7af4e13d29cb49babfbf69d3bb3da3119f9891ca559cece4e59  guix-build-39947be79510/output/x86_64-apple-darwin/bitcoin-39947be79510-x86_64-apple-darwin.tar.gz
    26e05ba2639a4c34e905417ab980faddd828a212569e6c73f7a8f8be58ee9323bb  guix-build-39947be79510/output/x86_64-linux-gnu/SHA256SUMS.part
    271ce9d619f3d7e0d83e8f1aac7372a5945d31ca25bd29763044736a3635a946de  guix-build-39947be79510/output/x86_64-linux-gnu/bitcoin-39947be79510-x86_64-linux-gnu-debug.tar.gz
    28c6f4a0406d31735423a9bafcaeb48f4317c7f323f74830972a5a3fc4f0e6fa29  guix-build-39947be79510/output/x86_64-linux-gnu/bitcoin-39947be79510-x86_64-linux-gnu.tar.gz
    29433b3a7cdb3b4e6b152b065d6b7d9fa97efa6d99a28ca238c5f8e5fdc29d2015  guix-build-39947be79510/output/x86_64-w64-mingw32/SHA256SUMS.part
    30cbcc56d16fea9a4fda26b6ea2c76984ccf4afa83334b147241a2a266ae8a5edc  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64-debug.zip
    31191c2cb75a46f4e77274e699d90f6e26d38383ebf20eff90489f02d94cfd6bad  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64-setup-unsigned.exe
    3289fdd8f58ba6b1b66a9c1ff0e15b5103be446b0c1365918930a37213f71f9da4  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64-unsigned.tar.gz
    33f1ee2b31ba734de374c20f842de941565dad7f91cc9e315d8d070d5da763aebd  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64.zip
    

    arm64:

     0$ env HOSTS='arm-linux-gnueabihf arm64-apple-darwin powerpc64-linux-gnu powerpc64le-linux-gnu riscv64-linux-gnu x86_64-apple-darwin x86_64-linux-gnu x86_64-w64-mingw32' ./contrib/guix/guix-build
     1$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     2
     3014f518074afd8db1c2f0280640159737d097aeeb330269622859f9a8c6839e7  guix-build-39947be79510/output/arm-linux-gnueabihf/SHA256SUMS.part
     43f7d1b51158355f9f0d1861359f99cbbaf2c2129e1333b5e70ebd9d869e0bad9  guix-build-39947be79510/output/arm-linux-gnueabihf/bitcoin-39947be79510-arm-linux-gnueabihf-debug.tar.gz
     577f51ce9a46f19f3f76d93f32aa55bee54838012438edcc9fafcb60ff1646245  guix-build-39947be79510/output/arm-linux-gnueabihf/bitcoin-39947be79510-arm-linux-gnueabihf.tar.gz
     64e04ed55cc8edbdef142ea49fe0fee8f5d7b608200a08cc9277949b9e0bd9729  guix-build-39947be79510/output/arm64-apple-darwin/SHA256SUMS.part
     7b2e9994348e1e530350557717fcc7e27fe3b88fb7de443f89aa37e16c5be055a  guix-build-39947be79510/output/arm64-apple-darwin/bitcoin-39947be79510-arm64-apple-darwin-unsigned.dmg
     83e27e59e62e88fe6864811464ffb8773ec6d46c1e4057f0fb07d97ebdcd19bee  guix-build-39947be79510/output/arm64-apple-darwin/bitcoin-39947be79510-arm64-apple-darwin-unsigned.tar.gz
     95e50fb1743fe3c636747768b4de4661b42513b709bea86bbd7c0f767ef37b60d  guix-build-39947be79510/output/arm64-apple-darwin/bitcoin-39947be79510-arm64-apple-darwin.tar.gz
    10eba655f2303debef2332e57b14be2639c1c2e0f9e94b40ea0709e79868cb7ac5  guix-build-39947be79510/output/dist-archive/bitcoin-39947be79510.tar.gz
    1191bb02e0756bfe35a5ec893a4b6ce1b7ef3fec815b241710ebbf48745fafe3a2  guix-build-39947be79510/output/powerpc64-linux-gnu/SHA256SUMS.part
    12d4689b64c02c408c6cc2e463354186d958019610b4b3de5ae85f20dbcdc1c2ee  guix-build-39947be79510/output/powerpc64-linux-gnu/bitcoin-39947be79510-powerpc64-linux-gnu-debug.tar.gz
    13af9fb50aef2a198e8ae69dde784343e423373f96767f5a291c79f1748fc29343  guix-build-39947be79510/output/powerpc64-linux-gnu/bitcoin-39947be79510-powerpc64-linux-gnu.tar.gz
    14b914013794cc88dc15e595c731245f3915d32d34c088c0b71b721f494b7140c5  guix-build-39947be79510/output/powerpc64le-linux-gnu/SHA256SUMS.part
    15c4218a3de76d470db7134465c6250f9a53137d25199ed280dc40a4b2b366c1d8  guix-build-39947be79510/output/powerpc64le-linux-gnu/bitcoin-39947be79510-powerpc64le-linux-gnu-debug.tar.gz
    1638cdc7cb10049849c5600cb592389f1d9f2b993485c05403dae1c06283de7182  guix-build-39947be79510/output/powerpc64le-linux-gnu/bitcoin-39947be79510-powerpc64le-linux-gnu.tar.gz
    17f803397aa1e0352a7f23fa906002814a7837e547182d471abb14ec5def3551d6  guix-build-39947be79510/output/riscv64-linux-gnu/SHA256SUMS.part
    18a48852558522c224a794d1a09ddf36ba4b2a5adbd86651c734626c3399ee51fd  guix-build-39947be79510/output/riscv64-linux-gnu/bitcoin-39947be79510-riscv64-linux-gnu-debug.tar.gz
    19cf282980458922da5ef570ea7a6072338368a14fd0aa35f6172e1cb75b56f4b0  guix-build-39947be79510/output/riscv64-linux-gnu/bitcoin-39947be79510-riscv64-linux-gnu.tar.gz
    204d471e209f6064eb7dc58bc19ee863453d6721847a0356ef5d5ad593b8bbbb73  guix-build-39947be79510/output/x86_64-apple-darwin/SHA256SUMS.part
    2164db9126af7e8e8cb8a6f52d656ebe041fc8f306bff3ca6b5b2d1ad84296a0fc  guix-build-39947be79510/output/x86_64-apple-darwin/bitcoin-39947be79510-x86_64-apple-darwin-unsigned.dmg
    222e5f2a30f949974ceebda65237dc9ebb9414090142aba1ab974581fda271790d  guix-build-39947be79510/output/x86_64-apple-darwin/bitcoin-39947be79510-x86_64-apple-darwin-unsigned.tar.gz
    238a3d18b0d926d7af4e13d29cb49babfbf69d3bb3da3119f9891ca559cece4e59  guix-build-39947be79510/output/x86_64-apple-darwin/bitcoin-39947be79510-x86_64-apple-darwin.tar.gz
    245c4ef430b11b92f4e09e7acf800eb6efd22af78808956da15451a87a80cd7a5f  guix-build-39947be79510/output/x86_64-linux-gnu/SHA256SUMS.part
    253da30e0ddb006ecc9914fc3fe2f3d01947e2614c00393fa3e3d3a97b4fa7ea67  guix-build-39947be79510/output/x86_64-linux-gnu/bitcoin-39947be79510-x86_64-linux-gnu-debug.tar.gz
    26ed6b6c5a3dee4a72ccf6a26db21be539826bfda29c63a6fd878a3abf3d53a687  guix-build-39947be79510/output/x86_64-linux-gnu/bitcoin-39947be79510-x86_64-linux-gnu.tar.gz
    275a5e316f09135df7282845d3ac1a7298f15642ad647e3ae7c4b287ee185fd0b1  guix-build-39947be79510/output/x86_64-w64-mingw32/SHA256SUMS.part
    28e98d34d9c57daaab228c63f8923c9a81a256e4dd1e25610d5bd9a13111fb481a  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64-debug.zip
    29191c2cb75a46f4e77274e699d90f6e26d38383ebf20eff90489f02d94cfd6bad  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64-setup-unsigned.exe
    3089fdd8f58ba6b1b66a9c1ff0e15b5103be446b0c1365918930a37213f71f9da4  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64-unsigned.tar.gz
    31572f9eb018017ae054620cd81a4751e90795297722013f20540c136333196447  guix-build-39947be79510/output/x86_64-w64-mingw32/bitcoin-39947be79510-win64.zip
    
  17. in src/Makefile.am:1010 in 39947be795
    1007+endif
    1008+
    1009+check-symbols: $(bin_PROGRAMS) $(LIBBITCOINCONSENSUS)
    1010 	@echo "Running symbol and dynamic library checks..."
    1011-	$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS)
    1012+	$(AM_V_at) $(PYTHON) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS) $(builddir)/.libs/$$(echo $(LIBBITCOINCONSENSUS) | sed "s/.la//")$(LIBEXT)
    


    fanquake commented at 12:03 pm on December 5, 2022:
    Is there a nicer way to do this? Would rather not re-introduce sed.
  18. in contrib/devtools/test-symbol-check.py:120 in 39947be795
    116@@ -117,7 +117,7 @@ def test_MACHO(self):
    117         ''')
    118 
    119         self.assertEqual(call_symbol_check(cc, source, executable, ['-lexpat', '-Wl,-platform_version','-Wl,macos', '-Wl,11.4', '-Wl,11.4']),
    120-            (1, 'libexpat.1.dylib is not in ALLOWED_LIBRARIES!\n' +
    121+            (1, f'{executable}: libexpat.1.dylib is not in ALLOWED_LIBRARIES!\n' +
    


    fanquake commented at 12:03 pm on December 5, 2022:
    I don’t think adding the executable name to every line is an improvement. It’s already printed in the failure.
  19. fanquake commented at 12:16 pm on December 5, 2022: member

    Is this change (going to be) dependant on #24994, or not? If so, maybe mark as a draft for now, and add that to the PR description?

    Looks like there’s still review comments outstanding, i.e here: https://github.com/bitcoin/bitcoin/pull/25020/files#r885641952 and here: https://github.com/bitcoin/bitcoin/pull/25020/files#r885637804.

  20. hebasto marked this as a draft on Dec 14, 2022
  21. hebasto commented at 1:49 pm on December 14, 2022: member

    Is this change (going to be) dependant on #24994, or not? If so, maybe mark as a draft for now, and add that to the PR description?

    Drafted.

  22. in contrib/devtools/symbol-check.py:149 in 39947be795
    141@@ -141,14 +142,17 @@
    142 }
    143 
    144 PE_ALLOWED_LIBRARIES = {
    145+# libbitcoinconsensus-0.dll, bitcoind.exe and bitcoin-qt.exe
    146 'ADVAPI32.dll', # security & registry
    147-'IPHLPAPI.DLL', # IP helper API
    148 'KERNEL32.dll', # win32 base APIs
    149 'msvcrt.dll', # C standard library for MSVC
    150+'libssp-0.dll', # mingw-w64 stack smashing protection
    


    fanquake commented at 3:52 pm on February 14, 2023:
    NACK. This is accomodating a bug (in the DLL), and doing so in such a way, that it could leak into the actual binaries.

    hebasto commented at 3:55 pm on February 14, 2023:

    This is accomodating a bug…

    Which one?


    fanquake commented at 3:56 pm on February 14, 2023:
    Non-static libssp.
  23. hebasto commented at 2:35 pm on February 23, 2023: member

    Is this change (going to be) dependant on #24994, or not? If so, maybe mark as a draft for now, and add that to the PR description?

    Drafted.

    Closing.

  24. hebasto closed this on Feb 23, 2023

  25. bitcoin locked this on Feb 23, 2024

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-12-26 12:12 UTC

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