Skip to content

Commit 799f4ee

Browse files
Merge bitcoin-core/secp256k1#1356: ci: Adjust Docker image to Debian 12 "bookworm"
c862a9f ci: Adjust Docker image to Debian 12 "bookworm" (Hennadii Stepanov) a178209 ci: Force DWARF v4 for Clang when Valgrind tests are expected (Hennadii Stepanov) 8a72734 Help the compiler prove that a loop is entered (Tim Ruffing) Pull request description: Since the [release](https://www.debian.org/News/2023/20230610.html) of Debian 12 "bookworm", it has become the "stable" one that our `ci/linux-debian.Dockerfile` relies on. Last time the Docker image was built basing on Debian Bullseye. Changes in packages are significant, for instance: - `gcc` 10.2. --> 12.2 - `clang` 11.0 --> 14.0 - `wine` 5.0 --> 8.0 which requires certain adjustments provided in this PR. The first commit has been cherry-picked from bitcoin-core/secp256k1#1313. ACKs for top commit: sipa: utACK c862a9f real-or-random: ACK c862a9f Tree-SHA512: 2a62a8865f904a460274f1f3ec02d2b0b72c84b25722a383c6455cfe672c1d93382941a5027e8dceb2c0f5fe0f0efd49a0ed6b72303982f9e32991f1535538eb
2 parents fd491ea + c862a9f commit 799f4ee

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

ci/cirrus.sh

+16
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ if [ -n "$WRAPPER_CMD" ]; then
5353
$WRAPPER_CMD --version
5454
fi
5555

56+
# Workaround for https://bugs.kde.org/show_bug.cgi?id=452758 (fixed in valgrind 3.20.0).
57+
case "${CC:-undefined}" in
58+
clang*)
59+
if [ "$CTIMETESTS" = "yes" ] && [ "$WITH_VALGRIND" = "yes" ]
60+
then
61+
export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
62+
else
63+
case "$WRAPPER_CMD" in
64+
valgrind*)
65+
export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
66+
;;
67+
esac
68+
fi
69+
;;
70+
esac
71+
5672
./autogen.sh
5773

5874
./configure \

ci/linux-debian.Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ RUN dpkg --add-architecture i386 && \
1111
RUN apt-get update && apt-get install --no-install-recommends -y \
1212
git ca-certificates \
1313
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
14-
gcc clang llvm libc6-dbg \
14+
gcc clang llvm libclang-rt-dev libc6-dbg \
1515
g++ \
16-
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan6:i386 \
16+
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan8:i386 \
1717
gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \
1818
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libc6-dbg:armhf \
1919
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 \
@@ -26,6 +26,9 @@ WORKDIR /root
2626
# The "wine" package provides a convience wrapper that we need
2727
RUN apt-get update && apt-get install --no-install-recommends -y \
2828
git ca-certificates wine64 wine python3-simplejson python3-six msitools winbind procps && \
29+
# Workaround for `wine` package failure to employ the Debian alternatives system properly.
30+
ln -s /usr/lib/wine/wine64 /usr/bin/wine64 && \
31+
# Set of tools for using MSVC on Linux.
2932
git clone https://github.com/mstorsjo/msvc-wine && \
3033
mkdir /opt/msvc && \
3134
python3 msvc-wine/vsdownload.py --accept-license --dest /opt/msvc Microsoft.VisualStudio.Workload.VCTools && \

src/ecmult_gen_compute_table_impl.h

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ static void secp256k1_ecmult_gen_compute_table(secp256k1_ge_storage* table, cons
2222
secp256k1_gej nums_gej;
2323
int i, j;
2424

25+
VERIFY_CHECK(g > 0);
26+
VERIFY_CHECK(n > 0);
27+
2528
/* get the generator */
2629
secp256k1_gej_set_ge(&gj, gen);
2730

0 commit comments

Comments
 (0)