Re: [RFC PATCH] -fsanitize=vptr instrumentation

2014-09-17 Thread Jason Merrill
On 09/17/2014 02:02 PM, Jason Merrill wrote: On 09/17/2014 11:40 AM, Jakub Jelinek wrote: And for the last one, should we before dynamic_cast verify the object passed to dynamic_cast has the expected vptr? Perhaps we should just add checking to the dynamic_cast code. I'm not sure if that wou

Re: [RFC PATCH] -fsanitize=vptr instrumentation

2014-09-17 Thread Jason Merrill
On 09/17/2014 11:40 AM, Jakub Jelinek wrote: build_base_path seems to be used in lots of places though, apparently including member access, etc. The ubsan library right now has just these const char *TypeCheckKinds[] = { "load of", "store to", "reference binding to", "member access withi

Re: [RFC PATCH] -fsanitize=vptr instrumentation

2014-09-17 Thread Jakub Jelinek
On Wed, Sep 17, 2014 at 10:27:02AM -0400, Jason Merrill wrote: > On 09/16/2014 10:56 AM, Jakub Jelinek wrote: > >vptr-5.C is one Jason mailed me yesterday, clang++ doesn't instrument this > >and g++ right now doesn't either, build_static_cast_1 certainly isn't called > >in that case, and I must say

Re: [RFC PATCH] -fsanitize=vptr instrumentation

2014-09-17 Thread Jason Merrill
On 09/16/2014 10:56 AM, Jakub Jelinek wrote: vptr-5.C is one Jason mailed me yesterday, clang++ doesn't instrument this and g++ right now doesn't either, build_static_cast_1 certainly isn't called in that case, and I must say I have no idea what should be checked there, where etc. What needs to