summaryrefslogtreecommitdiff
path: root/system/icu
diff options
context:
space:
mode:
Diffstat (limited to 'system/icu')
-rw-r--r--system/icu/APKBUILD37
-rw-r--r--system/icu/CVE-2017-7867-7868.patch155
-rw-r--r--system/icu/CVE-2020-10531.patch118
-rw-r--r--system/icu/checkimpl.patch37
-rw-r--r--system/icu/icu-58.1-iterator-reset.patch124
-rw-r--r--system/icu/icu-63.1-test-failure.patch69
6 files changed, 131 insertions, 409 deletions
diff --git a/system/icu/APKBUILD b/system/icu/APKBUILD
index 7676fbf2b..046698316 100644
--- a/system/icu/APKBUILD
+++ b/system/icu/APKBUILD
@@ -1,24 +1,23 @@
# Contributor: Sergey Lukin <sergej.lukin@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=icu
-pkgver=63.1
+pkgver=65.1
# convert x.y.z to x_y_z
_ver=$(printf '%s' "$pkgver" | tr . _)
pkgrel=1
-pkgdesc="International Components for Unicode library"
+pkgdesc="International Components for Unicode"
url="http://site.icu-project.org/"
arch="all"
license="ICU"
-subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
depends=""
-checkdepends="diffutils"
+checkdepends="diffutils python3"
makedepends=""
-source="https://ssl.icu-project.org/files/icu4c/${pkgver}/${pkgname}4c-$_ver-src.tgz
+subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
+source="https://github.com/unicode-org/icu/releases/download/release-$(printf '%s' "$pkgver" | tr . -)/${pkgname}4c-$_ver-src.tgz
icu-60.2-always-use-utf8.patch
- checkimpl.patch
- icu-63.1-test-failure.patch
+ CVE-2020-10531.patch
"
# secfixes:
@@ -29,21 +28,15 @@ source="https://ssl.icu-project.org/files/icu4c/${pkgver}/${pkgname}4c-$_ver-src
# 58.2-r2:
# - CVE-2017-7867
# - CVE-2017-7868
+# 65.1-r1:
+# - CVE-2020-10531
+
builddir="$srcdir"/icu/source
prepare() {
- cd "$builddir"
default_prepare
update_config_sub
- # strtod_l() is not supported by musl; also xlocale.h is missing
- # It is not possible to disable its use via configure switches or env vars
- # so monkey patching is needed. Idea was stollen from openembedded
- # https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-support/icu/icu.inc#L30
- sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' configure.ac
- sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' configure
-
- local x
# https://bugs.icu-project.org/trac/ticket/6102
for x in ARFLAGS CFLAGS CPPFLAGS CXXFLAGS FFLAGS LDFLAGS; do
sed -i -e "/^${x} =.*/s:@${x}@::" "config/Makefile.inc.in"
@@ -51,7 +44,6 @@ prepare() {
}
build() {
- cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -62,18 +54,16 @@ build() {
--with-data-packaging=library \
--disable-samples \
--mandir=/usr/share/man
+ # Weird build system glitch.
+ mkdir data/out
make
}
check() {
- # armhf tests fail with gensprep: Bus error
- [ "$CARCH" != armhf ] || return 0
- cd "$builddir"
make check
}
package() {
- cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
chmod +x "$pkgdir"/usr/bin/icu-config
install -Dm644 "$srcdir"/icu/license.html \
@@ -86,7 +76,6 @@ static() {
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
-sha512sums="9ab407ed840a00cdda7470dcc4c40299a125ad246ae4d019c4b1ede54781157fd63af015a8228cd95dbc47e4d15a0932b2c657489046a19788e5e8266eac079c icu4c-63_1-src.tgz
+sha512sums="8f1ef33e1f4abc9a8ee870331c59f01b473d6da1251a19ce403f822f3e3871096f0791855d39c8f20c612fc49cda2c62c06864aa32ddab2dbd186d2b21ce9139 icu4c-65_1-src.tgz
f86c62422f38f6485c58d4766e629bab69e4b0e00fa910854e40e7db1ace299152eaefa99ae2fbab7465e65d3156cbea7124612defa60680db58ab5c34d6262f icu-60.2-always-use-utf8.patch
-af27a474af041a6ac522901a635c3f328dee5f2b8e42d1229970908c740cd2b97fc06e5432541773d7c80339382f75d795911540f844b6d89ec0ee99d4fa6ff9 checkimpl.patch
-24a64f05e10b59d2f7fdd063e032195d446c668497934a0f5012a7b6088b61d260f7ddb8ecbe60bdc49e16ab810fda169bc1d330f30acdf45a1ad8f844fc464d icu-63.1-test-failure.patch"
+2901235a24b1973516e495473188b077eb0486714ac47f702f226a3406176e913672159978b67548a1316284ecc716e06158b05c190ddfa83ad576a7a3539d72 CVE-2020-10531.patch"
diff --git a/system/icu/CVE-2017-7867-7868.patch b/system/icu/CVE-2017-7867-7868.patch
deleted file mode 100644
index df18283c2..000000000
--- a/system/icu/CVE-2017-7867-7868.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-Index: source/common/utext.cpp
-===================================================================
---- source/common/utext.cpp (revision 39670)
-+++ source/common/utext.cpp (revision 39671)
-@@ -848,7 +848,13 @@
-
- // Chunk size.
--// Must be less than 85, because of byte mapping from UChar indexes to native indexes.
--// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes
--// to two UChars.)
-+// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes.
-+// Worst case there are six UTF-8 bytes per UChar.
-+// obsolete 6 byte form fd + 5 trails maps to fffd
-+// obsolete 5 byte form fc + 4 trails maps to fffd
-+// non-shortest 4 byte forms maps to fffd
-+// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit
-+// mapToUChars array size must allow for the worst case, 6.
-+// This could be brought down to 4, by treating fd and fc as pure illegal,
-+// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros.
- //
- enum { UTF8_TEXT_CHUNK_SIZE=32 };
-@@ -890,5 +896,5 @@
- // one for a supplementary starting in the last normal position,
- // and one for an entry for the buffer limit position.
-- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to
-+ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to
- // correspoding offset in filled part of buf.
- int32_t align;
-@@ -1033,4 +1039,5 @@
- u8b = (UTF8Buf *)ut->p; // the current buffer
- mapIndex = ix - u8b->toUCharsMapStart;
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
- ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- return TRUE;
-@@ -1299,4 +1306,8 @@
- // If index is at the end, there is no character there to look at.
- if (ix != ut->b) {
-+ // Note: this function will only move the index back if it is on a trail byte
-+ // and there is a preceding lead byte and the sequence from the lead
-+ // through this trail could be part of a valid UTF-8 sequence
-+ // Otherwise the index remains unchanged.
- U8_SET_CP_START(s8, 0, ix);
- }
-@@ -1312,5 +1323,8 @@
- uint8_t *mapToNative = u8b->mapToNative;
- uint8_t *mapToUChars = u8b->mapToUChars;
-- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);
-+ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
-+ // Note that toUCharsMapStart can be negative. Happens when the remaining
-+ // text from current position to the beginning is less than the buffer size.
-+ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry.
- int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region
- // at end of buffer to leave room
-@@ -1339,4 +1353,5 @@
- // Special case ASCII range for speed.
- buf[destIx] = (UChar)c;
-+ U_ASSERT(toUCharsMapStart <= srcIx);
- mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;
- mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
-@@ -1368,4 +1383,5 @@
- mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx;
- } while (sIx >= srcIx);
-+ U_ASSERT(toUCharsMapStart <= (srcIx+1));
-
- // Set native indexing limit to be the current position.
-@@ -1542,4 +1558,5 @@
- U_ASSERT(index<=ut->chunkNativeLimit);
- int32_t mapIndex = index - u8b->toUCharsMapStart;
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
- int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
- U_ASSERT(offset>=0 && offset<=ut->chunkLength);
-Index: source/test/intltest/utxttest.cpp
-===================================================================
---- source/test/intltest/utxttest.cpp (revision 39670)
-+++ source/test/intltest/utxttest.cpp (revision 39671)
-@@ -68,4 +68,6 @@
- case 7: name = "Ticket12130";
- if (exec) Ticket12130(); break;
-+ case 8: name = "Ticket12888";
-+ if (exec) Ticket12888(); break;
- default: name = ""; break;
- }
-@@ -1584,2 +1586,62 @@
- utext_close(&ut);
- }
-+
-+// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal,
-+// six byte utf-8 forms. Original implementation had an assumption that
-+// there would be at most three utf-8 bytes per UTF-16 code unit.
-+// The five and six byte sequences map to a single replacement character.
-+
-+void UTextTest::Ticket12888() {
-+ const char *badString =
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80";
-+
-+ UErrorCode status = U_ZERO_ERROR;
-+ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status));
-+ TEST_SUCCESS(status);
-+ for (;;) {
-+ UChar32 c = utext_next32(ut.getAlias());
-+ if (c == U_SENTINEL) {
-+ break;
-+ }
-+ }
-+ int32_t endIdx = utext_getNativeIndex(ut.getAlias());
-+ if (endIdx != (int32_t)strlen(badString)) {
-+ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx);
-+ return;
-+ }
-+
-+ for (int32_t prevIndex = endIdx; prevIndex>0;) {
-+ UChar32 c = utext_previous32(ut.getAlias());
-+ int32_t currentIndex = utext_getNativeIndex(ut.getAlias());
-+ if (c != 0xfffd) {
-+ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n",
-+ __FILE__, __LINE__, 0xfffd, c, currentIndex);
-+ break;
-+ }
-+ if (currentIndex != prevIndex - 6) {
-+ errln("%s:%d: wrong index. Expected, actual = %d, %d",
-+ __FILE__, __LINE__, prevIndex - 6, currentIndex);
-+ break;
-+ }
-+ prevIndex = currentIndex;
-+ }
-+}
-Index: source/test/intltest/utxttest.h
-===================================================================
---- source/test/intltest/utxttest.h (revision 39670)
-+++ source/test/intltest/utxttest.h (revision 39671)
-@@ -39,4 +39,5 @@
- void Ticket10983();
- void Ticket12130();
-+ void Ticket12888();
-
- private:
diff --git a/system/icu/CVE-2020-10531.patch b/system/icu/CVE-2020-10531.patch
new file mode 100644
index 000000000..f456b06ec
--- /dev/null
+++ b/system/icu/CVE-2020-10531.patch
@@ -0,0 +1,118 @@
+From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Sat, 1 Feb 2020 02:39:04 +0000
+Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
+
+See #971
+---
+ source/common/unistr.cpp | 6 ++-
+ source/test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++
+ source/test/intltest/ustrtest.h | 1 +
+ 3 files changed, 68 insertions(+), 1 deletion(-)
+
+diff --git source/common/unistr.cpp source/common/unistr.cpp
+index 901bb3358ba..077b4d6ef20 100644
+--- source/common/unistr.cpp
++++ source/common/unistr.cpp
+@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
+ }
+
+ int32_t oldLength = length();
+- int32_t newLength = oldLength + srcLength;
++ int32_t newLength;
++ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) {
++ setToBogus();
++ return *this;
++ }
+
+ // Check for append onto ourself
+ const UChar* oldArray = getArrayStart();
+diff --git source/test/intltest/ustrtest.cpp source/test/intltest/ustrtest.cpp
+index b6515ea813c..ad38bdf53a3 100644
+--- source/test/intltest/ustrtest.cpp
++++ source/test/intltest/ustrtest.cpp
+@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &
+ TESTCASE_AUTO(TestWCharPointers);
+ TESTCASE_AUTO(TestNullPointers);
+ TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf);
++ TESTCASE_AUTO(TestLargeAppend);
+ TESTCASE_AUTO_END;
+ }
+
+@@ -2310,3 +2311,64 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
+ str.insert(2, sub);
+ assertEquals("", u"abbcdcde", str);
+ }
++
++void UnicodeStringTest::TestLargeAppend() {
++ if(quick) return;
++
++ IcuTestErrorCode status(*this, "TestLargeAppend");
++ // Make a large UnicodeString
++ int32_t len = 0xAFFFFFF;
++ UnicodeString str;
++ char16_t *buf = str.getBuffer(len);
++ // A fast way to set buffer to valid Unicode.
++ // 4E4E is a valid unicode character
++ uprv_memset(buf, 0x4e, len * 2);
++ str.releaseBuffer(len);
++ UnicodeString dest;
++ // Append it 16 times
++ // 0xAFFFFFF times 16 is 0xA4FFFFF1,
++ // which is greater than INT32_MAX, which is 0x7FFFFFFF.
++ int64_t total = 0;
++ for (int32_t i = 0; i < 16; i++) {
++ dest.append(str);
++ total += len;
++ if (total <= INT32_MAX) {
++ assertFalse("dest is not bogus", dest.isBogus());
++ } else {
++ assertTrue("dest should be bogus", dest.isBogus());
++ }
++ }
++ dest.remove();
++ total = 0;
++ for (int32_t i = 0; i < 16; i++) {
++ dest.append(str);
++ total += len;
++ if (total + len <= INT32_MAX) {
++ assertFalse("dest is not bogus", dest.isBogus());
++ } else if (total <= INT32_MAX) {
++ // Check that a string of exactly the maximum size works
++ UnicodeString str2;
++ int32_t remain = INT32_MAX - total;
++ char16_t *buf2 = str2.getBuffer(remain);
++ if (buf2 == nullptr) {
++ // if somehow memory allocation fail, return the test
++ return;
++ }
++ uprv_memset(buf2, 0x4e, remain * 2);
++ str2.releaseBuffer(remain);
++ dest.append(str2);
++ total += remain;
++ assertEquals("When a string of exactly the maximum size works", (int64_t)INT32_MAX, total);
++ assertEquals("When a string of exactly the maximum size works", INT32_MAX, dest.length());
++ assertFalse("dest is not bogus", dest.isBogus());
++
++ // Check that a string size+1 goes bogus
++ str2.truncate(1);
++ dest.append(str2);
++ total++;
++ assertTrue("dest should be bogus", dest.isBogus());
++ } else {
++ assertTrue("dest should be bogus", dest.isBogus());
++ }
++ }
++}
+diff --git source/test/intltest/ustrtest.h source/test/intltest/ustrtest.h
+index 218befdcc68..4a356a92c7a 100644
+--- source/test/intltest/ustrtest.h
++++ source/test/intltest/ustrtest.h
+@@ -97,6 +97,7 @@ class UnicodeStringTest: public IntlTest {
+ void TestWCharPointers();
+ void TestNullPointers();
+ void TestUnicodeStringInsertAppendToSelf();
++ void TestLargeAppend();
+ };
+
+ #endif
diff --git a/system/icu/checkimpl.patch b/system/icu/checkimpl.patch
deleted file mode 100644
index 53cfa724f..000000000
--- a/system/icu/checkimpl.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 8baff8f03e07d8e02304d0c888d0bb21ad2eeb01 Mon Sep 17 00:00:00 2001
-From: Jeff Genovy <29107334+jefgen@users.noreply.github.com>
-Date: Wed, 17 Oct 2018 19:47:35 -0700
-Subject: [PATCH] ICU-20208 uspoof.cpp function checkImpl should be static,
- regenerate urename.h
-
-(cherry picked from commit 9ec2c332c1c9156323944ea2b15c2b91952efae4)
----
- common/unicode/urename.h | 1 -
- i18n/uspoof.cpp | 2 +-
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/common/unicode/urename.h b/common/unicode/urename.h
-index 5812173e39c..0512be3b6e5 100644
---- a/common/unicode/urename.h
-+++ b/common/unicode/urename.h
-@@ -110,7 +110,6 @@
- #define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data)
- #define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data)
- #define allowedHourFormatsCleanup U_ICU_ENTRY_POINT_RENAME(allowedHourFormatsCleanup)
--#define checkImpl U_ICU_ENTRY_POINT_RENAME(checkImpl)
- #define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup)
- #define dayPeriodRulesCleanup U_ICU_ENTRY_POINT_RENAME(dayPeriodRulesCleanup)
- #define deleteAllowedHourFormats U_ICU_ENTRY_POINT_RENAME(deleteAllowedHourFormats)
-diff --git a/i18n/uspoof.cpp b/i18n/uspoof.cpp
-index 8e3d69ede2b..66f228f037a 100644
---- a/i18n/uspoof.cpp
-+++ b/i18n/uspoof.cpp
-@@ -547,7 +547,7 @@ uspoof_checkUnicodeString(const USpoofChecker *sc,
- return uspoof_check2UnicodeString(sc, id, NULL, status);
- }
-
--int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* checkResult, UErrorCode* status) {
-+static int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* checkResult, UErrorCode* status) {
- U_ASSERT(This != NULL);
- U_ASSERT(checkResult != NULL);
- checkResult->clear();
diff --git a/system/icu/icu-58.1-iterator-reset.patch b/system/icu/icu-58.1-iterator-reset.patch
deleted file mode 100644
index 24c7fa96d..000000000
--- a/system/icu/icu-58.1-iterator-reset.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-Index: /icu/trunk/source/common/ulist.c
-===================================================================
---- source/common/ulist.c (revision 39483)
-+++ source/common/ulist.c (revision 39484)
-@@ -30,5 +30,4 @@
-
- int32_t size;
-- int32_t currentIndex;
- };
-
-@@ -52,5 +51,4 @@
- newList->tail = NULL;
- newList->size = 0;
-- newList->currentIndex = -1;
-
- return newList;
-@@ -81,6 +79,7 @@
- p->next->previous = p->previous;
- }
-- list->curr = NULL;
-- list->currentIndex = 0;
-+ if (p == list->curr) {
-+ list->curr = p->next;
-+ }
- --list->size;
- if (p->forceDelete) {
-@@ -151,5 +150,4 @@
- list->head->previous = newItem;
- list->head = newItem;
-- list->currentIndex++;
- }
-
-@@ -194,5 +192,4 @@
- curr = list->curr;
- list->curr = curr->next;
-- list->currentIndex++;
-
- return curr->data;
-@@ -210,5 +207,4 @@
- if (list != NULL) {
- list->curr = list->head;
-- list->currentIndex = 0;
- }
- }
-@@ -273,3 +269,2 @@
- return (UList *)(en->context);
- }
--
-Index: /icu/trunk/source/i18n/ucol_res.cpp
-===================================================================
---- source/i18n/ucol_res.cpp (revision 39483)
-+++ source/i18n/ucol_res.cpp (revision 39484)
-@@ -681,4 +681,5 @@
- }
- memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
-+ ulist_resetList(sink.values); // Initialize the iterator.
- en->context = sink.values;
- sink.values = NULL; // Avoid deletion in the sink destructor.
-Index: /icu/trunk/source/test/intltest/apicoll.cpp
-===================================================================
---- source/test/intltest/apicoll.cpp (revision 39483)
-+++ source/test/intltest/apicoll.cpp (revision 39484)
-@@ -82,14 +82,7 @@
- col = Collator::createInstance(Locale::getEnglish(), success);
- if (U_FAILURE(success)){
-- errcheckln(success, "Default Collator creation failed. - %s", u_errorName(success));
-- return;
-- }
--
-- StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success);
-- if (U_FAILURE(success)){
-- errcheckln(success, "Get Keyword Values for Locale failed. - %s", u_errorName(success));
-- return;
-- }
-- delete kwEnum;
-+ errcheckln(success, "English Collator creation failed. - %s", u_errorName(success));
-+ return;
-+ }
-
- col->getVersion(versionArray);
-@@ -230,4 +223,27 @@
- delete aFrCol;
- delete junk;
-+}
-+
-+void CollationAPITest::TestKeywordValues() {
-+ IcuTestErrorCode errorCode(*this, "TestKeywordValues");
-+ LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode));
-+ if (errorCode.logIfFailureAndReset("English Collator creation failed")) {
-+ return;
-+ }
-+
-+ LocalPointer<StringEnumeration> kwEnum(
-+ col->getKeywordValuesForLocale("collation", Locale::getEnglish(), TRUE, errorCode));
-+ if (errorCode.logIfFailureAndReset("Get Keyword Values for English Collator failed")) {
-+ return;
-+ }
-+ assertTrue("expect at least one collation tailoring for English", kwEnum->count(errorCode) > 0);
-+ const char *kw;
-+ UBool hasStandard = FALSE;
-+ while ((kw = kwEnum->next(NULL, errorCode)) != NULL) {
-+ if (strcmp(kw, "standard") == 0) {
-+ hasStandard = TRUE;
-+ }
-+ }
-+ assertTrue("expect at least the 'standard' collation tailoring for English", hasStandard);
- }
-
-@@ -2467,4 +2483,5 @@
- TESTCASE_AUTO_BEGIN;
- TESTCASE_AUTO(TestProperty);
-+ TESTCASE_AUTO(TestKeywordValues);
- TESTCASE_AUTO(TestOperators);
- TESTCASE_AUTO(TestDuplicate);
-Index: /icu/trunk/source/test/intltest/apicoll.h
-===================================================================
---- source/test/intltest/apicoll.h (revision 39483)
-+++ source/test/intltest/apicoll.h (revision 39484)
-@@ -36,4 +36,5 @@
- */
- void TestProperty(/* char* par */);
-+ void TestKeywordValues();
-
- /**
diff --git a/system/icu/icu-63.1-test-failure.patch b/system/icu/icu-63.1-test-failure.patch
deleted file mode 100644
index f6be126ec..000000000
--- a/system/icu/icu-63.1-test-failure.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 0da942bd52ffdd3621689fbc4bf3017e75b001e3 Mon Sep 17 00:00:00 2001
-From: Fredrik Roubert <roubert@google.com>
-Date: Fri, 12 Oct 2018 14:33:03 +0200
-Subject: [PATCH] ICU-20080 Avoid strange compiler behaviour in ASSERT_EQUAL()
- macro.
-
-Using temporary variables for the two values to be compared here makes
-GCC compile the code just like we expect it to. (What it really is that
-it otherwise does on some architechtures remains a mystery.)
-
-This will make the tests pass as expected also on IA-32 with GCC.
-
-It'll also make it possible to revert the old workaround for SPARC
-introduced by commit 5b0592af79c7601d08cafcbbc7b71077faeb7e4f.
-
-Tested:
-
-Linux gcc45 3.16.0-5-686-pae #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) i686 GNU/Linux
-
-Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
-g++ (Debian 4.9.2-10+deb8u1) 4.9.2
-
-Linux gcc202 4.16.0-1-sparc64-smp #1 SMP Debian 4.16.5-1 (2018-04-29) sparc64 GNU/Linux
-
-clang version 4.0.1-10+sparc64 (tags/RELEASE_401/final)
-g++ (Debian 8.2.0-7) 8.2.0
----
- icu4c/source/test/intltest/dcfmapts.cpp | 21 +++++++++------------
- 1 file changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/icu4c/source/test/intltest/dcfmapts.cpp b/icu4c/source/test/intltest/dcfmapts.cpp
-index 6a79bab8509..9fa0e3deee4 100644
---- source/test/intltest/dcfmapts.cpp
-+++ source/test/intltest/dcfmapts.cpp
-@@ -636,8 +636,14 @@ void IntlTestDecimalFormatAPI::TestScale()
- }
-
-
--#define ASSERT_EQUAL(expect, actual) { char tmp[200]; sprintf(tmp, "(%g==%g)", (double)(expect), (double)(actual)); \
-- assertTrue(tmp, ((expect)==(actual)), FALSE, TRUE, __FILE__, __LINE__); }
-+#define ASSERT_EQUAL(expect, actual) { \
-+ /* ICU-20080: Use temporary variables to avoid strange compiler behaviour \
-+ (with the nice side-effect of avoiding repeated function calls too). */ \
-+ auto lhs = (expect); \
-+ auto rhs = (actual); \
-+ char tmp[200]; \
-+ sprintf(tmp, "(%g==%g)", (double)lhs, (double)rhs); \
-+ assertTrue(tmp, (lhs==rhs), FALSE, TRUE, __FILE__, __LINE__); }
-
- void IntlTestDecimalFormatAPI::TestFixedDecimal() {
- UErrorCode status = U_ZERO_ERROR;
-@@ -946,16 +952,7 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
- ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T));
- // note: going through DigitList path to FixedDecimal, which is trimming
- // int64_t fields to 18 digits. See ticket Ticket #10374
-- // ASSERT_EQUAL(223372036854775807LL, fd.getPluralOperand(PLURAL_OPERAND_I);
-- if (!(
-- fd.getPluralOperand(PLURAL_OPERAND_I) == 223372036854775807LL ||
-- fd.getPluralOperand(PLURAL_OPERAND_I) == 9223372036854775807LL)) {
-- dataerrln(
-- "File %s, Line %d, fd.getPluralOperand(PLURAL_OPERAND_I = %lld",
-- __FILE__,
-- __LINE__,
-- fd.getPluralOperand(PLURAL_OPERAND_I));
-- }
-+ ASSERT_EQUAL(223372036854775807LL, fd.getPluralOperand(PLURAL_OPERAND_I));
- ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
- ASSERT_EQUAL(FALSE, fd.isNegative());
-