[cfe-dev] request for comments on patch: detecting integer undefined behaviors

Chris Lattner clattner at apple.com
Wed Sep 8 15:38:29 PDT 2010


On Sep 8, 2010, at 1:42 PM, John Regehr wrote:

> Chris,
> 
> Our job of integrating Peng's patch with the -ftrapv functionality would be easier if we understood what is going to happen to LLVM's existing -fcatch-undefined-behavior flag.  Does this flag have a future or will it be removed?

I don't see why it would be removed.  I see it as "-ftrapv on steroids".  Where -ftrapv is limited to integer overflow issues, -fcatch-undefined-behavior should catch other things like buffer overflows, use of uninit variables etc.  -fcatch-undefined-behavior should imply -ftrapv, but I don't know if it does.

Does that help?

-Chris





More information about the cfe-dev mailing list