[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regex problems
From: |
Paul Eggert |
Subject: |
Re: regex problems |
Date: |
Sat, 20 Aug 2005 22:03:18 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Sam Steingold <address@hidden> writes:
> Would you please also consider the 2 patches in
> <http://article.gmane.org/gmane.comp.lib.gnulib.bugs:3996>
Thanks for reporting those. I installed the first patch as I
described earlier. The second patch is not correct, though, so I
installed the following instead (and reported the bug to glibc):
2005-08-20 Paul Eggert <address@hidden>
* config/srclist.txt: Add glibc bug 1227.
* lib/regexec.c (sift_states_bkref): Fix portability bug: the code
assumed that reg_errcode_t is a signed type, which is not
necessarily true if _XOPEN_SOURCE is not defined.
--- config/srclist.txt 21 Aug 2005 03:31:46 -0000 1.77
+++ config/srclist.txt 21 Aug 2005 05:00:31 -0000
@@ -121,6 +121,7 @@ $LIBCSRC/posix/regex.c lib gpl
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1216
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1220
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1225
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1227
#$LIBCSRC/posix/regexec.c lib gpl
#
# c89 changes $LIBCSRC/string/strdup.c lib gpl
--- lib/regexec.c 21 Aug 2005 00:43:34 -0000 1.4
+++ lib/regexec.c 21 Aug 2005 05:00:32 -0000
@@ -2088,7 +2088,7 @@ sift_states_bkref (re_match_context_t *m
enabled_idx = first_idx;
do
{
- int subexp_len, to_idx, dst_node;
+ int subexp_len, to_idx, dst_node, ret;
re_dfastate_t *cur_state;
if (entry->node != node)
@@ -2114,8 +2114,8 @@ sift_states_bkref (re_match_context_t *m
}
local_sctx.last_node = node;
local_sctx.last_str_idx = str_idx;
- err = re_node_set_insert (&local_sctx.limits, enabled_idx);
- if (BE (err < 0, 0))
+ ret = re_node_set_insert (&local_sctx.limits, enabled_idx);
+ if (BE (ret < 0, 0))
{
err = REG_ESPACE;
goto free_return;