jankratochvil added a comment.

In https://reviews.llvm.org/D47492#1122080, @labath wrote:

> It doesn't look like your code verifies that the user hasn't replaced the 
> global `operator new` by defining a custom version. 
> http://en.cppreference.com/w/cpp/memory/new/operator_new:


I asked about it in the code, I see I could find it is permitted:

  // Is permitted a symbol interposition of ::operator new to verify even that?



> if libstdc++ exposed a non-weak alias to its `operator new` and then 
> `shrink_to_fit` did a runtime check like `if(&__standard_operator_new == 
> &::operator new)`.

Yes, that is what I planned to write if the symbol interpoisiton is really 
permitted.

> That seems like a huge hack.

Yes but possible.


Repository:
  rL LLVM

https://reviews.llvm.org/D47492



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to