nikic wrote:

Reverted this due to ubsan errors like:

> /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/IR/ValueHandle.h:286:64:
>  runtime error: upcast of misaligned address 0xffffffffffffffff for type 
> 'llvm::BasicBlock', which requires 8 byte alignment

The problem is basically code like this:
```
class Foo {
    unsigned x;
};

class Bar : public Foo {};

Bar *test(Foo *ptr) {
    return static_cast<Bar *>(reinterpret_cast<Foo *>(-1));
}
```
Where ubsan doesn't like the static_cast.

While DenseMap itself doesn't need the aligned pointers, it seems like too many 
other places end up depending on this.

https://github.com/llvm/llvm-project/pull/146595
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to