Fix for segfault reported in PR 11990

Kaelyn Takata rikka at google.com
Fri Dec 6 16:14:48 PST 2013


Rafael,

Thanks for taking the time to do such a thorough review, including doing
some benchmarking of the change. :)

Cheers,
Kaelyn


On Fri, Dec 6, 2013 at 4:11 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> On 5 December 2013 15:40, Kaelyn Takata <rikka at google.com> wrote:
> > I'm pretty sure it isn't because of the mutually recursive calls between
> > between isSized and isSizedDerivedType.
>
> OK,  sorry for taking so long. I spent most of the time trying to
> figure out how to benchmark changes on this area once I noticed how
> hot this path was.
>
> In the end I went with
>
> sudo schedtool -F  -a 0x4 -p 99 -e perf stat -r 5 ./bin/opt -O2
> -disable-output -disable-verify gcc.bc
>
> Where gcc.bc is from
> http://people.csail.mit.edu/smcc/projects/single-file-programs/.
>
> I used -disable-very since it is expected that the verifier would slow
> down a bit, I just wanted to make sure the rest didn't.
>
> Some observations:
> * On code that passes the verifier with your patch we would not hit a
> recursive type, so it is OK for non-verifier code to pass a NULL.
> * Experimenting with always creating a set and passing it to an impl
> function showed that it would be too expensive.
> * Doing this only on the verifier would require duplicating the logic
> or doing a second walk to find if the type is recursive.
>
> So, in the end, LGTM :-)
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131206/5605e4a8/attachment.html>


More information about the llvm-commits mailing list