contrib: embed C++11 patch in install_db4.sh #20906

pull gruve-p wants to merge 1 commits into bitcoin:master from gruve-p:master changing 1 files +149 −4
  1. gruve-p commented at 5:55 PM on January 11, 2021: contributor

    This is a continuation of #20665.

    Closes #20722.

  2. contrib: embed C++11 patch in install_db4.sh 92370033a2
  3. laanwj added the label Build system on Jan 11, 2021
  4. in contrib/install_db4.sh:130 in 92370033a2
     129 | + 		alloc_bhp->flags = 0;
     130 | +-		atomic_init(&alloc_bhp->ref, 1);
     131 | ++		atomic_init_db(&alloc_bhp->ref, 1);
     132 | + #ifdef DIAGNOSTIC
     133 | + 		if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
     134 | + 			__db_errx(env,
    


    jonasschnelli commented at 10:02 AM on January 12, 2021:

    Where is the DB_STR("3025", gone?

  5. in contrib/install_db4.sh:132 in 92370033a2
     131 | ++		atomic_init_db(&alloc_bhp->ref, 1);
     132 | + #ifdef DIAGNOSTIC
     133 | + 		if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
     134 | + 			__db_errx(env,
     135 | +@@ -911,7 +911,7 @@ alloc:		/* Allocate a new buffer header and data space. */
     136 | + 			MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize,
    


    jonasschnelli commented at 10:03 AM on January 12, 2021:

    This was MVCC_MPROTECT(bhp->buf, mfp->pagesize, before.

  6. in contrib/install_db4.sh:176 in 92370033a2
     175 | ++			atomic_init_db(&htab[i].hash_page_dirty, 0);
     176 | + 		}
     177 | +
     178 | + 		/*
     179 | +@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
     180 | + 		hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
    


    jonasschnelli commented at 10:05 AM on January 12, 2021:
    -@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
    - 		hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
    - 		    mtx_base + i;
    +@@ -302,7 +302,7 @@ no_prealloc:
    + 		} else
    + 			hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount);
    
  7. jonasschnelli changes_requested
  8. gruve-p commented at 10:09 AM on January 12, 2021: contributor
  9. laanwj commented at 1:07 PM on January 12, 2021: member

    Concept ACK (and code review ACK if the patch matches)

  10. fanquake approved
  11. fanquake commented at 7:38 AM on January 13, 2021: member

    ACK 92370033a2606ee88f4d080193e0bf6da481dc2e.

    I checked that the patch is the same as what we carry in depends, and that the *.as produced by the script are identical between master and this PR on macOS and Linux. i.e on macOS:

    # master 7b975639ef93b50537a3ec6326b54d7218afc8da
    CFLAGS="-Wno-error=implicit-function-declaration" ZERO_AR_DATE=1 ./contrib/install_db4.sh $(pwd)
    mv db4 db4_master
    # checkout [#20906](/bitcoin-bitcoin/20906/)
    CFLAGS="-Wno-error=implicit-function-declaration" ZERO_AR_DATE=1 ./contrib/install_db4.sh $(pwd)
    diffoscope db4/lib db4_master/lib/ --exclude-directory-metadata=yes
    
  12. fanquake requested review from jamesob on Jan 13, 2021
  13. DrahtBot commented at 11:45 AM on January 13, 2021: member

    <!--4a62be1de6b64f3ed646cdc7932c8cf5-->

    🕵️ @practicalswift has been requested to review this pull request as specified in the REVIEWERS file.

  14. practicalswift commented at 12:09 PM on January 14, 2021: contributor

    Concept ACK: in-repo is more robust and easier to review than out-of-repo :)

  15. jamesob commented at 9:26 PM on January 15, 2021: member

    I am concept ACK on this, but why did you choose to change the patch format? This makes the change more difficult to review.

  16. gruve-p commented at 9:31 PM on January 15, 2021: contributor

    @jamesob The patch format is exactly the same as we use for depends: https://github.com/bitcoin/bitcoin/blob/master/depends/patches/bdb/clang_cxx_11.patch

  17. laanwj commented at 4:29 PM on January 19, 2021: member

    It would have been easier for reviewers if you made it clear in the PR description that this is now using the depends/patches/bdb/clang_cxx_11.patch and not the one from the gist.

    Anyhow—I checked that it (apart from whitespace) matches.

    ACK 92370033a2606ee88f4d080193e0bf6da481dc2e

  18. laanwj merged this on Jan 19, 2021
  19. laanwj closed this on Jan 19, 2021

  20. sidhujag referenced this in commit 599774e599 on Jan 20, 2021
  21. DrahtBot locked this on Aug 18, 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: 2026-04-23 00:14 UTC

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