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]

Fix memory corruption in LTO


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;


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