[PATCH] D14119: [libcxxabi] Correctly align fallback heap

2023-01-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. > jdoerfert added a commit: rG10410534696e > : > [CallGraph][FIX] Ensure generic intrinsics are represented in the CG. My bad, I copied the review ID and dropped a 0. Supposed to be https://reviews.

Re: [PATCH] D14119: [libcxxabi] Correctly align fallback heap

2015-10-27 Thread Oliver Stannard via cfe-commits
olista01 abandoned this revision. olista01 added a comment. Ok, I'll abandon this patch and wait for Eric's. I think the char* aliasing rule only works one way, i.e. any object can be accessed through an lvalue of type char, but not the other way round (c++11, 3.10/10). I didn't know about the

Re: [PATCH] D14119: [libcxxabi] Correctly align fallback heap

2015-10-27 Thread Eric Fiselier via cfe-commits
EricWF added a comment. @t.p.northover @olista01 A char array can legally alias any other type memory AFAIK. Its perfectly legal to use a char array to provide raw memory. There shouldn't be any undefined behavior here. Repository: rL LLVM http://reviews.llvm.org/D14119 _

Re: [PATCH] D14119: [libcxxabi] Correctly align fallback heap

2015-10-27 Thread Tim Northover via cfe-commits
t.p.northover added a comment. Oh, and I **think** it can probably be justified under C++, though I've not quite joined up all the dots. The "object lifetime" rules seem to bless declaring a char array dead and reusing its storage for another purpose. Since heap_node has trivial initialization,

Re: [PATCH] D14119: [libcxxabi] Correctly align fallback heap

2015-10-27 Thread Eric Fiselier via cfe-commits
EricWF added a subscriber: EricWF. EricWF added a comment. This patch is incomplete and incorrect. The heap actually needs to be aligned to a 16 byte boundary, and all pointers returned from it must also be 16 byte aligned. I have a complete fix for this issue as http://reviews.llvm.org/D12669.

Re: [PATCH] D14119: [libcxxabi] Correctly align fallback heap

2015-10-27 Thread Tim Northover via cfe-commits
t.p.northover added a subscriber: t.p.northover. t.p.northover added a comment. Using alignas(heap_node) might be a little clearer and more semantically correct here. Should be OK support-wise, libc++ is already using that for some of its bits. Otherwise, good find! Tim. Repository: rL LLVM

[PATCH] D14119: [libcxxabi] Correctly align fallback heap

2015-10-27 Thread Oliver Stannard via cfe-commits
olista01 created this revision. olista01 added reviewers: mclow.lists, compnerd. olista01 added a subscriber: cfe-commits. olista01 set the repository for this revision to rL LLVM. The fallback malloc in libcxxabi (used to allocate space for exception objects in out-of-memory situations) defines i