Created attachment 3854 [details] Patch to make malloc_trim() thread-safe. I just got an abort in a multi-threaded application. The back-trace showed that it happened inside malloc_trim(). I checked the function and found that it misses the __MALLOC_LOCK and __MALLOC_UNLOCK calls. A proposed fix is attached to this bug report.
Fixed in be61486447ab447ac24892845af92489fe0b7148 Thanks!