Commit f5f0bd8e authored by James Y Knight's avatar James Y Knight Committed by Tom Stellard
Browse files

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.

Fixes #53540

This reverts commit c2297544.

Differential Revision: https://reviews.llvm.org/D118804

(cherry picked from commit 9545976f)
parent 7246d583
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment