diff options
author | Patrik Nyblom <[email protected]> | 2013-08-16 11:37:54 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-08-16 11:37:54 +0200 |
commit | 5d9a587a8fcc164e02f043959338edec2ff69381 (patch) | |
tree | 554f05a944777622b30031724010f6f31707565b /erts/emulator/pcre/pcre-8.33_1370.diff | |
parent | 23610dbfc1c409f83349e9e293dd3cfc1f74d497 (diff) | |
parent | 52cb62b7930d9c7b9e04a210ff6b02946f27ae79 (diff) | |
download | otp-5d9a587a8fcc164e02f043959338edec2ff69381.tar.gz otp-5d9a587a8fcc164e02f043959338edec2ff69381.tar.bz2 otp-5d9a587a8fcc164e02f043959338edec2ff69381.zip |
Merge branch 'pan/update_pcre_8.33'
* pan/update_pcre_8.33:
Workaround TR gnu/181328, GCC 4.2.1 20070831 on FreeBSD 9.1
Clarify relation between erts_iolist_{size|to_buf}
Fix backslash in titles of manpages
Correct UTF-8 in stdlib's notes.xml
Add more tests for corner error cases in erl_bif_re.c
Add documentation of report_errors and match_limit(_recursion)
Add match_limit and match_limit_recursion options
Add return_errors option to re:run/3
Add README for updating PCRE
Add documentation of extensions to re module
Add new options to Erlang re interface and mend dupnames
Update PCRE doc part of re.xml to PCRE 8.33 state
Integrate new PCRE test suites
Integrate patch for PCRE bug id 1370
Handle CRLF correctly in global regexp
Add erts_prefix to pcre_library and update erl_bif_re
Update to PCRE 8.33, w/o the erts_ prefix added
OTP-11204
OTP-11205
OTP-10285
Diffstat (limited to 'erts/emulator/pcre/pcre-8.33_1370.diff')
-rw-r--r-- | erts/emulator/pcre/pcre-8.33_1370.diff | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/erts/emulator/pcre/pcre-8.33_1370.diff b/erts/emulator/pcre/pcre-8.33_1370.diff new file mode 100644 index 0000000000..d62398985d --- /dev/null +++ b/erts/emulator/pcre/pcre-8.33_1370.diff @@ -0,0 +1,60 @@ +--- code/trunk/pcre_exec.c 2013/07/02 18:37:36 1346 ++++ code/trunk/pcre_exec.c 2013/07/26 10:03:38 1350 +@@ -5637,7 +5637,7 @@ + } + } + +- /* Match extended Unicode sequences. We will get here only if the ++ /* Match extended Unicode grapheme clusters. We will get here only if the + support is in the binary; otherwise a compile-time error occurs. */ + + else if (ctype == OP_EXTUNI) +@@ -5670,21 +5670,41 @@ + /* eptr is now past the end of the maximum run */ + + if (possessive) continue; /* No backtracking */ ++ + for(;;) + { +- if (eptr == pp) goto TAIL_RECURSE; ++ int lgb, rgb; ++ PCRE_PUCHAR fptr; ++ ++ if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */ + RMATCH(eptr, ecode, offset_top, md, eptrb, RM45); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); ++ ++ /* Backtracking over an extended grapheme cluster involves inspecting ++ the previous two characters (if present) to see if a break is ++ permitted between them. */ ++ + eptr--; +- for (;;) /* Move back over one extended */ ++ if (!utf) c = *eptr; else ++ { ++ BACKCHAR(eptr); ++ GETCHAR(c, eptr); ++ } ++ rgb = UCD_GRAPHBREAK(c); ++ ++ for (;;) + { +- if (!utf) c = *eptr; else ++ if (eptr == pp) goto TAIL_RECURSE; /* At start of char run */ ++ fptr = eptr - 1; ++ if (!utf) c = *fptr; else + { +- BACKCHAR(eptr); +- GETCHAR(c, eptr); ++ BACKCHAR(fptr); ++ GETCHAR(c, fptr); + } +- if (UCD_CATEGORY(c) != ucp_M) break; +- eptr--; ++ lgb = UCD_GRAPHBREAK(c); ++ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break; ++ eptr = fptr; ++ rgb = lgb; + } + } + } |