This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR lto/59441 Add initialization and release of bitmap obstack
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Ilya Palachev <i dot palachev at samsung dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Vyacheslav Barinov <v dot barinov at samsung dot com>
- Date: Tue, 7 Oct 2014 16:41:54 +0200
- Subject: Re: [PATCH] PR lto/59441 Add initialization and release of bitmap obstack
- Authentication-results: sourceware.org; auth=none
- References: <5433E2B7 dot 9020401 at samsung dot com>
On Tue, Oct 7, 2014 at 2:55 PM, Ilya Palachev <i.palachev@samsung.com> wrote:
> Hi all,
>
> Attached patch fixes PR lto/59441.
> The reason of failure was that the default bitmap obstack was released just
> before the execution of early local passes.
> The error was found using valgrind. It reported that there were 153 invalid
> reads and 173 invalid writes into the field of the default bitmap obstack
> structure,
> and all of them were trying to access data that was free'd previously (at
> the same point of the program).
>
> The solution is to add initialization and release of the bitmap obstack
> before and after the execution of early local passes.
> After applying this patch valgrind does not report any errors for the same
> testcase.
>
> The patch was bootstrapped and regtested on x86_64-unknown-linux-gnu.
>
> Ok for trunk?
Ok.
Thanks,
Richard.
> Best regards,
> Ilya Palachev