This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] sed: Fix infinite loop on some false multi-bytematches
- From: Stanislav Brabec <sbrabec at suse dot cz>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: Aharon Robbins <arnold at skeeve dot com>,Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org,bug-gnu-utils at gnu dot org
- Date: Wed, 15 Feb 2012 19:57:27 +0100
- Subject: Re: [PATCH 1/3] sed: Fix infinite loop on some false multi-bytematches
- References: <201202121930.q1CJUKUi003938@skeeve.com> <1329323368.4963.61.camel@oct.suse.cz> <4F3BE125.3090400@gnu.org>
Paolo Bonzini wrote:
> On 02/15/2012 05:29 PM, Stanislav Brabec wrote:
> > int
> > main (void)
> > {
> > struct re_pattern_buffer r;
> > struct re_registers s;
> > int e, rc = 0;
> > if (setlocale (LC_CTYPE, "ja_JP.EUC-JP") == NULL)
> > {
> > puts ("setlocale failed");
> > return 1;
> > }
> > memset (&r, 0, sizeof (r));
> > memset (&s, 0, sizeof (s));
> > re_set_syntax (RE_SYNTAX_POSIX_BASIC | RE_NO_POSIX_BACKTRACKING);
>
> One difference is that sed sets RE_NO_SUB here.
ltrace of sed in the sed testcase shows 0x1050246, which matches
RE_SYNTAX_POSIX_BASIC | RE_NO_POSIX_BACKTRACKING
I did not see RE_NO_SUB (0x2000000) set there.
> I didn't try to run the program with the change, thouhg.
I just tested it. It still does not reproduce the problem.
--
Best Regards / S pozdravem,
Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz
Lihovarskà 1060/12 tel: +49 911 7405384547
190 00 Praha 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/