Boost C++ Libraries: Ticket #1461: multi_array::resize index error https://svn.boost.org/trac10/ticket/1461 <p> multi_array::resize wants to copy the old data to the new. However, it confuses the old and new arrays when calculating the indices for the subviews. As a result, creating the view asserts. </p> <p> Minimal crashing example: </p> <p> #include &lt;boost/multi_array.hpp&gt; </p> <p> int main() { </p> <blockquote> <p> typedef boost::multi_array&lt;int, 1&gt; ar_t; typedef ar_t::extent_range range; ar_t ar; ar.resize(boost::extents[range(-3, 3)]); </p> </blockquote> <p> } </p> <p> The attached patched solves the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1461 Trac 1.4.3 wasti.redl@… Sun, 18 Nov 2007 20:49:29 GMT attachment set https://svn.boost.org/trac10/ticket/1461 https://svn.boost.org/trac10/ticket/1461 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">multi_array.patch</span> </li> </ul> <p> Patch that solves the bug. </p> Ticket Ronald Garcia Tue, 20 Nov 2007 15:56:51 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1461#comment:1 https://svn.boost.org/trac10/ticket/1461#comment:1 <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/41257" title="Fixes #1461 ">[41257]</a>) Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1461" title="#1461: Bugs: multi_array::resize index error (closed: fixed)">#1461</a> </p> Ticket Eric Niebler Tue, 20 Nov 2007 21:11:21 GMT <link>https://svn.boost.org/trac10/ticket/1461#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1461#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/41268" title="Merged revisions 41247-41267 via svnmerge from ...">[41268]</a>) Merged revisions 41247-41267 via svnmerge from <a class="ext-link" href="https://svn.boost.org/svn/boost/trunk"><span class="icon">​</span>https://svn.boost.org/svn/boost/trunk</a> </p> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41249" title="Fixed SNAFU caused by last checkin. ">r41249</a> | schoepflin | 2007-11-20 01:07:05 -0800 (Tue, 20 Nov 2007) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fixed SNAFU caused by last checkin. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41251" title="aCC on PA-RISC emits hard errors if a numeric constant underflows: ...">r41251</a> | johnmaddock | 2007-11-20 03:12:36 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> aCC on PA-RISC emits hard errors if a numeric constant underflows: enable existing workaround for that compiler. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41252" title="Changed order of #includes to keep Borland C++ 5.5.1 happy.">r41252</a> | johnmaddock | 2007-11-20 03:18:48 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> Changed order of #includes to keep Borland C++ 5.5.1 happy. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41253" title="Wave: Suppressed MS warning for tests.">r41253</a> | hkaiser | 2007-11-20 03:20:47 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> Wave: Suppressed MS warning for tests. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41254" title="Added missing #include. Fix warnings on MSVC: the code should now be ...">r41254</a> | johnmaddock | 2007-11-20 03:40:28 -0800 (Tue, 20 Nov 2007) | 4 lines </p> </blockquote> <p> </p> <blockquote> <p> Added missing #include. Fix warnings on MSVC: the code should now be clean with -W4. Fix warnings on gcc: the code should now be clean with -Wall -Wshadow. This fixes Track issues <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/585" title="#585: Bugs: 64 bit compile warning/error for boost::format (closed: fixed)">#585</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/980" title="#980: Patches: boost.format vc8/win32 compilation warning (closed: fixed)">#980</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1196" title="#1196: Bugs: Patch: when BOOST_NO_STD_LOCALE is not defined, ... (closed: fixed)">#1196</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1278" title="#1278: Bugs: declaration of 'str' shadows a member of 'this' (closed: fixed)">#1278</a> and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1340" title="#1340: Patches: missing include statement (closed: fixed)">#1340</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41256" title="Added a simple test that changes index bases while resizing (thanks to ...">r41256</a> | garcia | 2007-11-20 07:56:29 -0800 (Tue, 20 Nov 2007) | 3 lines </p> </blockquote> <p> </p> <blockquote> <p> Added a simple test that changes index bases while resizing (thanks to wasti.redl@… for this code, which caught a bug). </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41257" title="Fixes #1461 ">r41257</a> | garcia | 2007-11-20 07:56:51 -0800 (Tue, 20 Nov 2007) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1461" title="#1461: Bugs: multi_array::resize index error (closed: fixed)">#1461</a> </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41258" title="fix warning in gcc-4.3">r41258</a> | eric_niebler | 2007-11-20 08:52:43 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> fix warning in gcc-4.3 </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41259" title="Added warning suppression for VC-9.">r41259</a> | johnmaddock | 2007-11-20 08:57:32 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> Added warning suppression for VC-9. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41260" title="Allow indication of the Boost.Build location with an argument. This ...">r41260</a> | grafik | 2007-11-20 09:51:21 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> Allow indication of the Boost.Build location with an argument. This allows to override the built-in BB when testing. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41262" title="fixed markup validation error: consolidated two consequtive notes">r41262</a> | bgubenko | 2007-11-20 10:51:04 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> fixed markup validation error: consolidated two consequtive notes </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/41263" title="mark some function_types and serialization library tests for acc toolset">r41263</a> | bgubenko | 2007-11-20 11:09:33 -0800 (Tue, 20 Nov 2007) | 1 line </p> </blockquote> <p> </p> <blockquote> <p> mark some function_types and serialization library tests for acc toolset </p> </blockquote> <p> ........ </p> </description> <category>Ticket</category> </item> </channel> </rss>