diff options
author | Andi Kleen <ak@linux.intel.com> | 2010-07-23 05:23:50 +0000 |
---|---|---|
committer | Andi Kleen <ak@gcc.gnu.org> | 2010-07-23 05:23:50 +0000 |
commit | 090fc3f4db2b05936d6f05b6ae4228fb86374cd3 (patch) | |
tree | 56ae3ac2179b21a6deef76ee4052fc36c257201f /gcc | |
parent | 9d3493e63d87f3cbd0c3caab3b429583f8b6c7b6 (diff) | |
download | gcc-090fc3f4db2b05936d6f05b6ae4228fb86374cd3.zip gcc-090fc3f4db2b05936d6f05b6ae4228fb86374cd3.tar.gz gcc-090fc3f4db2b05936d6f05b6ae4228fb86374cd3.tar.bz2 |
lto-opts.c (lto_read_file_options): Check for missing section.
2010-07-10 Andi Kleen <ak@linux.intel.com>
* lto-opts.c (lto_read_file_options): Check for missing section.
From-SVN: r162439
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto-opts.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c71bb5..6b7514d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2010-07-10 Andi Kleen <ak@linux.intel.com> + + * lto-opts.c (lto_read_file_options): Check for missing section. + 2010-07-22 Bernd Schmidt <bernds@codesourcery.com> * ira.c (check_allocation): Correctly handle the case where an allocno diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index 8405714..21a5a20 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -356,6 +356,8 @@ lto_read_file_options (struct lto_file_decl_data *file_data) struct lto_input_block ib; data = lto_get_section_data (file_data, LTO_section_opts, NULL, &len); + if (!data) + return; header = (const struct lto_simple_header *) data; opts_offset = sizeof (*header); |