[PATCH] Document -fsanitize=vptr (PR sanitizer/64706)

Jason Merrill jason@redhat.com
Wed Jan 21 21:58:00 GMT 2015


On 01/21/2015 04:33 PM, Jakub Jelinek wrote:
> Slightly off-topic, what do you think about replacing *this ={v} {CLOBBER};
> stmts in dtors of objects with virtual methods with storing of
> NULL or some other value into the vtable pointer field, so that we would
> (sometimes) catch member accesses and method calls after destruction?

The clobber statement clobbers the entire object, not just the vptr, but 
setting the vptr to null when -fsanitize=vptr makes sense to me.

Jason



More information about the Gcc-patches mailing list