[PATCH] D100879: [Clang] Propagate guaranteed alignment for malloc and others
collares added a comment. In https://bugzilla.mozilla.org/show_bug.cgi?id=1741454, oxalica discovered this breaks jemalloc-using code, since jemalloc does not guarantee 16-byte alignment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100879/new/ https://reviews.llvm.org/D100879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D100879: [Clang] Propagate guaranteed alignment for malloc and others
collares added a comment. Reproducing oxalica's comment at https://github.com/NixOS/nixpkgs/pull/146817, to make sure it is not missed: "The divergence here is about how to understand the sentence from C17, 7.22.3. There is already an proposal rephrasing it and making it clear that 8-byte allocation CAN result in only 8-byte alignment, not 16-byte-aligned. It also mentions that forcing jemalloc to have 16-byte alignment will significantly slow down its performance. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2293.htm This N2293 is already accepted in the latest working draft, and should be present in the next C2x standard. Clang should eventually change to support it." Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100879/new/ https://reviews.llvm.org/D100879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"
collares added a comment. It is worth noting that GCC started assuming 16-byte alignment for small objects in 2016, before N2293 was written and accepted into C2x; see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90569#c8 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90569#c9 for more recent (informal) statements from GCC developers. Other malloc implementations, such as tcmalloc (see https://google.github.io/tcmalloc/reference.html) also seem to be planning on relaxing the alignment assumptions once C2x compliance is widespread. It might be worth filing a GCC bug as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118804/new/ https://reviews.llvm.org/D118804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits