Re: RFA: PATCH to check for overflow in make_tree_vec_stat

2017-05-19 Thread Jason Merrill
On Fri, May 19, 2017 at 5:14 AM, Richard Biener wrote: > On Fri, May 19, 2017 at 4:32 AM, Jason Merrill wrote: >> A patch I've been putting together ran into strange memory corruption >> issues which turned out to be because the calculation in >> make_tree_vec_stat was overflowing and allocating

Re: RFA: PATCH to check for overflow in make_tree_vec_stat

2017-05-19 Thread Richard Biener
On Fri, May 19, 2017 at 4:32 AM, Jason Merrill wrote: > A patch I've been putting together ran into strange memory corruption > issues which turned out to be because the calculation in > make_tree_vec_stat was overflowing and allocating a small TREE_VEC > instead of a large one. This assert shoul

RFA: PATCH to check for overflow in make_tree_vec_stat

2017-05-18 Thread Jason Merrill
A patch I've been putting together ran into strange memory corruption issues which turned out to be because the calculation in make_tree_vec_stat was overflowing and allocating a small TREE_VEC instead of a large one. This assert should work as a simple sanity check. Tested x86_64-pc-linux-gnu, O