public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/611] New: regex with a long character sequence requires huge stack space
@ 2004-12-17  8:34 bonzini at gnu dot org
  2004-12-17  8:38 ` [Bug regex/611] " bonzini at gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bonzini at gnu dot org @ 2004-12-17  8:34 UTC (permalink / raw)
  To: glibc-bugs-regex

The parse tree produced by concat nodes is extremely unbalanced.  With an 8 MB 
stack,

perl -e "print 's/' . ('a' x 300000) . '//'" > huge
sed -f huge

segfaults in calc_first.  Of course with a lower stack size it takes much 
shorter regexes to trigger the bug, and anyway this is not nice behavior (ok, 
regex is a memory hog but at least it usually gives REG_ESPACE).

With a 512 KB stack, even compiling a{32767} segfaults.

-- 
           Summary: regex with a long character sequence requires huge stack
                    space
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
        AssignedTo: bonzini at gnu dot org
        ReportedBy: bonzini at gnu dot org
                CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
                    bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=611

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2005-01-26 22:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-17  8:34 [Bug regex/611] New: regex with a long character sequence requires huge stack space bonzini at gnu dot org
2004-12-17  8:38 ` [Bug regex/611] " bonzini at gnu dot org
2004-12-20 10:22 ` bonzini at gnu dot org
2004-12-27  9:57 ` bonzini at gnu dot org
2004-12-27 15:11 ` bonzini at gnu dot org
2004-12-27 16:43 ` drepper at redhat dot com
2004-12-28 16:34 ` bonzini at gnu dot org
2005-01-26 22:28 ` drepper at redhat dot com
2005-01-26 22:43 ` drepper at redhat dot com

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).