Open e4lam opened 4 years ago
PS. The interception code on Windows is pretty interesting here as well: https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/interception/interception_win.cpp
@e4lam, links no longer works :(
@anton-potapov I've updated the links in the description above. They renamed the "master" branch to "main" so I just needed to substitute "master" for "main" in the URLs.
On the Microsoft C++ Team Blog, there's a new article [1] that mentions MS contributing bug fixes and improved interception for memory allocations functions to the LLVM compiler-rt project [2].
Given the frequent tbbmalloc_proxy problems we have with new Windows 10 updates and tbbmalloc_proxy, it might be useful for TBB to consider join forces with compiler-rt for hooking allocators.
I toook a quick look and the code seems to be in this file here: https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/asan/asan_malloc_win.cpp (look for
ReplaceSystemMalloc()
)