llvm /
scudo /
2964abdd840395c7c0c330d5122d10cda5486533 [scudo] Align objects with alignas
Operator new must align allocations for types with large alignment.
Before c++17 behavior was implementation defined and both clang and gc++
before 11 ignored alignment. Miss-aligned objects mysteriously crashed
tests on Ubuntu 14.
Alternatives are compile with -std=c++17 or -faligned-new, but they were
discarded as less portable.
Reviewed By: hctim
Differential Revision: https://reviews.llvm.org/D101874
GitOrigin-RevId: 1d767b13bfad806bf584e0b054eb7d00a494591d
2 files changed