[Bug 1844785] Re: apparent memory leak using posix_memalign

DGelling 1844785 at bugs.launchpad.net
Fri Sep 20 11:48:39 UTC 2019


Forgot to add:

I compiled with gcc 7.4:

gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


using the following command line:

$ gcc -O0 -g -o memleak memleak.c

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1844785

Title:
  apparent memory leak using posix_memalign

Status in glibc package in Ubuntu:
  New

Bug description:
  when allocating and deallocating memory of sufficient size with
  posix_memalign while keeping smaller allocations done with malloc, a
  memory leak happens. This only appears when using certain ranges of
  allocation sizes, and can cause the system to lock up when running out
  of memory while only having a few megabytes allocated on a 16GB ram
  machine.

  lsb_release -rd:

  Description:    Ubuntu 18.04.3 LTS
  Release:        18.04

  apt-cache policy libc6:

  libc6:
    Installed: 2.27-3ubuntu1
    Candidate: 2.27-3ubuntu1
    Version table:
   *** 2.27-3ubuntu1 500
          500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
          100 /var/lib/dpkg/status

  see attached for a small program that will trigger the memory leak

  I have not tried this on other distros, so don't know if this is
  ubuntu specific

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1844785/+subscriptions



More information about the foundations-bugs mailing list