public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [google]: initialize language field for clone function struct
@ 2011-04-30  1:34 Xinliang David Li
  2011-05-02 22:13 ` Xinliang David Li
  0 siblings, 1 reply; 40+ messages in thread
From: Xinliang David Li @ 2011-04-30  1:34 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jan Hubicka

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

During function cloning, the language field of the src func is not
copied. This can lead to null dereference when gcc calls into langhook
functions.  Unfortunately, I lost track of the test case.

Ok for trunk ?

Thanks,

David


2011-04-29  Xinliang David Li  <davidxl@google.com>

	* tree-inline.c (ininitialize_cfun): Initialize
	language field for clone cfun.

[-- Attachment #2: cln_lang.p --]
[-- Type: text/x-pascal, Size: 464 bytes --]

Index: tree-inline.c
===================================================================
--- tree-inline.c	(revision 173176)
+++ tree-inline.c	(working copy)
@@ -2087,6 +2087,7 @@ initialize_cfun (tree new_fndecl, tree c
   cfun->returns_struct = src_cfun->returns_struct;
   cfun->returns_pcc_struct = src_cfun->returns_pcc_struct;
   cfun->after_tree_profile = src_cfun->after_tree_profile;
+  cfun->language = src_cfun->language;
 
   init_empty_tree_cfg ();
 

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2011-05-05 11:59 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-30  1:34 [google]: initialize language field for clone function struct Xinliang David Li
2011-05-02 22:13 ` Xinliang David Li
2011-05-03 10:55   ` Jan Hubicka
2011-05-03 16:15     ` Xinliang David Li
2011-05-03 16:46       ` Jan Hubicka
2011-05-03 18:55         ` Eric Botcazou
2011-05-03 19:07           ` Joseph S. Myers
2011-05-03 19:16             ` Nathan Froyd
2011-05-03 19:51               ` Joseph S. Myers
2011-05-03 20:05                 ` Nathan Froyd
2011-05-03 19:52             ` Eric Botcazou
2011-05-03 20:09               ` Joseph S. Myers
2011-05-03 20:36                 ` Eric Botcazou
2011-05-03 21:27                   ` Joseph S. Myers
2011-05-04  8:53                     ` Eric Botcazou
2011-05-04 17:27                     ` Tom Tromey
2011-05-04  9:52       ` Richard Guenther
2011-05-04 10:02         ` Eric Botcazou
2011-05-04 10:30           ` Joseph S. Myers
2011-05-04 11:01             ` Eric Botcazou
2011-05-04 11:50             ` Richard Kenner
2011-05-04 12:23               ` Diego Novillo
2011-05-04 12:27                 ` Richard Kenner
2011-05-04 12:31                   ` Diego Novillo
2011-05-04 13:16                   ` Michael Matz
2011-05-04 13:22                   ` Nathan Froyd
2011-05-04 13:26                     ` Diego Novillo
2011-05-04 13:39                       ` Richard Kenner
2011-05-04 11:19           ` Richard Guenther
2011-05-04 12:00             ` Michael Matz
2011-05-04 12:08               ` Richard Guenther
2011-05-04 15:33             ` Eric Botcazou
2011-05-04 16:05               ` Richard Guenther
2011-05-04 17:22                 ` Eric Botcazou
2011-05-05  9:07                   ` Richard Guenther
2011-05-05  9:25                     ` Eric Botcazou
2011-05-05  9:44                       ` Richard Guenther
2011-05-05 10:22                         ` Eric Botcazou
2011-05-05 11:03                           ` Richard Guenther
2011-05-05 11:59                             ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).