From 6d7185cd108fe89a8da4c66fd7d4fa503b467834 Mon Sep 17 00:00:00 2001 From: Rmys Date: Mon, 16 Feb 2026 20:28:30 +0300 Subject: [PATCH] icu4c ver. bump --- programming/misc/icu4c/actions.py | 3 ++ .../icu4c/files/icu-77.1-invalid-malloc.patch | 30 +++++++++++++++++++ programming/misc/icu4c/pspec.xml | 26 ++++++++-------- 3 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 programming/misc/icu4c/files/icu-77.1-invalid-malloc.patch diff --git a/programming/misc/icu4c/actions.py b/programming/misc/icu4c/actions.py index 335d2df981..ff597f94ce 100644 --- a/programming/misc/icu4c/actions.py +++ b/programming/misc/icu4c/actions.py @@ -18,6 +18,9 @@ def setup(): --disable-silent-rules" if get.buildTYPE() == "_emul32": + + shelltools.system("patch -p1 < icu-77.1-invalid-malloc.patch") + shelltools.export("CC", "%s -m32" % get.CC()) shelltools.export("CXX", "%s -m32" % get.CXX()) diff --git a/programming/misc/icu4c/files/icu-77.1-invalid-malloc.patch b/programming/misc/icu4c/files/icu-77.1-invalid-malloc.patch new file mode 100644 index 0000000000..a0ae4728a9 --- /dev/null +++ b/programming/misc/icu4c/files/icu-77.1-invalid-malloc.patch @@ -0,0 +1,30 @@ +https://unicode-org.atlassian.net/browse/ICU-23120 +https://github.com/unicode-org/icu/pull/3496 + +From a0d280e4b4df6c09dfd82b63499f308d416c9b60 Mon Sep 17 00:00:00 2001 +From: David Seifert +Date: Fri, 16 May 2025 12:55:47 +0200 +Subject: [PATCH] ICU-23120 Fix malloc request larger than PTRDIFF_MAX bytes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* glibc does not allow allocations that exceed PTRDIFF_MAX bytes: + https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9bf8e29ca136094f73f69f725f15c51facc97206 +* Without this, we get compile failures on 32-bit platforms: + + work/icu/source/test/intltest/ustrtest.cpp: In member function ‘void UnicodeStringTest::TestLargeMemory()’: + work/icu/source/test/intltest/ustrtest.cpp:2360:37: error: size ‘4294967286’ of array exceeds maximum object size ‘2147483647’ + 2360 | char16_t *buf = new char16_t[len]; + | ^ +--- a/test/intltest/ustrtest.cpp ++++ b/test/intltest/ustrtest.cpp +@@ -2356,7 +2356,7 @@ void UnicodeStringTest::TestLargeMemory() { + #if U_PLATFORM_IS_LINUX_BASED || U_PLATFORM_IS_DARWIN_BASED + if(quick) { return; } + IcuTestErrorCode status(*this, "TestLargeMemory"); +- constexpr uint32_t len = 2147483643; ++ constexpr uint32_t len = (PTRDIFF_MAX - 10) / sizeof(char16_t); + char16_t *buf = new char16_t[len]; + if (buf == nullptr) { return; } + uprv_memset(buf, 0x4e, len * 2); diff --git a/programming/misc/icu4c/pspec.xml b/programming/misc/icu4c/pspec.xml index 54bd84794d..7d97cb6817 100644 --- a/programming/misc/icu4c/pspec.xml +++ b/programming/misc/icu4c/pspec.xml @@ -1,5 +1,5 @@ - + icu4c @@ -14,23 +14,16 @@ ICU is a mature, widely used set of C/C++ and Java libraries for Unicode support, software internationalization and globalization (i18n/g11n). This package contains the C/C++ libraries. - https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-src.tgz + https://github.com/unicode-org/icu/releases/download/release-78.2/icu4c-78.2-sources.tgz + + icu-77.1-invalid-malloc.patch + libgcc - - - fedora/0001-ICU-22954-USet-C-iterator-return-std-u16string.patch - fedora/0002-ICU-22954-U_ICU_NAMESPACE_OR_INTERNAL-header-only-lo.patch - fedora/0003-ICU-22954-intltest.h-IcuTestErrorCode-usable-without.patch - fedora/0004-ICU-22954-header-only-test-USet-C-iterators.patch - fedora/0005-ICU-22954-Partially-revert-PR-3295-U_ICU_NAMESPACE_O.patch - fedora/0006-ICU-22954-USetHeaderOnlyTest-use-unique_ptr.patch - fedora/0007-ICU-22954-Delete-copy-assign-from-IcuTestErrorCode.patch - fedora/0008-ICU-22954-Workaround-Replace-std-u16string-member-wi.patch - fedora/0009-ICU-22954-Revert-to-using-std-u16string-instead-of-U.patch + @@ -83,6 +76,13 @@ + + 2026-02-16 + 78.2 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2025-02-23 76.1