mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 13:01:06 +08:00
ipa-fnsummary.c: fix use-after-free crash (PR jit/82826)
gcc/ChangeLog: PR jit/82826 * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function. * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl. * toplev.c: Include "ipa-fnsummary.h". (toplev::finalize): Call ipa_fnsummary_c_finalize. From-SVN: r254458
This commit is contained in:
parent
3e2927a1b0
commit
de4381a4e9
@ -1,3 +1,11 @@
|
||||
2017-11-06 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
PR jit/82826
|
||||
* ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
|
||||
* ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
|
||||
* toplev.c: Include "ipa-fnsummary.h".
|
||||
(toplev::finalize): Call ipa_fnsummary_c_finalize.
|
||||
|
||||
2017-11-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/82838
|
||||
|
@ -3619,3 +3619,12 @@ make_pass_ipa_fn_summary (gcc::context *ctxt)
|
||||
{
|
||||
return new pass_ipa_fn_summary (ctxt);
|
||||
}
|
||||
|
||||
/* Reset all state within ipa-fnsummary.c so that we can rerun the compiler
|
||||
within the same process. For use by toplev::finalize. */
|
||||
|
||||
void
|
||||
ipa_fnsummary_c_finalize (void)
|
||||
{
|
||||
ipa_free_fn_summary ();
|
||||
}
|
||||
|
@ -266,4 +266,6 @@ void estimate_node_size_and_time (struct cgraph_node *node,
|
||||
vec<inline_param_summary>
|
||||
inline_param_summary);
|
||||
|
||||
void ipa_fnsummary_c_finalize (void);
|
||||
|
||||
#endif /* GCC_IPA_FNSUMMARY_H */
|
||||
|
@ -83,6 +83,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
#include "edit-context.h"
|
||||
#include "tree-pass.h"
|
||||
#include "dumpfile.h"
|
||||
#include "ipa-fnsummary.h"
|
||||
|
||||
#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
|
||||
#include "dbxout.h"
|
||||
@ -2236,6 +2237,7 @@ toplev::finalize (void)
|
||||
|
||||
/* Needs to be called before cgraph_c_finalize since it uses symtab. */
|
||||
ipa_reference_c_finalize ();
|
||||
ipa_fnsummary_c_finalize ();
|
||||
|
||||
cgraph_c_finalize ();
|
||||
cgraphunit_c_finalize ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user