From patchwork Mon Jul 26 19:24:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 59935 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 0E6771007D1 for ; Tue, 27 Jul 2010 05:24:28 +1000 (EST) Received: (qmail 25719 invoked by alias); 26 Jul 2010 19:24:24 -0000 Received: (qmail 25707 invoked by uid 22791); 26 Jul 2010 19:24:23 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL, BAYES_40, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Jul 2010 19:24:18 +0000 Received: from localhost (occam.ms.mff.cuni.cz [195.113.18.121]) by nikam.ms.mff.cuni.cz (Postfix) with ESMTP id 805879ACCB4; Mon, 26 Jul 2010 21:24:15 +0200 (CEST) Received: by localhost (Postfix, from userid 16202) id 7AAD7564129; Mon, 26 Jul 2010 21:24:15 +0200 (CEST) Date: Mon, 26 Jul 2010 21:24:15 +0200 From: Jan Hubicka To: ak@linux.intel.com, gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Fix memory corruption in LTO Message-ID: <20100726192415.GC20984@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, Andi's changes introduced heap allocated object pointed from lto_file_data, so we now ICE on everything big enough to trigger garbage collector at WPA stage. Andi: this solves the cgraph hash table ICE you sent me Bootstrapping/regtesting x86_64-linux, OK? Honza * lto-streamer.h (struct lto_file_decl_data): Mark resolutions with GTY((skip)) Index: lto-streamer.h =================================================================== --- lto-streamer.h (revision 162539) +++ lto-streamer.h (working copy) @@ -602,13 +602,13 @@ htab_t GTY((skip)) renaming_hash_table; /* Linked list used temporarily in reader */ struct lto_file_decl_data *next; /* Sub ID for merged objects. */ unsigned id; /* Symbol resolutions for this file */ - VEC(ld_plugin_symbol_resolution_t,heap) *resolutions; + VEC(ld_plugin_symbol_resolution_t,heap) * GTY((skip)) resolutions; }; typedef struct lto_file_decl_data *lto_file_decl_data_ptr;