Subject: [Boost-bugs] [Boost C++ Libraries] #13258: boost/archive/text_iarchive.hpp memory leaks with MFC!
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-10-12 05:56:51
#13258: boost/archive/text_iarchive.hpp memory leaks with MFC!
------------------------------+---------------------------
Reporter: LL L <lll@â¦> | Owner: Robert Ramey
Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
Version: Boost 1.65.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------
visual studio 2017 community edition;
boost c++, 1.65 installed through vcpkg;
reproducing steps.
1. install vcpkg; vcpkg install boost
2. create a new project with mfc shared support;
3. add #include <boost/archive/text_iarchive.hpp> to stdafx.h
4. build -> run -> exit
5. visual studio will generate messages like:
{{{
Detected memory leaks!
Dumping objects ->
{180} normal block at 0x01546820, 8 bytes long.
Data: < L > E8 F1 4C 01 00 00 00 00
{179} normal block at 0x01546510, 20 bytes long.
Data: < eT eT eT > 10 65 54 01 10 65 54 01 10 65 54 01 01 01 CD CD
{178} normal block at 0x01546AC0, 8 bytes long.
Data: < L > D0 F1 4C 01 00 00 00 00
{177} normal block at 0x01546790, 20 bytes long.
Data: < gT gT gT > 90 67 54 01 90 67 54 01 90 67 54 01 01 01 CD CD
{176} normal block at 0x0153B948, 8 bytes long.
Data: <` L > 60 F1 4C 01 00 00 00 00
{175} normal block at 0x01546190, 20 bytes long.
Data: < aT aT aT > 90 61 54 01 90 61 54 01 90 61 54 01 01 01 CD CD
{174} normal block at 0x0153BA98, 8 bytes long.
Data: <H L > 48 F1 4C 01 00 00 00 00
{173} normal block at 0x015435A8, 20 bytes long.
Data: < 5T 5T 5T > A8 35 54 01 A8 35 54 01 A8 35 54 01 01 01 CD CD
{172} normal block at 0x0153B8A0, 8 bytes long.
Data: <0 L > 30 F1 4C 01 00 00 00 00
{171} normal block at 0x01543568, 20 bytes long.
Data: <h5T h5T h5T > 68 35 54 01 68 35 54 01 68 35 54 01 01 01 CD CD
{170} normal block at 0x0153BA28, 8 bytes long.
Data: < L > 18 F1 4C 01 00 00 00 00
{169} normal block at 0x01543528, 20 bytes long.
}}}
I can finally nail down to these two headers;
If they exist in stdafx.h at the same time, there will be memory leakage
errors.
{{{
#include <afxwin.h> // MFC core and standard components
#include <boost/archive/text_iarchive.hpp>
}}}
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13258> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-10-12 06:02:50 UTC