[compiler-rt] [sanitizer_common] Add operator new chain-handling framework (PR #201151)
David Justo via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 13 11:55:44 PDT 2026
================
@@ -0,0 +1,118 @@
+//===-- sanitizer_new_operators.inc -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Shared OPERATOR_NEW_BODY* macros for sanitizer operator new overrides.
----------------
davidmrdavid wrote:
just confirming - have we already agreed that we'll be replacing the `OPERATOR_NEW_BODY` macro (and it's variants) for *all* sanitizers?
A search for `OPERATOR_NEW_BODY` in the codebase ([here](https://github.com/search?q=repo%3Allvm%2Fllvm-project+OPERATOR_NEW_BODY&type=code)) reveals that it's declared by:
- asan
- dfsan
- tsan
and others.
This file suggests that'll be updating all of these sanitizers, which would have a heavier review burden.
Of course, we could also just "set the shared foundation" and simplify notify the other sanitizer maintainers that they should use it.
I'm just trying to confirm what's the plan. To me, it makes sense to scope this PR to updating ASan at first. But, if we do that, we should probably update the comment here to reflect that this is used only by ASan at first.
https://github.com/llvm/llvm-project/pull/201151
More information about the llvm-commits
mailing list