Commit e0df53dd by Martin Liska Committed by Jan Hubicka

* ipa.c (ipa_profile_read_summary): Fix buffer overflow.

From-SVN: r201900
parent e7d1d3eb
2013-08-20 Martin Liska <marxin.liska@gmail.com>
* ipa.c (ipa_profile_read_summary): Fix buffer overflow.
2013-08-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2013-08-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sol2-10.h (TARGET_LIBC_HAS_FUNCTION): Don't nest * config/sol2-10.h (TARGET_LIBC_HAS_FUNCTION): Don't nest
......
...@@ -1397,7 +1397,7 @@ ipa_profile_read_summary (void) ...@@ -1397,7 +1397,7 @@ ipa_profile_read_summary (void)
static unsigned int static unsigned int
ipa_profile (void) ipa_profile (void)
{ {
struct cgraph_node **order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes); struct cgraph_node **order;
struct cgraph_edge *e; struct cgraph_edge *e;
int order_pos; int order_pos;
bool something_changed = false; bool something_changed = false;
...@@ -1575,6 +1575,7 @@ ipa_profile (void) ...@@ -1575,6 +1575,7 @@ ipa_profile (void)
nuseless, nuseless * 100.0 / nindirect, nuseless, nuseless * 100.0 / nindirect,
nconverted, nconverted * 100.0 / nindirect); nconverted, nconverted * 100.0 / nindirect);
order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
order_pos = ipa_reverse_postorder (order); order_pos = ipa_reverse_postorder (order);
for (i = order_pos - 1; i >= 0; i--) for (i = order_pos - 1; i >= 0; i--)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment