[PATCH] ADT: Remove misaligned pointeres from DenseMapInfo

Alexey Samsonov vonosmas at gmail.com
Mon Dec 29 17:06:40 PST 2014


In http://reviews.llvm.org/D5428#104174, @hfinkel wrote:

> In http://reviews.llvm.org/D5428#104058, @samsonov wrote:
>
> > FTR, this is the last remaining major problem which keeps "check-llvm" command broken under UBSan bootstrap. This patch looks good to me, but I'm not sure if I can sign this off.
>
>
> IIRC, the problem was that this is not actually undefined behavior. The resulting pointer value might be a "trap representation", but that's implementation-defined behavior, not undefined behavior. UBSan might need to be fixed here.


What fix do you suggest? UBSan prints an error report when the unaligned pointer T* is actually used, not when it's created. In LLVM, this "use" is usually an upcast to Value *. So, you may treat UBSan as the tool implementing this trapping behavior.


http://reviews.llvm.org/D5428

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list