Bug#290782: multi_array.hpp: rebasing via range causes a crash while reindex works

hi all, boost debian package version 1.32.0-2 has been reported the following bug. i didn't find anything in the archive. is it a new entry? cheers domenico ----- Forwarded message from Vassilii Khachaturov <vassilii@tarunz.org> ----- Date: Sun, 16 Jan 2005 19:06:00 +0200 From: Vassilii Khachaturov <vassilii@tarunz.org> Subject: Bug#290782: multi_array.hpp: rebasing via range causes a crash while reindex works When a multi_array rebasing to 1 is attempted via extent_range, a segmentation fault happens on accessing the boundary element. Workaround: use reindex. See the snippet below. The 1.32.0-2 was built locally from the source package. -- Transcript of a crash: vassilii@ilmarinen:$ make t-boost-multiarray-reindex1 g++ -Wall -O3 -g -ansi -pedantic-errors -MMD t-boost-multiarray-reindex1.cpp -o t-boost-multiarray-reindex1 vassilii@ilmarinen:$ ./t-boost-multiarray-reindex1 Segmentation fault -- Test that causes the crash (t-boost-multiarray-reindex1.cpp): #include <boost/multi_array.hpp> int main() { typedef boost::multi_array<float, 1> arr; float pi = 3.14; #ifdef WORKAROUND arr a(boost::extents[ 1 ]); a.reindex(1); #else arr a(boost::extents[ arr::extent_range(1, 1) ]); #endif a[1] = pi; return 0; } ----- End forwarded message ----- -----[ Domenico Andreoli, aka cavok --[ http://people.debian.org/~cavok/gpgkey.asc ---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

* lunedì 17 gennaio 2005, alle 12:06, Domenico Andreoli scrive:
boost debian package version 1.32.0-2 has been reported the following bug. i didn't find anything in the archive. is it a new entry?
[...]
arr a(boost::extents[ arr::extent_range(1, 1) ]); I'm not a multi.array user, but this is an invalid range. See Table 4 [1] Invariants: o Valid range [a.begin(),a.end()) is a valid range.
Derfel. [1] http://www.boost.org/libs/multi_array/doc/reference.html
participants (2)
-
Domenico Andreoli
-
Federico 'Derfel' Stella