This is the mail archive of the
mailing list for the GCC project.
Re: genautomata fix
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 Aug 2010 12:55:25 +0200
- Subject: Re: genautomata fix
- References: <4C74F5B8.firstname.lastname@example.org>
On Wed, Aug 25, 2010 at 12:51 PM, Bernd Schmidt <email@example.com> wrote:
> This fixes a problem I found in genautomata while working on a new port.
> ?If you have extra parentheses in a regexp, e.g. "(s1)+s1w", we
> construct a copy of the string "r1" in alloca'd memory on the stack.
> Later, a pointer to that can escape because when there's only one
> element in a string, we use the original string rather than the copy we
> made on an obstack.
> The extra parentheses are there because the scheduling description is
> semi-generated and the input expression can expand to "(s1+x1)+s1w" in
> other cases.
> Fixed with this patch. ?Bootstrapped and regression tested on
> i686-linux. ?Ok?