Skip to content
Commit 7ce92f73 authored by Shoaib Meenai's avatar Shoaib Meenai
Browse files

[libc++] Pair _aligned_malloc with _aligned_free

Attempting to pair an `_aligned_malloc` with a regular free causes heap
corruption. Pairing with `_aligned_free` is required instead.

Makes the following libc++ tests pass on Windows:

```
std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
```

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

llvm-svn: 291743
parent 9087bbee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment