Bug 4586

Summary: malloc_trim() not thread_safe
Product: uClibc Reporter: Ronald Wahl <rwahl>
Component: ThreadsAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: ronald.wahl, uclibc-cvs
Priority: P5    
Version: 0.9.32   
Target Milestone: 0.9.34   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: Patch to make malloc_trim() thread-safe.

Description Ronald Wahl 2011-12-07 21:24:15 UTC
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.
Comment 1 Bernhard Reutner-Fischer 2015-03-18 22:13:45 UTC
Fixed in be61486447ab447ac24892845af92489fe0b7148

Thanks!