diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2017-05-10 11:01:26 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco@gcc.gnu.org> | 2017-05-10 11:01:26 +0000 |
commit | 33e2d6f8bae92f2009f882ba5d1cb7a9534f45be (patch) | |
tree | e4228a45568c07227290c6136d5d2b889237c426 /gcc | |
parent | e1ad2926a08a65efae413d84673e11ba695f2bd4 (diff) | |
download | gcc-33e2d6f8bae92f2009f882ba5d1cb7a9534f45be.zip gcc-33e2d6f8bae92f2009f882ba5d1cb7a9534f45be.tar.gz gcc-33e2d6f8bae92f2009f882ba5d1cb7a9534f45be.tar.bz2 |
Move an use-after-free access before the delete.
gcc/
PR target/80671
* config/aarch64/cortex-a57-fma-steering.c (merge_forest):
Move member access before delete.
From-SVN: r247831
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/aarch64/cortex-a57-fma-steering.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 454203c..30a8202 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-05-10 Wilco Dijkstra <wdijkstr@arm.com> + + PR target/80671 + * config/aarch64/cortex-a57-fma-steering.c (merge_forest): + Move member access before delete. + 2017-05-10 Alexandre Oliva <aoliva@redhat.com> * tree-inline.c (expand_call_inline): Split block at stmt diff --git a/gcc/config/aarch64/cortex-a57-fma-steering.c b/gcc/config/aarch64/cortex-a57-fma-steering.c index 4a38879..94d7f9c 100644 --- a/gcc/config/aarch64/cortex-a57-fma-steering.c +++ b/gcc/config/aarch64/cortex-a57-fma-steering.c @@ -411,9 +411,9 @@ fma_forest::merge_forest (fma_forest *other_forest) the list of tree roots of ref_forest. */ this->m_globals->remove_forest (other_forest); this->m_roots->splice (this->m_roots->begin (), *other_roots); - delete other_forest; - this->m_nb_nodes += other_forest->m_nb_nodes; + + delete other_forest; } /* Dump information about the forest FOREST. */ |