Hmm, why won&#x27;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 &#x2F;usr&#x2F;lib&#x2F;libSystem.B.dylib has been split into several reexported libraries in &#x2F;usr&#x2F;lib&#x2F;system, so there shouldn&#x27;t be an issue there.  Probably better to use this technique though (should still work in the latest version but needs mprotect):<p><a href="http:&#x2F;&#x2F;eatmyrandom.blogspot.com&#x2F;2010&#x2F;03&#x2F;mallocfree-interception-on-mac-os-x.html" rel="nofollow">http:&#x2F;&#x2F;eatmyrandom.blogspot.com&#x2F;2010&#x2F;03&#x2F;mallocfree-intercept...</a>