diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-01-19 14:35:16 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-01-19 14:35:16 +0000 |
commit | d6874f56624074a067b5f42bbacae030201e4520 (patch) | |
tree | d79b1923ebfa78c9386a4fa276282c145ef07993 /gcc/gcc.c | |
parent | 962801c550a859cc05fd761fac09ade6beb5e34a (diff) | |
download | gcc-d6874f56624074a067b5f42bbacae030201e4520.tar.gz |
Fix memory chunk corruption for opts_obstack (PR jit/68446)
gcc/ChangeLog:
PR jit/68446
* gcc.c (driver::decode_argv): Add call to
init_opts_obstack before init_options_struct.
* opts.c (init_opts_obstack): Remove idempotency.
(init_options_struct): Replace call to init_opts_obstack
with a gcc_assert to verify that it has already been called.
* toplev.c (toplev::main): Add call to init_opts_obstack before
calls to init_options_struct.
(toplev::finalize): Move cleanup of opts_obstack next to
cleanup of save_decoded_options, clearing the latter, and
save_decoded_options_count.
From-SVN: r232567
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index f04fdc440d2..683b30fcbab 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -7216,6 +7216,7 @@ driver::decode_argv (int argc, const char **argv) global_init_params (); finish_params (); + init_opts_obstack (); init_options_struct (&global_options, &global_options_set); decode_cmdline_options_to_array (argc, argv, |