Skip to content

Commit

Permalink
Merge bitcoin-core/secp256k1#1356: ci: Adjust Docker image to Debian …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
real-or-random committed Jun 27, 2023
2 parents fd491ea + c862a9f commit 799f4ee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
16 changes: 16 additions & 0 deletions ci/cirrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ if [ -n "$WRAPPER_CMD" ]; then
$WRAPPER_CMD --version
fi

# Workaround for https://bugs.kde.org/show_bug.cgi?id=452758 (fixed in valgrind 3.20.0).
case "${CC:-undefined}" in
clang*)
if [ "$CTIMETESTS" = "yes" ] && [ "$WITH_VALGRIND" = "yes" ]
then
export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
else
case "$WRAPPER_CMD" in
valgrind*)
export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
;;
esac
fi
;;
esac

./autogen.sh

./configure \
Expand Down
7 changes: 5 additions & 2 deletions ci/linux-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ RUN dpkg --add-architecture i386 && \
RUN apt-get update && apt-get install --no-install-recommends -y \
git ca-certificates \
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
gcc clang llvm libc6-dbg \
gcc clang llvm libclang-rt-dev libc6-dbg \
g++ \
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan6:i386 \
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan8:i386 \
gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libc6-dbg:armhf \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 \
Expand All @@ -26,6 +26,9 @@ WORKDIR /root
# The "wine" package provides a convience wrapper that we need
RUN apt-get update && apt-get install --no-install-recommends -y \
git ca-certificates wine64 wine python3-simplejson python3-six msitools winbind procps && \
# Workaround for `wine` package failure to employ the Debian alternatives system properly.
ln -s /usr/lib/wine/wine64 /usr/bin/wine64 && \
# Set of tools for using MSVC on Linux.
git clone https://github.com/mstorsjo/msvc-wine && \
mkdir /opt/msvc && \
python3 msvc-wine/vsdownload.py --accept-license --dest /opt/msvc Microsoft.VisualStudio.Workload.VCTools && \
Expand Down
3 changes: 3 additions & 0 deletions src/ecmult_gen_compute_table_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ static void secp256k1_ecmult_gen_compute_table(secp256k1_ge_storage* table, cons
secp256k1_gej nums_gej;
int i, j;

VERIFY_CHECK(g > 0);
VERIFY_CHECK(n > 0);

/* get the generator */
secp256k1_gej_set_ge(&gj, gen);

Expand Down

0 comments on commit 799f4ee

Please sign in to comment.