public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated +
       [not found] <bug-20095-131@http.sourceware.org/bugzilla/>
@ 2020-04-15 15:53 ` dpmendenhall at gmail dot com
  2023-08-24 15:14 ` jwakely.gcc at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: dpmendenhall at gmail dot com @ 2020-04-15 15:53 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=20095

David Mendenhall <dpmendenhall at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dpmendenhall at gmail dot com

--- Comment #2 from David Mendenhall <dpmendenhall at gmail dot com> ---
*** Bug 25814 has been marked as a duplicate of this bug. ***

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated +
       [not found] <bug-20095-131@http.sourceware.org/bugzilla/>
  2020-04-15 15:53 ` [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated + dpmendenhall at gmail dot com
@ 2023-08-24 15:14 ` jwakely.gcc at gmail dot com
  2023-08-24 20:21 ` adhemerval.zanella at linaro dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: jwakely.gcc at gmail dot com @ 2023-08-24 15:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=20095

Jonathan Wakely <jwakely.gcc at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jwakely.gcc at gmail dot com

--- Comment #3 from Jonathan Wakely <jwakely.gcc at gmail dot com> ---
This behaviour can rapidly exhaust memory (Bug 25814, Bug 28864, Bug 20095
, Bug 29642), which seems unhelpful when ".++" is not even a valid regex. POSIX
says it's undefined:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_06

Why doesn't regcomp just fail to compile it with REG_BADRPT?

Similarly for ".**" etc.

GNU grep seems to have tests for these that expect BADRPT:
https://git.savannah.gnu.org/cgit/grep.git/tree/tests/tests?h=v3.11#n234

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated +
       [not found] <bug-20095-131@http.sourceware.org/bugzilla/>
  2020-04-15 15:53 ` [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated + dpmendenhall at gmail dot com
  2023-08-24 15:14 ` jwakely.gcc at gmail dot com
@ 2023-08-24 20:21 ` adhemerval.zanella at linaro dot org
  2023-08-24 20:28 ` jwakely.gcc at gmail dot com
  2023-08-24 22:43 ` sh200105 at mail dot ru
  4 siblings, 0 replies; 5+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-08-24 20:21 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=20095

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #4 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
I am not sure who exactly GNU grep handles this since it also uses gnulib regex
code. Is this code really being tested by GNU grep? I deleted the fil, make
check, and it seems not to affect the test's outcome.

I also tried to sync with gnulib master, but it also does not help.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated +
       [not found] <bug-20095-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-08-24 20:21 ` adhemerval.zanella at linaro dot org
@ 2023-08-24 20:28 ` jwakely.gcc at gmail dot com
  2023-08-24 22:43 ` sh200105 at mail dot ru
  4 siblings, 0 replies; 5+ messages in thread
From: jwakely.gcc at gmail dot com @ 2023-08-24 20:28 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=20095

--- Comment #5 from Jonathan Wakely <jwakely.gcc at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #4)
> Is this code really being tested by GNU grep?

No idea - I grepped the grep code for cases of '++' and found those tests, I
don't know if they're actually run or not.

FWIW, Solaris 2.11 and AIX 7.3 both have the same behaviour for "a++"

jwakely@gcc-solaris11:~$ /usr/xpg4/bin/grep -E  a++ <<< a
a

$ /usr/bin/grep -E  a++ <<< a
a


So maybe POSIX says it's undefined to allow for this traditional/common
behaviour.

Glibc's support for it seems poor though, given the memory exhaustion problems.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated +
       [not found] <bug-20095-131@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-08-24 20:28 ` jwakely.gcc at gmail dot com
@ 2023-08-24 22:43 ` sh200105 at mail dot ru
  4 siblings, 0 replies; 5+ messages in thread
From: sh200105 at mail dot ru @ 2023-08-24 22:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=20095

Alexander Kernozhitsky <sh200105 at mail dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sh200105 at mail dot ru

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-24 22:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20095-131@http.sourceware.org/bugzilla/>
2020-04-15 15:53 ` [Bug regex/20095] parse_dup_op duplicates the tree exponentially when using repeated + dpmendenhall at gmail dot com
2023-08-24 15:14 ` jwakely.gcc at gmail dot com
2023-08-24 20:21 ` adhemerval.zanella at linaro dot org
2023-08-24 20:28 ` jwakely.gcc at gmail dot com
2023-08-24 22:43 ` sh200105 at mail dot ru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).