Roland Mainz wrote: > Nicolas Williams wrote: >> On Fri, Dec 19, 2008 at 09:14:37PM +0100, Roland Mainz wrote: >>> Will this even work if another library is used for |malloc()|&&|free()| >>> calls (IMO it should work but I am not sure about the case when an >>> application is linked via -B direct) ? >> Yes, it will: malloc() and friends are marked as NODIRECT in libc, which >> means they can be interposed on freely by the application, even when >> they are called from within libc itself. > > Devils advocate question: > What happens if someone intercepts |asprintf()| or |vasprintf()| with > his/her own function which doesn't use the default |malloc()| () ? >
Any ON lib caller of asprintf() will call the libc version, which will inherit the application's malloc(), because ON is linke w/ direct binding. Any application calls will find their own version of asprintf(), which will do whatever it does. - Bart -- Bart Smaalders Solaris Kernel Performance barts at cyber.eng.sun.com http://blogs.sun.com/barts "You will contribute more with mercurial than with thunderbird."
