llvm-project
701f926a - Revert alloc token placement new (#244677)

Commit
1 day ago
Revert alloc token placement new (#244677) Reverting #241548 and its follow-up #243991. Placement-new inference assumes the constructed type covers the whole allocation, but with the header idiom it covers only a prefix. Allocations whose trailing data holds pointers then get the pointer-free token, e.g. malloc(size + kPrefix) with new (ptr) size_t(...), or new (::operator new(n)) Header(...) followed by pointerful trailing entries. Will reland with a check that the constructed type covers the whole allocation.
Author
Parents
Loading