Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Feb 2018 16:33:38 +0200
From: Roman Yeryomin <>
To: musl <>
Subject: [RFC] malloc + threads = memleak?


I have a very easy reproducible memory leak here when using
malloc/free in two threads.
Attaching a simple test.
thread() here is calling pthread_create():

Do I misunderstand something or is it a bug?
This can be avoided by wrapping malloc into locks but not sure if
that's the fix you want...


View attachment "musl-test.c" of type "text/x-csrc" (1426 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.