3 ms·
Hmm, why won't it? Maybe in the past when asprintf and malloc were located in the same dylib, since OS X dylibs generate direct calls to other public functions
by comex 11y ago
Hmm, why won't it? Maybe in the past when asprintf and malloc were located in the same dylib, since OS X dylibs generate direct calls to other public functions in the same image (rather than going through the PLT as GNU does by default), but for many years /usr/lib/libSystem.B.dylib has been split into several reexported libraries in /usr/lib/system, so there shouldn't be an issue there. Probably better to use this technique though (should still work in the latest version but needs mprotect):
http://eatmyrandom.blogspot.com/2010/03/mallocfree-interception-on-mac-os-x.html http://eatmyrandom.blogspot.com/2010/03/mallocfree-intercept...