This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug regex/611] New: regex with a long character sequence requires huge stack space
- From: "bonzini at gnu dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 17 Dec 2004 08:34:20 -0000
- Subject: [Bug regex/611] New: regex with a long character sequence requires huge stack space
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
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.