* [gentoo-commits] repo/gentoo:master commit in: net-libs/ngtcp2/, net-libs/ngtcp2/files/
@ 2025-01-03 11:32 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-01-03 11:32 UTC (permalink / raw
To: gentoo-commits
commit: 7caf564409af2b3a5cd3df3ed0feb65c7fc061e3
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 3 11:30:38 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 3 11:31:05 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7caf5644
net-libs/ngtcp2: fix uninitialised variables
Backport upstream fixes (thank you!) for uninitialised variables exposed
by GCC 15's padding changes.
Closes: https://bugs.gentoo.org/947300
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../ngtcp2/files/ngtcp2-1.10.0-gcc15-uninit.patch | 46 +++++++++++++++++
net-libs/ngtcp2/ngtcp2-1.10.0-r2.ebuild | 60 ++++++++++++++++++++++
2 files changed, 106 insertions(+)
diff --git a/net-libs/ngtcp2/files/ngtcp2-1.10.0-gcc15-uninit.patch b/net-libs/ngtcp2/files/ngtcp2-1.10.0-gcc15-uninit.patch
new file mode 100644
index 000000000000..7ce0cf2b6c3c
--- /dev/null
+++ b/net-libs/ngtcp2/files/ngtcp2-1.10.0-gcc15-uninit.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/947300
+https://github.com/ngtcp2/ngtcp2/pull/1464
+https://github.com/ngtcp2/ngtcp2/commit/60ab2b73aa02e6c99597b975724c6b58008c4869
+https://github.com/ngtcp2/ngtcp2/commit/416698347d60968eba635182dfdedc44d1aa7c3b
+
+From 60ab2b73aa02e6c99597b975724c6b58008c4869 Mon Sep 17 00:00:00 2001
+From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
+Date: Fri, 3 Jan 2025 10:05:55 +0900
+Subject: [PATCH] tests: Fix uninitialized variable reference
+
+--- a/tests/ngtcp2_transport_params_test.c
++++ b/tests/ngtcp2_transport_params_test.c
+@@ -419,11 +419,16 @@ void test_ngtcp2_transport_params_convert_to_latest(void) {
+ ngtcp2_cid rcid, scid, dcid;
+ uint8_t available_versions[sizeof(uint32_t) * 3];
+ ngtcp2_sockaddr_in6 *sa_in6;
++ size_t i;
+
+ rcid_init(&rcid);
+ scid_init(&scid);
+ dcid_init(&dcid);
+
++ for (i = 0; i < sizeof(available_versions); i += sizeof(uint32_t)) {
++ ngtcp2_put_uint32be(&available_versions[i], (uint32_t)(0xff000000u + i));
++ }
++
+ ngtcp2_transport_params_default_versioned(NGTCP2_TRANSPORT_PARAMS_V1,
+ &srcbuf);
+
+
+From 416698347d60968eba635182dfdedc44d1aa7c3b Mon Sep 17 00:00:00 2001
+From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
+Date: Fri, 3 Jan 2025 10:13:56 +0900
+Subject: [PATCH] Fix uninitialized connection close frame_type
+
+--- a/lib/ngtcp2_conn.c
++++ b/lib/ngtcp2_conn.c
+@@ -13765,6 +13765,7 @@ ngtcp2_ssize ngtcp2_pkt_write_connection_close(
+
+ fr.type = NGTCP2_FRAME_CONNECTION_CLOSE;
+ fr.connection_close.error_code = error_code;
++ fr.connection_close.frame_type = 0;
+ fr.connection_close.reasonlen = reasonlen;
+ fr.connection_close.reason = (uint8_t *)reason;
+
+
diff --git a/net-libs/ngtcp2/ngtcp2-1.10.0-r2.ebuild b/net-libs/ngtcp2/ngtcp2-1.10.0-r2.ebuild
new file mode 100644
index 000000000000..b88f76b1fbc3
--- /dev/null
+++ b/net-libs/ngtcp2/ngtcp2-1.10.0-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/ngtcp2/ngtcp2.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/ngtcp2/ngtcp2/releases/download/v${PV}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Implementation of the IETF QUIC Protocol"
+HOMEPAGE="https://github.com/ngtcp2/ngtcp2/"
+
+LICENSE="MIT"
+SLOT="0/0"
+IUSE="+gnutls openssl +ssl static-libs test"
+# Without static-libs, src_test just won't run any tests and "pass".
+REQUIRED_USE="ssl? ( || ( gnutls openssl ) ) test? ( static-libs )"
+
+BDEPEND="virtual/pkgconfig"
+RDEPEND="
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-3.7.2:=[${MULTILIB_USEDEP}] )
+ openssl? ( >=dev-libs/openssl-1.1.1:=[${MULTILIB_USEDEP}] )
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )
+"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.10.0-munit-c23.patch
+ "${FILESDIR}"/${P}-gcc15-uninit.patch
+)
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DENABLE_STATIC_LIB=$(usex static-libs)
+ -DENABLE_GNUTLS=$(usex gnutls)
+ -DENABLE_OPENSSL=$(usex openssl)
+ -DENABLE_BORINGSSL=OFF
+ -DENABLE_PICOTLS=OFF
+ -DENABLE_WOLFSSL=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_Libev=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Libnghttp3=ON
+ -DBUILD_TESTING=$(usex test)
+ )
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ cmake_build check
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/ngtcp2/, net-libs/ngtcp2/files/
@ 2025-01-01 8:02 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-01-01 8:02 UTC (permalink / raw
To: gentoo-commits
commit: 5bfb0efe34be9619ed955caf09989c908e41fa8a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 1 08:01:13 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 1 08:01:59 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bfb0efe
net-libs/ngtcp2: fix build of tests w/ c23
Same as in a7dfda3569459f3ea16b905260e22a3115bfc595 for nghttp2.
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch | 28 ++++++++++++++++++++++
net-libs/ngtcp2/ngtcp2-1.10.0.ebuild | 6 ++++-
net-libs/ngtcp2/ngtcp2-9999.ebuild | 6 ++++-
3 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/net-libs/ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch b/net-libs/ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch
new file mode 100644
index 000000000000..93d208fa4215
--- /dev/null
+++ b/net-libs/ngtcp2/files/ngtcp2-1.10.0-munit-c23.patch
@@ -0,0 +1,28 @@
+https://github.com/nemequ/munit/pull/105
+--- a/tests/munit/munit.c
++++ b/tests/munit/munit.c
+@@ -858,23 +858,18 @@ static psnip_uint64_t munit_clock_get_elapsed(struct PsnipClockTimespec *start,
+
+ #if defined(_OPENMP)
+ # define ATOMIC_UINT32_T uint32_t
+-# define ATOMIC_UINT32_INIT(x) (x)
+ #elif defined(HAVE_STDATOMIC)
+ # include <stdatomic.h>
+ # define ATOMIC_UINT32_T _Atomic uint32_t
+-# define ATOMIC_UINT32_INIT(x) ATOMIC_VAR_INIT(x)
+ #elif defined(HAVE_CLANG_ATOMICS)
+ # define ATOMIC_UINT32_T _Atomic uint32_t
+-# define ATOMIC_UINT32_INIT(x) (x)
+ #elif defined(_WIN32)
+ # define ATOMIC_UINT32_T volatile LONG
+-# define ATOMIC_UINT32_INIT(x) (x)
+ #else
+ # define ATOMIC_UINT32_T volatile uint32_t
+-# define ATOMIC_UINT32_INIT(x) (x)
+ #endif
+
+-static ATOMIC_UINT32_T munit_rand_state = ATOMIC_UINT32_INIT(42);
++static ATOMIC_UINT32_T munit_rand_state = 42;
+
+ #if defined(_OPENMP)
+ static inline void munit_atomic_store(ATOMIC_UINT32_T *dest,
diff --git a/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild b/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild
index 789b94518acb..6e826067b4dc 100644
--- a/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild
+++ b/net-libs/ngtcp2/ngtcp2-1.10.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -33,6 +33,10 @@ DEPEND="${RDEPEND}
test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )"
RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.10.0-munit-c23.patch
+)
+
multilib_src_configure() {
local mycmakeargs=(
-DENABLE_STATIC_LIB=$(usex static-libs)
diff --git a/net-libs/ngtcp2/ngtcp2-9999.ebuild b/net-libs/ngtcp2/ngtcp2-9999.ebuild
index 789b94518acb..6e826067b4dc 100644
--- a/net-libs/ngtcp2/ngtcp2-9999.ebuild
+++ b/net-libs/ngtcp2/ngtcp2-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -33,6 +33,10 @@ DEPEND="${RDEPEND}
test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )"
RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.10.0-munit-c23.patch
+)
+
multilib_src_configure() {
local mycmakeargs=(
-DENABLE_STATIC_LIB=$(usex static-libs)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-03 11:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03 11:32 [gentoo-commits] repo/gentoo:master commit in: net-libs/ngtcp2/, net-libs/ngtcp2/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2025-01-01 8:02 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox