From ad01608e1402904d7b9041a985a05c4348d2085b Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 23 Sep 2014 14:47:45 +0000 Subject: [PATCH] re PR bootstrap/63280 (Double free in GCC compiled with LTO and -O3.) gcc/ PR bootstrap/63280 * target-globals.c (target_globals::~target_globals): Fix location of ira_int destruction. From-SVN: r215515 --- gcc/ChangeLog | 6 ++++++ gcc/target-globals.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 576835f75b2..991cc555a11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-09-23 Richard Sandiford + + PR bootstrap/63280 + * target-globals.c (target_globals::~target_globals): Fix location + of ira_int destruction. + 2014-09-23 Renlin Li * config/aarch64/aarch64.md (return): New. diff --git a/gcc/target-globals.c b/gcc/target-globals.c index 52ac2c02dfc..9122d672d0b 100644 --- a/gcc/target-globals.c +++ b/gcc/target-globals.c @@ -121,10 +121,10 @@ save_target_globals_default_opts () target_globals::~target_globals () { - ira_int->~target_ira_int (); /* default_target_globals points to static data so shouldn't be freed. */ if (this != &default_target_globals) { + ira_int->~target_ira_int (); hard_regs->finalize (); XDELETE (flag_state); XDELETE (regs); -- 2.30.2