This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regex/611] New: regex with a long character sequence requires huge stack space


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]