From: Andi Kleen Date: Fri, 23 Jul 2010 05:23:50 +0000 (+0000) Subject: lto-opts.c (lto_read_file_options): Check for missing section. X-Git-Tag: releases/gcc-4.6.0~5490 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=090fc3f4db2b05936d6f05b6ae4228fb86374cd3;p=thirdparty%2Fgcc.git lto-opts.c (lto_read_file_options): Check for missing section. 2010-07-10 Andi Kleen * lto-opts.c (lto_read_file_options): Check for missing section. From-SVN: r162439 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c71bb5b0ba1..6b7514debf7b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2010-07-10 Andi Kleen + + * lto-opts.c (lto_read_file_options): Check for missing section. + 2010-07-22 Bernd Schmidt * ira.c (check_allocation): Correctly handle the case where an allocno diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index 840571431f1b..21a5a20a0a63 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);