[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Was: [2 BUGs] posix/regcomp.c (2.3.2 and 2.3.3-2003-12-18)
From: |
Rene Rebe |
Subject: |
[PATCH] Was: [2 BUGs] posix/regcomp.c (2.3.2 and 2.3.3-2003-12-18) |
Date: |
Sun, 21 Dec 2003 02:38:34 +0100 (CET) |
Hi,
On: Sun, 21 Dec 2003 02:07:59 +0100 (CET),
Rene Rebe <address@hidden> wrote:
[...]
> The second is simillar but happening at a different place:
>
> grep -E -q '^[^#]*\bflistdel'
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0ff5d69c in calc_eclosure_iter (new_set=0x7ffff528, dfa=0x10024218,
> node=20,
> root=0) at regcomp.c:1578
> 1578 if (constraint && dfa->nodes[dfa->edests[node].elems[0]].duplicated)
[...]
> I try to add some workarounds - but since I'm not familiar with
> glibc's regex code it would be nice if some author could take a look
> ...
Ok - here goes a workaround which fixes the seg-fault but since I have
not the big picture of the regex code might only fix the syntoms ...
--- glibc-2.3.3-2003-12-18/posix/regcomp.c 2003-12-16 07:10:51.000000000
+0100
+++ glibc-2.3.3-2003-12-18-fixed/posix/regcomp.c 2003-12-21
01:26:01.000000000 +0100
@@ -1575,7 +1575,8 @@
? dfa->nodes[node].opr.ctx_type : 0);
/* If the current node has constraints, duplicate all nodes.
Since they must inherit the constraints. */
- if (constraint && !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
+ if (constraint && dfa->edests[node].nelem &&
+ !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
{
int org_node, cur_node;
org_node = cur_node = node;
Sincerely yours,
René Rebe
- ROCK Linux stable release maintainer
--
René Rebe - Europe/Germany/Berlin
address@hidden address@hidden
http://www.rocklinux.org http://www.rocklinux-consulting.de
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene