[PATCH] D11793: [compiler-rt] Add SourceLocations for float_cast_overflow data.
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 14:05:12 PDT 2015
filcab added a comment.
Will update on the repo. Thanks for the review.
================
Comment at: lib/ubsan/ubsan_handlers.cc:297
@@ +296,3 @@
+ u8 *FilenameOrTypeDescriptor;
+ internal_memcpy(&FilenameOrTypeDescriptor, Data,
+ sizeof(FilenameOrTypeDescriptor));
----------------
samsonov wrote:
> Why not reinterpret_cast<u8*>(Data)?
It would actually be: `*reinterpret_cast<u8**>(Data)`, which would dereferrence a pointer to `char*` OR a pointer to `TypeDescriptor`, which AFAICT, would technically be UB in one of those cases, due to dereferencing a pointer to `A` as a pointer to `B` (where `A` is `TypeDescriptor`, and `B` is a `char *`). (the first version of the patch had this, and this shouldn't be a problem, but still... technically UB as far as I can tell).
http://reviews.llvm.org/D11793
More information about the llvm-commits
mailing list