This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: genautomata fix


On Wed, Aug 25, 2010 at 12:51 PM, Bernd Schmidt <bernds@codesourcery.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?

Ok.

Thanks,
Richard.

>
> Bernd
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]