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

Page principale
Supprimer ce message
Auteur: Zoltan Herczeg
Date:  
À: pcre-dev
Sujet: [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 #13 from Zoltan Herczeg <hzmester@???> 2011-10-07 18:51:25 ---
> 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.
>


The JIT does the latter. It analyzes the atomic group at compile time and emits
code for saving those variables on the stack which might be changed inside the
atomic block (mostly capturing bracket offsets but start-of-match is saved as
well if necessary). Sometimes it does not need to save anything, that is the
best case.


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