@@ -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())
|
||||
|
||||
|
||||
@@ -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 <soap@gentoo.org>
|
||||
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);
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<!DOCTYPE PISI SYSTEM "https://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>icu4c</Name>
|
||||
@@ -14,23 +14,16 @@
|
||||
<Description>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.</Description>
|
||||
<!-- CAUTION! This package has a great potential to break API/ABI in minor version bumps, check for a file like:
|
||||
http://source.icu-project.org/repos/icu/icu/tags/release-55-1/APIChangeReport.html -->
|
||||
<Archive sha1sum="f7764341d196112573605881dbbf10e586d84841" type="targz">https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-src.tgz</Archive>
|
||||
<Archive sha1sum="a62283d2e6a1bcddea1cab0d1cd09dbe5da6c96f" type="targz">https://github.com/unicode-org/icu/releases/download/release-78.2/icu4c-78.2-sources.tgz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="icu-77.1-invalid-malloc.patch">icu-77.1-invalid-malloc.patch</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<BuildDependencies>
|
||||
<Dependency>libgcc</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch>gennorm2-man.patch</Patch> -->
|
||||
<!-- <Patch>icuinfo-man.patch</Patch> -->
|
||||
|
||||
<Patch>fedora/0001-ICU-22954-USet-C-iterator-return-std-u16string.patch</Patch>
|
||||
<Patch>fedora/0002-ICU-22954-U_ICU_NAMESPACE_OR_INTERNAL-header-only-lo.patch</Patch>
|
||||
<Patch>fedora/0003-ICU-22954-intltest.h-IcuTestErrorCode-usable-without.patch</Patch>
|
||||
<Patch>fedora/0004-ICU-22954-header-only-test-USet-C-iterators.patch</Patch>
|
||||
<Patch>fedora/0005-ICU-22954-Partially-revert-PR-3295-U_ICU_NAMESPACE_O.patch</Patch>
|
||||
<Patch>fedora/0006-ICU-22954-USetHeaderOnlyTest-use-unique_ptr.patch</Patch>
|
||||
<Patch>fedora/0007-ICU-22954-Delete-copy-assign-from-IcuTestErrorCode.patch</Patch>
|
||||
<Patch>fedora/0008-ICU-22954-Workaround-Replace-std-u16string-member-wi.patch</Patch>
|
||||
<Patch>fedora/0009-ICU-22954-Revert-to-using-std-u16string-instead-of-U.patch</Patch>
|
||||
<!-- <Patch>icu-77.1-invalid-malloc.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
@@ -83,6 +76,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="15">
|
||||
<Date>2026-02-16</Date>
|
||||
<Version>78.2</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Pisi Linux Community</Name>
|
||||
<Email>admin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="14">
|
||||
<Date>2025-02-23</Date>
|
||||
<Version>76.1</Version>
|
||||
|
||||
Reference in New Issue
Block a user