[pcre-dev] [Bug 1162] [regression] segfault since 8.13

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1162] [regression] segfault since 8.13
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1162




--- Comment #12 from Philip Hazel <ph10@???> 2011-10-07 15:49:41 ---
(In reply to comment #11)
> > Thanks for investigating this, Zoltan. I should be able to investigate a
> > little further later today or over the weekend. Have you tried the test
> > with the latest code in the svn?
>
> Yes it still has. I did some binary revision search and the jump happens in
> r618 (r617 does not suffer from this increase):
>
> [Pcre-svn] [618] code/trunk: Re-do atomic group processing to fix backtrack
> capture bugs.


Yes, that's it. The problem was that it was not backtracking through an atomic
group, and therefore not resetting capturing brackets inside it. Changing it to
do this has made the costs similar to non-atomic groups. I am not sure I can
fix this, but I will continue to think for a few days. It may be necessary to
have different opcodes for "atomic group that contains captures" vs "atomic
group without captures". The second could be handled the old way. (The JIT code
could of course treat them both the same.) I don't really like that, however.
Another possibility is to save/restore the capturing offsets as a block before
processing an atomic group, in the same way as is done for recursion.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email