Boost C++ Libraries: Ticket #4717: Non-const local static variable stored_vtable https://svn.boost.org/trac10/ticket/4717 <p> 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). </p> <p> 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. </p> <p> Digging the history, this variable was const in old versions, but was changed to non-const in <a class="changeset" href="https://svn.boost.org/trac10/changeset/43884" title="Change Boost.Function allocator behavior, from Emil Dotchevski">r43884</a> (accidentally, I think). After that, some changes in <a class="changeset" href="https://svn.boost.org/trac10/changeset/43884" title="Change Boost.Function allocator behavior, from Emil Dotchevski">r43884</a> were reverted in <a class="changeset" href="https://svn.boost.org/trac10/changeset/49326" title="Fix Boost.Function thread safety issue again">r49326</a>, but the constness was left as non-const. I believe that this was just an oversight. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4717 Trac 1.4.3 Kazutoshi Satoda <k_satoda@…> Wed, 06 Oct 2010 22:48:04 GMT type changed https://svn.boost.org/trac10/ticket/4717#comment:1 https://svn.boost.org/trac10/ticket/4717#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Patches</span> → <span class="trac-field-new">Bugs</span> </li> </ul> Ticket Daniel Walker Thu, 11 Nov 2010 19:12:59 GMT attachment set https://svn.boost.org/trac10/ticket/4717 https://svn.boost.org/trac10/ticket/4717 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">djw_function_const_vtable.patch</span> </li> </ul> <p> Implements a const stored_vtable. Passes regressions on gcc 4.2, msvc 7.1, 10.0 </p> Ticket viboes Sat, 27 Nov 2010 08:02:07 GMT type, milestone changed; cc set https://svn.boost.org/trac10/ticket/4717#comment:2 https://svn.boost.org/trac10/ticket/4717#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> added </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost-1.46.0</span> </li> </ul> Ticket Marshall Clow Tue, 18 Jan 2011 15:49:05 GMT <link>https://svn.boost.org/trac10/ticket/4717#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4717#comment:3</guid> <description> <p> I applied this patch locally; it passed regressions on gcc 4.2.1 and clang TOT </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Tue, 31 May 2011 21:16:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4717#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4717#comment:4</guid> <description> <p> Patch applied to trunk in <a class="changeset" href="https://svn.boost.org/trac10/changeset/72316" title="Applied patch from #4717">[72316]</a>; waiting for tests to cycle </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Thu, 02 Jun 2011 15:34:56 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4717#comment:5 https://svn.boost.org/trac10/ticket/4717#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/72347" title="Merge fixes to release; Fixes #4717">[72347]</a>) Merge fixes to release; Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4717" title="#4717: Patches: Non-const local static variable stored_vtable (closed: fixed)">#4717</a> </p> Ticket