[pcre-dev] [Bug 2094] PCRE 8.40 with JIT mode enabled genera…

Góra strony
Delete this message
Autor: admin
Data:  
Dla: pcre-dev
Temat: [pcre-dev] [Bug 2094] PCRE 8.40 with JIT mode enabled generates invalid memory read warnings
https://bugs.exim.org/show_bug.cgi?id=2094

--- Comment #2 from Datong Sun <datong@???> ---
(In reply to Zoltan Herczeg from comment #1)
> I think this is a known side effect of the SSE2 optimization in PCRE-JIT.
> The optimized algorithm reads aligned 16 byte data packets which might cross
> the boundary of the input (subject) buffer, and valgrind reports this as an
> error. However this is a valid operation, since the read is aligned, so it
> can never cause a memory read error. Of course the algorithm ignores data
> outside of the input buffer boundaries.
>
> To confirm this please change the following line in pcre_jit_compile.c:
>
> if (sljit_x86_is_sse2_available())
>
> to:
>
> if (false)
>
> and check whether the error disappears.


Thanks for looking into this. I can confirm the issue goes away once I disable
the SSE2 optimization branch.

It would be nice if we can disable such optimization with --enable-valgrind to
get rid of the false positive. This aids the debugging of programs using
libpcre greatly.

Thanks,
Datong

--
You are receiving this mail because:
You are on the CC list for the bug.