diff options
author | chpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-11-03 19:21:41 +0000 |
---|---|---|
committer | chpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2012-11-03 19:21:41 +0000 |
commit | fc3be1f1b44baf703b36aed18cadfc3833908ef3 (patch) | |
tree | 5c75b4de6cf065bf1aa9d3419a4cc791861e914a /pcretest.c | |
parent | 32d316a0ee9cd95c2f0f02b65759256eea89ea13 (diff) | |
download | pcre-fc3be1f1b44baf703b36aed18cadfc3833908ef3.tar.gz |
Temporarily remove 32-bit masking
Remove the masking via the PCRE_NO_UTF32_CHECK. It will be reintroduced as a
dedicated runtime option later, with support for JIT and non-JIT cases.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1200 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r-- | pcretest.c | 24 |
1 files changed, 1 insertions, 23 deletions
@@ -2102,8 +2102,6 @@ return yield; /* Must handle UTF-32 strings in utf mode. Yields number of characters printed. If handed a NULL file, just counts chars without printing. */ -#define UTF32_MASK (0x1fffffu) - static int pchars32(PCRE_SPTR32 p, int length, BOOL utf, FILE *f) { int yield = 0; @@ -2114,7 +2112,6 @@ if (length < 0) while (length-- > 0) { pcre_uint32 c = *p++; - if (utf) c &= UTF32_MASK; yield += pchar(c, f); } @@ -2942,9 +2939,6 @@ int done = 0; int all_use_dfa = 0; int verify_jit = 0; int yield = 0; -#ifdef SUPPORT_PCRE32 -int mask_utf32 = 0; -#endif int stack_size; pcre_uint8 *dbuffer = NULL; size_t dbuffer_size = 1u << 14; @@ -3056,11 +3050,10 @@ while (argc > 1 && argv[op][0] == '-') exit(1); #endif } - else if (strcmp(arg, "-32") == 0 || strcmp(arg, "-32+") == 0) + else if (strcmp(arg, "-32") == 0) { #ifdef SUPPORT_PCRE32 pcre_mode = PCRE32_MODE; - mask_utf32 = (strcmp(arg, "-32+") == 0); #else printf("** This version of PCRE was built without 32-bit support\n"); exit(1); @@ -4821,21 +4814,6 @@ while (!done) } #endif -#if defined SUPPORT_UTF && defined SUPPORT_PCRE32 - /* If we're requsted to test UTF-32 masking of high bits, change the data - string to have high bits set, unless the string is invalid UTF-32. - Since the JIT doesn't support this yet, only do it when not JITing. */ - if (use_utf && mask_utf32 && (study_options & PCRE_STUDY_ALLJIT) == 0 && - valid_utf32((pcre_uint32 *)dbuffer, len)) - { - for (q32 = (pcre_uint32 *)dbuffer; *q32; q32++) - *q32 |= ~(pcre_uint32)UTF32_MASK; - - /* Need to pass NO_UTF32_CHECK so the high bits are allowed */ - options |= PCRE_NO_UTF32_CHECK; - } -#endif - /* If we're compiling with explicit valgrind support, Mark the data from after its end to the end of the buffer as unaddressable, so that a read over the end of the buffer will be seen by valgrind, even if it doesn't cause a crash. |