From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13200 invoked by alias); 18 Nov 2004 02:06:09 -0000 Mailing-List: contact glibc-bugs-regex-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-regex-owner@sources.redhat.com Received: (qmail 13028 invoked by uid 48); 18 Nov 2004 02:06:03 -0000 Date: Thu, 18 Nov 2004 02:06:00 -0000 From: "vprodan dot hosting at artstyle dot ru" To: glibc-bugs-regex@sources.redhat.com Message-ID: <20041118020600.558.vprodan.hosting@artstyle.ru> Reply-To: sourceware-bugzilla@sources.redhat.com Subject: [Bug regex/558] New: regcomp and regexec bug X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg00051.txt.bz2 List-Id: Some regular expressions make regcomp to eat CPU and memory. Try run date |egrep '.{1,2048}' and enjoy the result if you're patient enough. Test case: #include #include int main(void) { char s[] = "/.{1,2048}.{1,2048}.{1,2048}.{1,2048}.{1,2048}/"; regex_t reg; int res; fprintf(stderr, "starting\n"); res = regcomp(®, s, REG_EXTENDED); fprintf(stderr, "regcomp(®, '%s', REG_EXTENDED) = %d\n", s, res); } This bug appeared in between 2.2.5 and 2.3: > date: 2002/02/27 19:00:56; author: drepper; state: Exp; lines: +7 -8399 > Check in complete rewrite. -- Summary: regcomp and regexec bug Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: regex AssignedTo: gotom at debian dot or dot jp ReportedBy: vprodan dot hosting at artstyle dot ru CC: glibc-bugs-regex at sources dot redhat dot com,glibc- bugs at sources dot redhat dot com,vprodan dot hosting at artstyle dot ru GCC build triplet: i686-pc-linux-gnu http://sources.redhat.com/bugzilla/show_bug.cgi?id=558 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.