diff options
author | he <he@pkgsrc.org> | 2009-03-25 22:30:19 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2009-03-25 22:30:19 +0000 |
commit | b301ed5fc4eaecedf3f74c665e34f5161d558ed9 (patch) | |
tree | 554164a1c6b5148a687a9fbf19278ef504e0510c /textproc | |
parent | a4bdf3c3f0076dfbd3a92741a69bfd2e3b9be3d6 (diff) | |
download | pkgsrc-b301ed5fc4eaecedf3f74c665e34f5161d558ed9.tar.gz |
Update from version 3.6nb2 to 4.0.1.
Pkgsrc changes:
o New MASTER_SITE
o Adjust PLIST
o Remove no-longer-needed patches, since corresponding changes
have been adopted upstream
o BUILDLINK_ABI_DEPENDS bumped to >=4.0, since a new shared library
version is installed
o Fixes security vulnerability, ref. below.
Dependent pkgsrc packages will have their revisions bumped shortly
due to the (possibly/probably) changed ABI.
Upstream changes:
4.0.1:
ICU4C 4.0.1 is a maintenance release of ICU4J 4.0. The primary
changes of this release were:
* Updated time zone data to 2008i
* Technical preview of string search implementation using
Boyer-Moore algorithm (#6286). For detail information, please
see the tech note here.
* #5691 Conversion: consistent illegal sequences
* #6435 Bad @stable ICU4.0 tags
* #6597 TestDisplayNamesMeta failure
* #6670 Test failure in format/TimeZoneTest/TestShortZoneIDs
4.0:
Major changes in ICU 4.0 include the following:
* Common Changes
o Unicode 5.1 (#5696)
o Locale Data: ICU uses and supports data from Common
Locale Data Repository (CLDR) 1.6 , which includes many
improvements in quality and quantity of data.
o add/removeLikelySubtags (#6124)
o Charset converter file size improvement (#5987)
o Date Interval Formatting (#6157) Note: Calendar type
supported by this feature is Gregorian only in this
release.
o Improved Plural support
* ICU4C Specific Changes
Additional Calendars
+ Chinese (#4081)
+ Coptic/Ethiopic (#4571)
* ICU4J Specific Changes
o Charset
+ Graduated from Technology Preview status
+ ICU2022 Converter (#5791)
+ HZ Converter (#6128)
+ SCSU/BOCU-1 Converter (#2147)
+ Charset Converter Callback (#6144)
o Thai Dictionary break iterator (#5385)
o JDK TimeZone support (#5975)
o Locale Service Provider (#5976)
o More convenient formatting of year+month, day+month,
and other combinations (#6304)
o Simple Duration Formatting (#6303)
* ICU4C Security Fixes
ICU4C 4.0 resolves the vulnerabilities CVE-2007-4770 and
CVE-2007-4771 which were found in earlier versions of ICU.
The standard ICU tests verify that these have been corrected,
however, the updated versions of the previous tests may be
run by applying the following patch to ICU 4.0: r24324. As
well, ICU4C and ICU4J 4.0 resolve the issue underlying
CVE-2008-1036.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/icu/Makefile | 11 | ||||
-rw-r--r-- | textproc/icu/PLIST | 51 | ||||
-rw-r--r-- | textproc/icu/buildlink3.mk | 4 | ||||
-rw-r--r-- | textproc/icu/distinfo | 14 | ||||
-rw-r--r-- | textproc/icu/patches/patch-ba | 89 | ||||
-rw-r--r-- | textproc/icu/patches/patch-bb | 47 | ||||
-rw-r--r-- | textproc/icu/patches/patch-bc | 28 | ||||
-rw-r--r-- | textproc/icu/patches/patch-bd | 81 | ||||
-rw-r--r-- | textproc/icu/patches/patch-be | 56 | ||||
-rw-r--r-- | textproc/icu/patches/patch-bf | 12 |
10 files changed, 46 insertions, 347 deletions
diff --git a/textproc/icu/Makefile b/textproc/icu/Makefile index c6af6fa52ca..4a16c76f54b 100644 --- a/textproc/icu/Makefile +++ b/textproc/icu/Makefile @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.57 2008/12/18 00:29:19 roy Exp $ +# $NetBSD: Makefile,v 1.58 2009/03/25 22:30:19 he Exp $ # -DISTNAME= icu4c-3_6-src -PKGNAME= icu-3.6 -PKGREVISION= 2 +DISTNAME= icu4c-4_0_1-src +PKGNAME= icu-4.0.1 CATEGORIES= textproc -MASTER_SITES= ftp://ftp.software.ibm.com/software/globalization/icu/${PKGVERSION_NOREV}/ +MASTER_SITES= http://download.icu-project.org/files/icu4c/4.0.1/ EXTRACT_SUFX= .tgz MAINTAINER= pkgsrc-users@NetBSD.org @@ -15,7 +14,7 @@ COMMENT= Robust and full-featured Unicode services PKG_DESTDIR_SUPPORT= user-destdir MAKE_JOBS_SAFE= no -WRKSRC= ${WRKDIR}/${PKGBASE}/source +WRKSRC= ${WRKDIR}/icu/source USE_TOOLS+= gmake USE_LANGUAGES= c c++ TEST_TARGET= check diff --git a/textproc/icu/PLIST b/textproc/icu/PLIST index 659ef9558a1..9561a7d8eb4 100644 --- a/textproc/icu/PLIST +++ b/textproc/icu/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.14 2007/03/31 15:36:57 obache Exp $ +@comment $NetBSD: PLIST,v 1.15 2009/03/25 22:30:19 he Exp $ bin/derb bin/genbrk bin/gencnval @@ -19,6 +19,12 @@ include/layout/LETypes.h include/layout/LayoutEngine.h include/layout/ParagraphLayout.h include/layout/RunArrays.h +include/layout/loengine.h +include/layout/playout.h +include/layout/plruns.h +include/unicode/basictz.h +include/unicode/bms.h +include/unicode/bmsearch.h include/unicode/brkiter.h include/unicode/calendar.h include/unicode/caniter.h @@ -26,6 +32,7 @@ include/unicode/chariter.h include/unicode/choicfmt.h include/unicode/coleitr.h include/unicode/coll.h +include/unicode/colldata.h include/unicode/curramt.h include/unicode/currunit.h include/unicode/datefmt.h @@ -34,6 +41,11 @@ include/unicode/dcfmtsym.h include/unicode/decimfmt.h include/unicode/docmain.h include/unicode/dtfmtsym.h +include/unicode/dtintrv.h +include/unicode/dtitvfmt.h +include/unicode/dtitvinf.h +include/unicode/dtptngen.h +include/unicode/dtrule.h include/unicode/fieldpos.h include/unicode/fmtable.h include/unicode/format.h @@ -48,11 +60,14 @@ include/unicode/numfmt.h include/unicode/parseerr.h include/unicode/parsepos.h include/unicode/platform.h +include/unicode/plurfmt.h +include/unicode/plurrule.h include/unicode/ppalmos.h include/unicode/putil.h include/unicode/pwin32.h include/unicode/rbbi.h include/unicode/rbnf.h +include/unicode/rbtz.h include/unicode/regex.h include/unicode/rep.h include/unicode/resbund.h @@ -67,6 +82,8 @@ include/unicode/symtable.h include/unicode/tblcoll.h include/unicode/timezone.h include/unicode/translit.h +include/unicode/tzrule.h +include/unicode/tztrans.h include/unicode/ubidi.h include/unicode/ubrk.h include/unicode/ucal.h @@ -85,6 +102,7 @@ include/unicode/ucsdet.h include/unicode/ucurr.h include/unicode/udat.h include/unicode/udata.h +include/unicode/udatpg.h include/unicode/udeprctd.h include/unicode/udraft.h include/unicode/uenum.h @@ -131,36 +149,36 @@ include/unicode/utrace.h include/unicode/utrans.h include/unicode/utypes.h include/unicode/uversion.h +include/unicode/vtzone.h lib/icu/${PKGVERSION}/Makefile.inc lib/icu/Makefile.inc lib/icu/current lib/libicudata.${SO_SUFFIX} -lib/libicudata.${SO_SUFFIX}.36 -lib/libicudata.${SO_SUFFIX}.36.0 +lib/libicudata.${SO_SUFFIX}.40 +lib/libicudata.${SO_SUFFIX}.40.1 lib/libicui18n.${SO_SUFFIX} -lib/libicui18n.${SO_SUFFIX}.36 -lib/libicui18n.${SO_SUFFIX}.36.0 +lib/libicui18n.${SO_SUFFIX}.40 +lib/libicui18n.${SO_SUFFIX}.40.1 lib/libicuio.${SO_SUFFIX} -lib/libicuio.${SO_SUFFIX}.36 -lib/libicuio.${SO_SUFFIX}.36.0 +lib/libicuio.${SO_SUFFIX}.40 +lib/libicuio.${SO_SUFFIX}.40.1 lib/libicule.${SO_SUFFIX} -lib/libicule.${SO_SUFFIX}.36 -lib/libicule.${SO_SUFFIX}.36.0 +lib/libicule.${SO_SUFFIX}.40 +lib/libicule.${SO_SUFFIX}.40.1 lib/libiculx.${SO_SUFFIX} -lib/libiculx.${SO_SUFFIX}.36 -lib/libiculx.${SO_SUFFIX}.36.0 +lib/libiculx.${SO_SUFFIX}.40 +lib/libiculx.${SO_SUFFIX}.40.1 lib/libicutu.${SO_SUFFIX} -lib/libicutu.${SO_SUFFIX}.36 -lib/libicutu.${SO_SUFFIX}.36.0 +lib/libicutu.${SO_SUFFIX}.40 +lib/libicutu.${SO_SUFFIX}.40.1 lib/libicuuc.${SO_SUFFIX} -lib/libicuuc.${SO_SUFFIX}.36 -lib/libicuuc.${SO_SUFFIX}.36.0 +lib/libicuuc.${SO_SUFFIX}.40 +lib/libicuuc.${SO_SUFFIX}.40.1 lib/libsicudata.a lib/libsicui18n.a lib/libsicuio.a lib/libsicule.a lib/libsiculx.a -lib/libsicutu.a lib/libsicuuc.a man/man1/derb.1 man/man1/genbrk.1 @@ -183,6 +201,7 @@ sbin/genuca sbin/icupkg sbin/icuswap share/icu/${PKGVERSION}/config/${MH_NAME} +share/icu/${PKGVERSION}/install-sh share/icu/${PKGVERSION}/license.html share/icu/${PKGVERSION}/mkinstalldirs @dirrm share/icu/${PKGVERSION}/config diff --git a/textproc/icu/buildlink3.mk b/textproc/icu/buildlink3.mk index 2554e1603fa..70f3ece1694 100644 --- a/textproc/icu/buildlink3.mk +++ b/textproc/icu/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.14 2009/03/20 19:25:29 joerg Exp $ +# $NetBSD: buildlink3.mk,v 1.15 2009/03/25 22:30:19 he Exp $ BUILDLINK_TREE+= icu @@ -6,7 +6,7 @@ BUILDLINK_TREE+= icu ICU_BUILDLINK3_MK:= BUILDLINK_API_DEPENDS.icu+= icu>=3.4 -BUILDLINK_ABI_DEPENDS.icu?= icu>=3.4nb1 +BUILDLINK_ABI_DEPENDS.icu?= icu>=4.0 BUILDLINK_PKGSRCDIR.icu?= ../../textproc/icu .endif # ICU_BUILDLINK3_MK diff --git a/textproc/icu/distinfo b/textproc/icu/distinfo index e771c1a2bfe..4b2d372eab9 100644 --- a/textproc/icu/distinfo +++ b/textproc/icu/distinfo @@ -1,15 +1,9 @@ -$NetBSD: distinfo,v 1.15 2008/03/20 17:07:54 drochner Exp $ +$NetBSD: distinfo,v 1.16 2009/03/25 22:30:19 he Exp $ -SHA1 (icu4c-3_6-src.tgz) = b580c2802e74eb6af7e5e19b05c7d7c5d8c623f9 -RMD160 (icu4c-3_6-src.tgz) = b227ac9ff6019362bc4d01c18433869b0e0ff1c2 -Size (icu4c-3_6-src.tgz) = 10183358 bytes +SHA1 (icu4c-4_0_1-src.tgz) = 65a65e9cd5670e113031def9448f65fb8f84f47a +RMD160 (icu4c-4_0_1-src.tgz) = e40e7ffddd3134a34fe7e7bc98d776c5b67b637c +Size (icu4c-4_0_1-src.tgz) = 12356471 bytes SHA1 (patch-aa) = b7299b3aac54410cb686980788dd0b6b435ae069 SHA1 (patch-ab) = 32d2aeb38ed84352751d0f3d8db5d8b433ef03e4 SHA1 (patch-ae) = 69caf7c0c226a0b45158a9620f045e943f00b820 SHA1 (patch-af) = df50984a17111a69c517b26f303866f2d384e857 -SHA1 (patch-ba) = d22f39715b85fe73654b644237d1956091fb26e8 -SHA1 (patch-bb) = 57683caee8c4bb2743332847f78566d5a3934e80 -SHA1 (patch-bc) = 9fd76fb53c7a464883fe5cc21ffbc5b5ac117711 -SHA1 (patch-bd) = 197017d9fb0a6a542e567cfae4512bc38a25ff79 -SHA1 (patch-be) = 9cb76ab05393b8d698c2b77b58b3db6c7b0b199c -SHA1 (patch-bf) = d03b55651686aeab965747c400753c8b7b643d80 diff --git a/textproc/icu/patches/patch-ba b/textproc/icu/patches/patch-ba deleted file mode 100644 index 064e925508a..00000000000 --- a/textproc/icu/patches/patch-ba +++ /dev/null @@ -1,89 +0,0 @@ -$NetBSD: patch-ba,v 1.1 2008/03/20 17:07:54 drochner Exp $ - ---- common/uvectr32.cpp.orig 2003-08-27 03:01:30.000000000 +0200 -+++ common/uvectr32.cpp -@@ -1,6 +1,6 @@ - /* - ****************************************************************************** --* Copyright (C) 1999-2003, International Business Machines Corporation and * -+* Copyright (C) 1999-2008, International Business Machines Corporation and * - * others. All Rights Reserved. * - ****************************************************************************** - * Date Name Description -@@ -26,6 +26,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UVect - UVector32::UVector32(UErrorCode &status) : - count(0), - capacity(0), -+ maxCapacity(0), - elements(NULL) - { - _init(DEFUALT_CAPACITY, status); -@@ -34,6 +35,7 @@ UVector32::UVector32(UErrorCode &status) - UVector32::UVector32(int32_t initialCapacity, UErrorCode &status) : - count(0), - capacity(0), -+ maxCapacity(0), - elements(0) - { - _init(initialCapacity, status); -@@ -46,6 +48,9 @@ void UVector32::_init(int32_t initialCap - if (initialCapacity < 1) { - initialCapacity = DEFUALT_CAPACITY; - } -+ if (maxCapacity>0 && maxCapacity<initialCapacity) { -+ initialCapacity = maxCapacity; -+ } - elements = (int32_t *)uprv_malloc(sizeof(int32_t)*initialCapacity); - if (elements == 0) { - status = U_MEMORY_ALLOCATION_ERROR; -@@ -189,21 +194,35 @@ int32_t UVector32::indexOf(int32_t key, - UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { - if (capacity >= minimumCapacity) { - return TRUE; -- } else { -- int32_t newCap = capacity * 2; -- if (newCap < minimumCapacity) { -- newCap = minimumCapacity; -- } -- int32_t* newElems = (int32_t *)uprv_malloc(sizeof(int32_t)*newCap); -- if (newElems == 0) { -- status = U_MEMORY_ALLOCATION_ERROR; -- return FALSE; -- } -- uprv_memcpy(newElems, elements, sizeof(elements[0]) * count); -- uprv_free(elements); -- elements = newElems; -- capacity = newCap; -- return TRUE; -+ } -+ if (maxCapacity>0 && minimumCapacity>maxCapacity) { -+ status = U_BUFFER_OVERFLOW_ERROR; -+ return FALSE; -+ } -+ int32_t newCap = capacity * 2; -+ if (newCap < minimumCapacity) { -+ newCap = minimumCapacity; -+ } -+ if (maxCapacity > 0 && newCap > maxCapacity) { -+ newCap = maxCapacity; -+ } -+ int32_t* newElems = (int32_t *)uprv_malloc(sizeof(int32_t)*newCap); -+ if (newElems == 0) { -+ status = U_MEMORY_ALLOCATION_ERROR; -+ return FALSE; -+ } -+ uprv_memcpy(newElems, elements, sizeof(elements[0]) * count); -+ uprv_free(elements); -+ elements = newElems; -+ capacity = newCap; -+ return TRUE; -+} -+ -+void UVector32::setMaxCapacity(int32_t limit) { -+ U_ASSERT(limit >= 0); -+ maxCapacity = limit; -+ if (maxCapacity < 0) { -+ maxCapacity = 0; - } - } - diff --git a/textproc/icu/patches/patch-bb b/textproc/icu/patches/patch-bb deleted file mode 100644 index 6afdd72306c..00000000000 --- a/textproc/icu/patches/patch-bb +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-bb,v 1.1 2008/03/20 17:07:54 drochner Exp $ - ---- common/uvectr32.h.orig 2006-01-18 04:52:04.000000000 +0100 -+++ common/uvectr32.h -@@ -1,6 +1,6 @@ - /* - ********************************************************************** --* Copyright (C) 1999-2006, International Business Machines -+* Copyright (C) 1999-2008, International Business Machines - * Corporation and others. All Rights Reserved. - ********************************************************************** - */ -@@ -61,6 +61,8 @@ private: - int32_t count; - - int32_t capacity; -+ -+ int32_t maxCapacity; // Limit beyond which capacity is not permitted to grow. - - int32_t* elements; - -@@ -162,6 +164,14 @@ public: - int32_t *getBuffer() const; - - /** -+ * Set the maximum allowed buffer capacity for this vector/stack. -+ * Default with no limit set is unlimited, go until malloc() fails. -+ * A Limit of zero means unlimited capacity. -+ * Units are vector elements (32 bits each), not bytes. -+ */ -+ void setMaxCapacity(int32_t limit); -+ -+ /** - * ICU "poor man's RTTI", returns a UClassID for this class. - */ - static UClassID U_EXPORT2 getStaticClassID(); -@@ -221,7 +231,9 @@ inline void UVector32::addElement(int32_ - } - - inline int32_t *UVector32::reserveBlock(int32_t size, UErrorCode &status) { -- ensureCapacity(count+size, status); -+ if (ensureCapacity(count+size, status) == FALSE) { -+ return NULL; -+ } - int32_t *rp = elements+count; - count += size; - return rp; diff --git a/textproc/icu/patches/patch-bc b/textproc/icu/patches/patch-bc deleted file mode 100644 index 1798d18abcb..00000000000 --- a/textproc/icu/patches/patch-bc +++ /dev/null @@ -1,28 +0,0 @@ -$NetBSD: patch-bc,v 1.1 2008/03/20 17:07:54 drochner Exp $ - ---- i18n/regexcmp.cpp.orig 2006-02-02 05:37:14.000000000 +0100 -+++ i18n/regexcmp.cpp -@@ -1187,14 +1187,17 @@ UBool RegexCompile::doParseActions(EPars - // Because capture groups can be forward-referenced by back-references, - // we fill the operand with the capture group number. At the end - // of compilation, it will be changed to the variable's location. -- U_ASSERT(groupNum > 0); -- int32_t op; -- if (fModeFlags & UREGEX_CASE_INSENSITIVE) { -- op = URX_BUILD(URX_BACKREF_I, groupNum); -+ if (groupNum < 1) { -+ error(U_REGEX_INVALID_BACK_REF); - } else { -- op = URX_BUILD(URX_BACKREF, groupNum); -+ int32_t op; -+ if (fModeFlags & UREGEX_CASE_INSENSITIVE) { -+ op = URX_BUILD(URX_BACKREF_I, groupNum); -+ } else { -+ op = URX_BUILD(URX_BACKREF, groupNum); -+ } -+ fRXPat->fCompiledPat->addElement(op, *fStatus); - } -- fRXPat->fCompiledPat->addElement(op, *fStatus); - } - break; - diff --git a/textproc/icu/patches/patch-bd b/textproc/icu/patches/patch-bd deleted file mode 100644 index b4193efbf2a..00000000000 --- a/textproc/icu/patches/patch-bd +++ /dev/null @@ -1,81 +0,0 @@ -$NetBSD: patch-bd,v 1.1 2008/03/20 17:07:54 drochner Exp $ - ---- i18n/rematch.cpp.orig 2005-08-25 20:02:20.000000000 +0200 -+++ i18n/rematch.cpp -@@ -30,6 +30,15 @@ - - U_NAMESPACE_BEGIN - -+// Limit the size of the back track stack, to avoid system failures caused -+// by heap exhaustion. Units are in 32 bit words, not bytes. -+// This value puts ICU's limits higher than most other regexp implementations, -+// which use recursion rather than the heap, and take more storage per -+// backtrack point. -+// This constant is _temporary_. Proper API to control the value will added. -+// -+static const int32_t BACKTRACK_STACK_CAPACITY = 8000000; -+ - //----------------------------------------------------------------------------- - // - // Constructor and Destructor -@@ -53,6 +62,8 @@ RegexMatcher::RegexMatcher(const RegexPa - } - if (fStack == NULL || fData == NULL) { - fDeferredStatus = U_MEMORY_ALLOCATION_ERROR; -+ } else { -+ fStack->setMaxCapacity(BACKTRACK_STACK_CAPACITY); - } - - reset(*RegexStaticSets::gStaticSets->fEmptyString); -@@ -78,6 +89,8 @@ RegexMatcher::RegexMatcher(const Unicode - } - if (fStack == NULL || fData == NULL) { - status = U_MEMORY_ALLOCATION_ERROR; -+ } else { -+ fStack->setMaxCapacity(BACKTRACK_STACK_CAPACITY); - } - reset(input); - } -@@ -102,6 +115,8 @@ RegexMatcher::RegexMatcher(const Unicode - } - if (fStack == NULL || fData == NULL) { - status = U_MEMORY_ALLOCATION_ERROR; -+ } else { -+ fStack->setMaxCapacity(BACKTRACK_STACK_CAPACITY); - } - reset(*RegexStaticSets::gStaticSets->fEmptyString); - } -@@ -1015,6 +1030,14 @@ UBool RegexMatcher::isUWordBoundary(int3 - inline REStackFrame *RegexMatcher::StateSave(REStackFrame *fp, int32_t savePatIdx, int32_t frameSize, UErrorCode &status) { - // push storage for a new frame. - int32_t *newFP = fStack->reserveBlock(frameSize, status); -+ if (newFP == NULL) { -+ // Heap allocation error on attempted stack expansion. -+ // We need to return a writable stack frame, so just return the -+ // previous frame. The match operation will stop quickly -+ // becuase of the error status, after which the frame will never -+ // be looked at again. -+ return fp; -+ } - fp = (REStackFrame *)(newFP - frameSize); // in case of realloc of stack. - - // New stack frame = copy of old top frame. -@@ -1030,8 +1053,8 @@ inline REStackFrame *RegexMatcher::State - fp->fPatIdx = savePatIdx; - return (REStackFrame *)newFP; - } -- -- -+ -+ - //-------------------------------------------------------------------------------- - // - // MatchAt This is the actual matching engine. -@@ -2262,6 +2285,7 @@ GC_Done: - } - - if (U_FAILURE(status)) { -+ isMatch = FALSE; - break; - } - } diff --git a/textproc/icu/patches/patch-be b/textproc/icu/patches/patch-be deleted file mode 100644 index 08d698736f4..00000000000 --- a/textproc/icu/patches/patch-be +++ /dev/null @@ -1,56 +0,0 @@ -$NetBSD: patch-be,v 1.1 2008/03/20 17:07:54 drochner Exp $ - ---- test/intltest/regextst.cpp.orig 2005-07-05 20:39:00.000000000 +0200 -+++ test/intltest/regextst.cpp -@@ -66,6 +66,10 @@ void RegexTest::runIndexedTest( int32_t - case 6: name = "PerlTests"; - if (exec) PerlTests(); - break; -+ case 7: name = "Bug 6149"; -+ if (exec) Bug6149(); -+ break; -+ - - - default: name = ""; -@@ -1637,6 +1641,13 @@ void RegexTest::Errors() { - // UnicodeSet containing a string - REGEX_ERR("abc[{def}]xyz", 1, 10, U_REGEX_SET_CONTAINS_STRING); - -+ -+ // Invalid Back Reference \0 -+ // For ICU 3.8 and earlier -+ // For ICU versions newer than 3.8, \0 introduces an octal escape. -+ // -+ REGEX_ERR("(ab)\\0", 1, 6, U_REGEX_INVALID_BACK_REF); -+ - } - - -@@ -2119,6 +2130,26 @@ void RegexTest::PerlTests() { - } - - -+//-------------------------------------------------------------- -+// -+// Bug6149 Verify limits to heap expansion for backtrack stack. -+// Use this pattern, -+// "(a?){1,}" -+// The zero-length match will repeat forever. -+// (That this goes into a loop is another bug) -+// -+//--------------------------------------------------------------- -+void RegexTest::Bug6149() { -+ UnicodeString pattern("(a?){1,}"); -+ UnicodeString s("xyz"); -+ uint32_t flags = 0; -+ UErrorCode status = U_ZERO_ERROR; -+ -+ RegexMatcher matcher(pattern, s, flags, status); -+ UBool result = false; -+ REGEX_ASSERT_FAIL(result=matcher.matches(status), U_BUFFER_OVERFLOW_ERROR); -+ REGEX_ASSERT(result == FALSE); -+ } - - #endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS */ - diff --git a/textproc/icu/patches/patch-bf b/textproc/icu/patches/patch-bf deleted file mode 100644 index 5095edab159..00000000000 --- a/textproc/icu/patches/patch-bf +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-bf,v 1.1 2008/03/20 17:07:54 drochner Exp $ - ---- test/intltest/regextst.h.orig 2003-12-03 07:58:28.000000000 +0100 -+++ test/intltest/regextst.h -@@ -30,6 +30,7 @@ public: - virtual void Extended(); - virtual void Errors(); - virtual void PerlTests(); -+ virtual void Bug6149(); - - // The following functions are internal to the regexp tests. - virtual UBool doRegexLMTest(const char *pat, const char *text, UBool looking, UBool match, int line); |