Bug 4586 - malloc_trim() not thread_safe
Summary: malloc_trim() not thread_safe
Status: RESOLVED FIXED
Alias: None
Product: uClibc
Classification: Unclassified
Component: Threads (show other bugs)
Version: 0.9.32
Hardware: All Linux
: P5 normal
Target Milestone: 0.9.34
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 21:24 UTC by Ronald Wahl
Modified: 2015-03-18 22:13 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
Patch to make malloc_trim() thread-safe. (480 bytes, patch)
2011-12-07 21:24 UTC, Ronald Wahl
Details

Note You need to log in before you can comment on or make changes to this bug.
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!