[pcre-dev] [Bug 2470] "git grep" now crashes inside PCRE (JI…

Top Page

Reply to this message
Author: admin
Date:  
To: pcre-dev
Old-Topics: [pcre-dev] [Bug 2470] New: "git grep" now crashes inside PCRE (JIT) with gcc 2.95 / Haiku / x86
Subject: [pcre-dev] [Bug 2470] "git grep" now crashes inside PCRE (JIT) with gcc 2.95 / Haiku / x86
https://bugs.exim.org/show_bug.cgi?id=2470

Mehmet gelisin <mehmetgelisin@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mehmetgelisin@???


--- Comment #3 from Mehmet gelisin <mehmetgelisin@???> ---
PCRE had recursion quite some time before Perl did, but it was an addition to
the original design. It was implemented as an atomic call because that fitted
in with the way the code worked. http://www.compilatori.com/

Supporting non-atomic recursion would require a complete re-design. Roughly,
the explanation is that PCRE does not have the ability to remember backup
points inside a group that is active multiple times simultaneously (because
it's been called recursively). The same issue applies to repeated groups. PCRE
solves this by duplication: a group such as (A){2}
http://www.acpirateradio.co.uk/ is compiled as (A)(A) and if A is complex,
remembered backup points in the individual groups represent backups in specific
iterations. This does lead to large memory use when someone writes (A){100000},
for example.
https://waytowhatsnext.com/
The original plan (remember, this was in 1997, when Perl 4 was current and
patterns were a lot simpler) was to avoid the use of malloc() in the matching
function (pcre_exec), for better performance. http://www.logoarts.co.uk/ In
some circumstances this constraint has been broken, but in many cases it still
applies. To implement non-atomic recursions (and eliminate the duplication of
iterated groups) some new algorithm that involved some kind of explicit stack
would be required. http://www.slipstone.co.uk/ If I were starting from scratch
that is perhaps what I might do, but I do not think it is likely that I will do
anything now[*], though this issue, does, of course, remain on the wish list.

[*] and definitely not in the 8.xx series, which is in "maintenance only"
state.
http://embermanchester.uk/
PCRE had recursion quite some time before Perl did, but it was an addition to
the original design. It was implemented as an atomic call because that fitted
in with the way the code worked. Supporting http://connstr.net/ non-atomic
recursion would require a complete re-design. Roughly, the explanation is that
PCRE does not have the ability to remember backup points inside a group that is
active multiple times simultaneously (because it's been called recursively).
The same issue applies to repeated groups. http://www.jopspeech.com/ PCRE
solves this by duplication: a group such as (A){2} is compiled as (A)(A) and if
A is complex, remembered backup points in the individual groups represent
backups in specific iterations. This does lead to large memory use when someone
writes (A){100000}, for example.

The original plan (remember, this was in 1997, when Perl 4 was current and
patterns were a lot simpler) was to avoid the use of malloc() in the matching
function (pcre_exec), for better performance. In some circumstances this
constraint has been broken, but in many cases it still applies. To implement
non-atomic recursions (and eliminate the duplication of iterated groups) some
new algorithm that involved some kind of explicit stack would be required. If I
were starting from scratch http://www.wearelondonmade.com/
that is perhaps what I might do, but I do not think it is likely that I will
do anything now[*], though this issue, does, of course, remain on the wish
list.

[*] and definitely not in the 8.xx series, which is in "maintenance only"
state.
http://joerg.li/
PCRE had recursion quite some time before Perl did, but it was an addition to
the original design. It was implemented as an atomic call because that fitted
in with the way the code worked. Supporting non-atomic recursion would require
a complete re-design. Roughly, the explanation is that PCRE does not have the
ability to remember backup points inside a group that is active multiple times
simultaneously (because it's been called recursively). The same issue applies
to repeated groups. PCRE solves this by duplication: a group such as (A){2} is
compiled as (A)(A) and if A is complex, remembered backup points in the
individual groups represent backups in specific iterations. This does lead to
large memory use when someone writes (A){100000}, for example.

The original plan (remember, this was in 1997, when Perl 4 was current and
patterns were a lot simpler) was to avoid the use of malloc() in the matching
function (pcre_exec), https://www.webb-dev.co.uk/ for better performance. In
some circumstances this constraint has been broken, but in many cases it still
applies. To implement non-atomic recursions (and eliminate the duplication of
iterated groups) some new algorithm that involved
http://www.iu-bloomington.com/ some kind of explicit stack would be required.
If I were starting from scratch that is perhaps what I might do, but I do not
think it is likely that I will do anything now[*], though this issue, does, of
course, remain on the wish list. http://www-look-4.com/

[*] and definitely not in the 8.xx series, which is in "maintenance only"
state.

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