Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADA+G1tvfRqOo2-Djy4VuCW=PXieGd4O8kYwYHhVErJHukMD-Q@mail.gmail.com>
Date: Fri, 9 Feb 2018 16:33:38 +0200
From: Roman Yeryomin <roman@...t.com>
To: musl <musl@...ts.openwall.com>
Subject: [RFC] malloc + threads = memleak?

Hello!

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():
https://github.com/yeryomin/liba/blob/master/liba.c#L181

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...


Regards,
Roman

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.