[PATCH] D11757: Propagate SourceLocations through to get a Loc on float_cast_overflow

Filipe Cabecinhas filcab+llvm.phabricator at gmail.com
Wed Aug 5 14:13:24 PDT 2015


filcab added a comment.

In http://reviews.llvm.org/D11757#218153, @samsonov wrote:

> Note that you would need to make a corresponding change in UBSan compiler-rt runtime.


I finished this late last night, so I figured I'd upload the bigger patch and start getting comments. :-)

> Also, this is an ABI-breaking change - e.g. shared objects built with older Clang will not work properly with new runtime. I would recommend you to add *some* diagnostic to ubsan runtime - e.g. if it tries to read SourceLocation from FloatCastOverflowData passed to handler, but it looks more like TypeDescriptor, than it would crash with a verbose message.


I've made the simple UBSan patch and am only missing changing tests (on my machine we do get file names and lines for those source locations, from debug info, but I'll figure out a way to differentiate those).
I'll add a small check for v1/v2 of FloatCastOverflowData.

I will only commit after both patches are accepted, too.


http://reviews.llvm.org/D11757





More information about the cfe-commits mailing list