-AddressSanitizer has a custom version of `operator new` and `operator delete` that are used to provide additional metadata about the allocations to ASan to find more errors, like [`alloc_dealloc_mismatch`](error-alloc-dealloc-mismatch.md). The linker is modified (via [`/INFERASANLIBS`](../build/reference/inferasanlibs.md)) to ensure that ASan's `new`/`delete` override has low precedence, so that any `operator new` or `operator delete` overrides in other libraries will be chosen by the linker over ASan's. When this happens, ASan may not be able to catch some errors that rely on it's custom `operator new` and `operator delete`.
0 commit comments