Boost logo

Boost :

Subject: [boost] [Container] Memory leak from allocation of 0 sized memory
From: Evan Wallace (onlyone_at_[hidden])
Date: 2013-09-26 11:21:47


I recently tracked down a major memory leak in a system that I am working
on to a bug in Boost.Container.

The bug is that the following code leaks memory:

#include <boost/container/vector.hpp>

int main() {
    while (true) {
        boost::container::vector<int> vec;
        boost::container::vector<int> vec2(vec);
    }
}

I have submitted a ticket to trac, but since this is a major issue
and the release date for 1.55.0 is very soon, I am also posting to
the mailing list.

https://svn.boost.org/trac/boost/ticket/9166

For reference: the leaked memory is allocated in
allocator_version_traits::allocation_command

Evan Wallace


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk