From 2de0b6bb84cbe9a784cc3f08df94b5f2e018a29e Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Sat, 20 Jun 2026 00:01:03 +0300 Subject: Intermediate changes commit_hash:0e608e74da3df89e48c3278b986ef72b314572dd --- .../python/multidict/multidict/_multilib/hashtable.h | 4 ++-- .../python/multidict/patches/02-disable-ndebug.sh | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 contrib/python/multidict/patches/02-disable-ndebug.sh (limited to 'contrib/python') diff --git a/contrib/python/multidict/multidict/_multilib/hashtable.h b/contrib/python/multidict/multidict/_multilib/hashtable.h index ece41c43fa8..1a7e46e3557 100644 --- a/contrib/python/multidict/multidict/_multilib/hashtable.h +++ b/contrib/python/multidict/multidict/_multilib/hashtable.h @@ -86,7 +86,7 @@ GROWTH_RATE(MultiDictObject *md) return md->used * 3; } -#ifndef NDEBUG +#if 0 static inline int _md_check_consistency(MultiDictObject *md, bool update); static inline int @@ -1901,7 +1901,7 @@ md_clear(MultiDictObject *md) return 0; } -#ifndef NDEBUG +#if 0 static inline int _md_check_consistency(MultiDictObject *md, bool update) diff --git a/contrib/python/multidict/patches/02-disable-ndebug.sh b/contrib/python/multidict/patches/02-disable-ndebug.sh new file mode 100755 index 00000000000..6b0c0d203d9 --- /dev/null +++ b/contrib/python/multidict/patches/02-disable-ndebug.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Disable the _md_check_consistency debug helpers in hashtable.h. +# +# Upstream gates these blocks behind `#ifndef NDEBUG`. Under the Arcadia build +# NDEBUG is not always defined, so the asserts compile in and break the build. +# Replacing the guard with `#if 0` keeps the blocks permanently disabled. +# +# Both `#ifndef NDEBUG` occurrences in this header guard the same helper, so an +# unconditional replacement is safe. +# See NOCDEV-18704, DEVTOOLSSUPPORT-88661, NOCDEVDUTY-5981 +set -e + +# macOS ships BSD sed (incompatible `-i` syntax); use GNU sed (gsed) there. +if [ "$(uname)" = "Darwin" ]; then + SED=gsed +else + SED=sed +fi + +"$SED" -i 's/^#ifndef NDEBUG$/#if 0/' multidict/_multilib/hashtable.h -- cgit v1.3