[Boost-bugs] [Boost C++ Libraries] #4717: Non-const local static variable stored_vtable

Subject: [Boost-bugs] [Boost C++ Libraries] #4717: Non-const local static variable stored_vtable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-10-06 13:38:16


#4717: Non-const local static variable stored_vtable
-------------------------------------------------------+--------------------
 Reporter: Kazutoshi Satoda <k_satoda@…> | Owner: dgregor
     Type: Patches | Status: new
Milestone: To Be Determined | Component: function
  Version: Boost 1.44.0 | Severity: Regression
 Keywords: |
-------------------------------------------------------+--------------------
 In boost/function/function_template.hpp, there is a local static object
 stored_vtable which is initialized statically. Since this variable is
 not const, it is placed in writable memory (or section).

 This can be a critical problem on some embedded, ROM environment which
 has only XX KB of RAM. The variable is small, but instanciated for each
 combination of template arguments.

 Digging the history, this variable was const in old versions, but was
 changed to non-const in r43884 (accidentally, I think). After that, some
 changes in r43884 were reverted in r49326, but the constness was left as
 non-const. I believe that this was just an oversight.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4717>
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:04 UTC