[all-commits] [llvm/llvm-project] 954597: Revert "[Clang] Propagate guaranteed alignment for...
James Y Knight via All-commits
all-commits at lists.llvm.org
Tue Feb 8 11:35:16 PST 2022
Author: James Y Knight <jyknight at google.com>
Date: 2022-02-08 (Tue, 08 Feb 2022)
Revert "[Clang] Propagate guaranteed alignment for malloc and others"
The above change assumed that malloc (and friends) would always
allocate memory to getNewAlign(), even for allocations which have a
smaller size. This is not actually required by spec (a 1-byte
allocation may validly have 1-byte alignment).
Some real-world malloc implementations do not provide this guarantee,
and thus this optimization is breaking programs.
This reverts commit c2297544c04764237cedc523083c7be2fb3833d4.
Differential Revision: https://reviews.llvm.org/D118804
More information about the All-commits