diff options
author | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2016-07-01 09:06:38 +0000 |
---|---|---|
committer | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2016-07-01 09:06:38 +0000 |
commit | 575b84a7bcbd63f54d933804ea5036642b93c0f7 (patch) | |
tree | e271114f06a871e0f1ca98ed6d4855fb97a2ccaf | |
parent | e4b4f4a81dd8c4086ea327c552a388d969a4280b (diff) | |
download | pcre-575b84a7bcbd63f54d933804ea5036642b93c0f7.tar.gz |
Fix register overwite in JIT when SSE2 acceleration is enabled.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1660 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | pcre_jit_compile.c | 4 | ||||
-rw-r--r-- | pcre_jit_test.c | 1 |
3 files changed, 7 insertions, 4 deletions
@@ -9,10 +9,12 @@ Version 8.40 17-June-2016 1. Using -o with -M in pcregrep could cause unnecessary repeated output when the match extended over a line boundary. - + 2. Applied Chris Wilson's second patch (Bugzilla #1681) to CMakeLists.txt for MSVC static compilation, putting the first patch under a new option. - + +3. Fix register overwite in JIT when SSE2 acceleration is enabled. + Version 8.39 14-June-2016 ------------------------- diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c index 4f15a27..46ce6c6 100644 --- a/pcre_jit_compile.c +++ b/pcre_jit_compile.c @@ -4004,12 +4004,12 @@ sljit_emit_op_custom(compiler, instruction, 4); if (load_twice) { - OP1(SLJIT_MOV, TMP3, 0, TMP2, 0); + OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP2, 0); instruction[3] = 0xc0 | (tmp2_ind << 3) | 1; sljit_emit_op_custom(compiler, instruction, 4); OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0); - OP1(SLJIT_MOV, TMP2, 0, TMP3, 0); + OP1(SLJIT_MOV, TMP2, 0, RETURN_ADDR, 0); } OP2(SLJIT_ASHR, TMP1, 0, TMP1, 0, TMP2, 0); diff --git a/pcre_jit_test.c b/pcre_jit_test.c index 9b61ec0..034cb52 100644 --- a/pcre_jit_test.c +++ b/pcre_jit_test.c @@ -687,6 +687,7 @@ static struct regression_test_case regression_test_cases[] = { { PCRE_FIRSTLINE | PCRE_NEWLINE_LF | PCRE_DOTALL, 0 | F_NOMATCH, "ab.", "ab" }, { MUA | PCRE_FIRSTLINE, 1 | F_NOMATCH, "^[a-d0-9]", "\nxx\nd" }, { PCRE_NEWLINE_ANY | PCRE_FIRSTLINE | PCRE_DOTALL, 0, "....a", "012\n0a" }, + { MUA | PCRE_FIRSTLINE, 0, "[aC]", "a" }, /* Recurse. */ { MUA, 0, "(a)(?1)", "aa" }, |