>>>>> On Thu, 21 Jun 2007 12:13:29 +0200, Jan Djärv <address@hidden> said: > The patch was corrupted by some mailer so I could not apply it, but: > ! /* Copy the value of __malloc_hook to an automatic variable in case > ! __malloc_hook is modified in another thread between its > ! NULL-check and the use. */ > ! hook = __malloc_hook; > ! return (hook != NULL ? *hook : _malloc_internal) (size); > } > Assignment is not guaranteed to be atomic. It probably is on 32-bit systems, > but you should not assume it. Maybe. But malloc in glibc 2.5 also does the same thing and I suspect that we cannot do better as long as we try to keep the same interface with respect to __malloc_hook etc. YAMAMOTO Mitsuharu address@hidden