glibc mq_notify memory leak report

Florian Weimer fweimer@redhat.com
Mon Jan 9 17:11:43 GMT 2023


* > Dear All,
>
> I have the following code snippet and `mq_close`, `mq_unlink` is
> called in exit path.  But with valgrind, I have the summary about
> possibly lost.
>
> How to gracefully remove the notification during exit path?

I think this is the same issue that was reported here for timer_create
(which also has a helper thread):

  libc timer_create with option SIGEV_THREAD system call having memory
  leaks after timer_delete system call
  <https://sourceware.org/bugzilla/show_bug.cgi?id=29705>

I don't think there is a good way to fix this.  It's not an unbounded
leak, so it does not impact the application while it runs.

Thanks,
Florian



More information about the Libc-help mailing list