Merge bitcoin/bitcoin#32448: contrib: remove bdb exception from FORTIFY check

f9dfe8d5e0 contrib: remove bdb exception from FORTIFY check (fanquake)

Pull request description:

  BDB has been removed (#28710), so we no-longer need to ignore functions from BDB in this check.

  Guix building this branch, and looking for `*_chk` functions across all binaries produces:
  ```
  # nm -C * | grep -i _chk | sort | uniq
                   U __fdelt_chk@GLIBC_2.15
                   U __fprintf_chk@GLIBC_2.3.4
                   U __fread_chk@GLIBC_2.7
                   U __longjmp_chk@GLIBC_2.11
                   U __memcpy_chk@GLIBC_2.3.4
                   U __printf_chk@GLIBC_2.3.4
                   U __snprintf_chk@GLIBC_2.3.4
                   U __sprintf_chk@GLIBC_2.3.4
                   U __stack_chk_fail@GLIBC_2.4
                   U __vsnprintf_chk@GLIBC_2.3.4
  ```

ACKs for top commit:
  achow101:
    ACK f9dfe8d5e0
  theuni:
    utACK f9dfe8d5e0
  laanwj:
    Code review ACK f9dfe8d5e0

Tree-SHA512: e9491c8b348a0d777c3f7186cab48b478548654712f8b85e7bde2f8b94f3a8b52bc7be8fb1b4a486954359d3109cfb74e3485ccfff67c6546f0efcabf2eda0e0
This commit is contained in:
Ava Chow 2025-05-08 11:06:59 -07:00
commit 1656f6dbba
No known key found for this signature in database
GPG Key ID: 17565732E08E5E41

View File

@ -130,9 +130,8 @@ def check_ELF_FORTIFY(binary) -> bool:
if match:
chk_funcs.add(match.group(0))
# ignore stack-protector and bdb
# ignore stack-protector
chk_funcs.discard('__stack_chk')
chk_funcs.discard('__db_chk')
return len(chk_funcs) >= 1