> This patch fixes a segfault when more than one function is
> defined in the IR input.
> 

>  
>       for (ap = arena; ap; ap = next) {
> -             next = ap;
> +             next = ap->next;
>               free(ap->mem);
>               free(ap);
>       }

Uhmmm, good catch. This error was present sicne I wrote the arena code.


> diff --git a/cc2/parser.c b/cc2/parser.c
> index 39a777f..b036fbd 100644
> --- a/cc2/parser.c
> +++ b/cc2/parser.c
> @@ -629,6 +629,7 @@ parse(void)
>       cleannodes();  /* remove code of previous function */
>       popctx();  /* remove context of previous function */
>       curfun = NULL;
> +     endf = 0;
>  

And this error was introduced by my last commit.

I will apply it tomorrow.

Regards,


Reply via email to