Commit f71847e6 authored by Neal Norwitz's avatar Neal Norwitz

If the for loop isn't entered, entryblock will be NULL. If passed

to stackdepth_walk it will be dereffed.

Not sure if I found with failmalloc or Klockwork #55.
parent 18b6adf9
...@@ -4022,6 +4022,8 @@ stackdepth(struct compiler *c) ...@@ -4022,6 +4022,8 @@ stackdepth(struct compiler *c)
b->b_startdepth = INT_MIN; b->b_startdepth = INT_MIN;
entryblock = b; entryblock = b;
} }
if (!entryblock)
return 0;
return stackdepth_walk(c, entryblock, 0, 0); return stackdepth_walk(c, entryblock, 0, 0);
} }
......
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