[libcxx-commits] [PATCH] D58011: Fix -fsanitize=vptr badness in <__debug>
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 10 07:04:53 PST 2019
mclow.lists added inline comments.
================
Comment at: include/__debug:253
+ using _InsertConstruct = __c_node*(void*, void*, __c_node*);
+
----------------
When did `using` replace `typedef`? Pretty sure it was post C++11
================
Comment at: src/debug.cpp:237
__c_node* p = __cbeg_[hc];
- __c_node* r = __cbeg_[hc] =
- static_cast<__c_node*>(malloc(sizeof(__c_node)));
- if (__cbeg_[hc] == nullptr)
- __throw_bad_alloc();
-
+ void *buf = malloc(sizeof(__c_node));
+ if (buf == nullptr)
----------------
This also appears to fix a bug where a memory allocation failure would corrupt the debug database.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58011/new/
https://reviews.llvm.org/D58011
More information about the libcxx-commits
mailing list