Re: [Boost-bugs] [Boost C++ Libraries] #4256: boost::make_shared() may issue stack overflow while constructing large objects

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4256: boost::make_shared() may issue stack overflow while constructing large objects
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-07 17:42:38


#4256: boost::make_shared() may issue stack overflow while constructing large
objects
--------------------------------+-------------------------------------------
  Reporter: faridz@… | Owner: pdimov
      Type: Bugs | Status: closed
 Milestone: Boost 1.44.0 | Component: smart_ptr
   Version: Boost 1.43.0 | Severity: Problem
Resolution: fixed | Keywords: make_shared stack overflow
--------------------------------+-------------------------------------------

Comment (by cameron.k.ward@…):

 I ran into this using 1.47 yesterday

 I was in debug mode VS2010. I needed a pretty large receive buffer for a
 TCPReceiver.

 The first enum caused a stack overflow error. Reducing the size stopped
 the error.

 Release mode did not complain about either size.

 struct TCPRawData{
         void* pParent;

         this blew the stack - enum{max_length = 1048576};

         this was fine - enum{max_length = 500000};

         char buffer[max_length];

         int bytesReceived;

         TCPRawData(void* parent):
         pParent(parent){}
 };

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4256#comment:4>
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-02-16 18:50:07 UTC