Print this page
8276 rpcbind leaks memory due to libumem per thread caching.
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>

*** 20,29 **** --- 20,30 ---- */ /* * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 by Delphix. All rights reserved. + * Copyright (c) 2017 by The MathWorks, Inc. All rights reserved. */ /* * Copyright 2016 Joyent, Inc. */
*** 775,787 **** exit(0); thr_panic("_thrp_exit(): exit(0) returned"); } lmutex_unlock(&udp->link_lock); ! tmem_exit(); /* deallocate tmem allocations */ tsd_exit(); /* deallocate thread-specific data */ tls_exit(); /* deallocate thread-local storage */ heldlock_exit(); /* deal with left-over held locks */ /* block all signals to finish exiting */ block_all_signals(self); /* also prevent ourself from being suspended */ --- 776,793 ---- exit(0); thr_panic("_thrp_exit(): exit(0) returned"); } lmutex_unlock(&udp->link_lock); ! /* ! * tsd_exit() may call its destructor free(), thus depending on ! * tmem, therefore tmem_exit() needs to be called after tsd_exit() ! * and tls_exit(). ! */ tsd_exit(); /* deallocate thread-specific data */ tls_exit(); /* deallocate thread-local storage */ + tmem_exit(); /* deallocate tmem allocations */ heldlock_exit(); /* deal with left-over held locks */ /* block all signals to finish exiting */ block_all_signals(self); /* also prevent ourself from being suspended */