[PATCH] D12669: [libcxxabi] Fix alignment of pointers returned by fallback_malloc

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 14:57:43 PDT 2015


EricWF added a comment.

In http://reviews.llvm.org/D12669#241020, @compnerd wrote:

> While I think that ensuring that the fallback malloc path works properly is needed, AIUI, this is still insufficient, as there is a first attempt at using malloc, which doesn't have alignment guarantees (except on Darwin).


I split this change into two parts. http://reviews.llvm.org/D12512 fixes the first attempt with malloc. This patch only touches fallback_malloc.

> Also, a clang-format over the patch would be appreciated.


I would appreciate if I could delay that until after this patch. `fallback_malloc.ipp` is currently a mess and requires a lot of cleanup. However I wanted to avoid obscuring these changes by having a bunch of cleanup.


================
Comment at: src/fallback_malloc.ipp:25
@@ -15,1 +24,3 @@
+#error The required macro '_ALIGNAS_TYPE' is not defined.
+#endif
 
----------------
compnerd wrote:
> Ick, but I see why this is needed.  Might be nice to expand the comment about not being able to include headers with a why.
I plan to rip this out when I make `fallback_malloc.ipp` a proper header. I'll do that right after this patch lands. I guess I didn't need this change after all.


http://reviews.llvm.org/D12669





More information about the cfe-commits mailing list