summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-09-24 19:13:44 +0100
committerSam James <sam@gentoo.org>2021-09-24 19:13:44 +0100
commit7a771de8495a19e73ee8c2bd3cd7f08fbe341e7d (patch)
tree6d28d65e082089bc83626dfe9e6dc8bc199f233e /dev-libs/icu
parentwww-client/firefox: Stabilize 78.14.0 amd64, #814605 (diff)
downloadgentoo-7a771de8495a19e73ee8c2bd3cd7f08fbe341e7d.tar.gz
gentoo-7a771de8495a19e73ee8c2bd3cd7f08fbe341e7d.tar.bz2
gentoo-7a771de8495a19e73ee8c2bd3cd7f08fbe341e7d.zip
dev-libs/icu: add upstream patch for test failure
This may cause runtime breakage (not just a failure in a test, but exposed by it on hppa and actually riscv) and it's a straightforward patch, so let's `git mv` in stable. Bug: https://bugs.gentoo.org/788112 Closes: https://bugs.gentoo.org/807893 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/icu')
-rw-r--r--dev-libs/icu/files/icu-69.1-fix-ub-units.patch23
-rw-r--r--dev-libs/icu/icu-69.1-r1.ebuild (renamed from dev-libs/icu/icu-69.1.ebuild)3
2 files changed, 26 insertions, 0 deletions
diff --git a/dev-libs/icu/files/icu-69.1-fix-ub-units.patch b/dev-libs/icu/files/icu-69.1-fix-ub-units.patch
new file mode 100644
index 000000000000..6847d5851557
--- /dev/null
+++ b/dev-libs/icu/files/icu-69.1-fix-ub-units.patch
@@ -0,0 +1,23 @@
+https://github.com/unicode-org/icu/pull/1715
+https://bugs.gentoo.org/788112
+
+From 29f1188d191a7a75ac7ffa4bfa390f625da39c53 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@suse.de>
+Date: Tue, 11 May 2021 19:04:24 +0200
+Subject: [PATCH] ICU-21613 Fix undefined behaviour in
+ ComplexUnitsConverter::applyRounder
+
+--- a/i18n/units_complexconverter.cpp
++++ b/i18n/units_complexconverter.cpp
+@@ -237,6 +237,11 @@ void ComplexUnitsConverter::applyRounder(MaybeStackArray<int64_t, 5> &intValues,
+ }
+ quantity = decimalQuantity.toDouble();
+
++ if (uprv_isNaN(quantity) || uprv_isInfinite(quantity)) {
++ // Do nothing for non-finite values, since conversion to int64_t is undefined
++ return;
++ }
++
+ int32_t lastIndex = unitsConverters_.length() - 1;
+ if (lastIndex == 0) {
+ // Only one element, no need to bubble up the carry
diff --git a/dev-libs/icu/icu-69.1.ebuild b/dev-libs/icu/icu-69.1-r1.ebuild
index 1d2630ee16e2..b540e57c81b4 100644
--- a/dev-libs/icu/icu-69.1.ebuild
+++ b/dev-libs/icu/icu-69.1-r1.ebuild
@@ -32,6 +32,9 @@ PATCHES=(
"${FILESDIR}/${PN}-65.1-remove-bashisms.patch"
"${FILESDIR}/${PN}-64.2-darwin.patch"
"${FILESDIR}/${PN}-68.1-nonunicode.patch"
+ # Should be in the next rleease, but check
+ # https://bugs.gentoo.org/788112
+ "${FILESDIR}/${PN}-69.1-fix-ub-units.patch"
)
src_prepare() {