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

2005-01-19 Thread Vassilii Khachaturov
Enclosed is my confession to the upstream list. Should have CCed this here.

You are welcome to close the bug (/me LARTed), unless you feel that the intro 
docs are vague enough for others to fall into the same trap and thus need 
exaction.

--  Forwarded Message  --

Subject: Re: Bug#290782: multi_array.hpp: rebasing via range causes a crash 
while reindex works
Date: Wednesday 19 January 2005 08:18
From: Vassilii Khachaturov [EMAIL PROTECTED]
To: boost@lists.boost.org

   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.

Thanks. It looks like I have misunderstood the extent_range ctor semantics.
Upon re-reading the multi_array reference page in its extent_range section,
I see

extent_range(index start, index finish)

This constructor defines the half open interval [start,finish). The
expression finish must be greater than start.

(I assumed that finish is included in the interval, hence the snippet.)

Vassilii

---


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-01-17 Thread Domenico Andreoli
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 [EMAIL PROTECTED] -

Date: Sun, 16 Jan 2005 19:06:00 +0200
From: Vassilii Khachaturov [EMAIL PROTECTED]
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:
[EMAIL PROTECTED]:$ make t-boost-multiarray-reindex1
g++ -Wall -O3 -g -ansi -pedantic-errors -MMD   t-boost-multiarray-reindex1.cpp  
 -o t-boost-multiarray-reindex1
[EMAIL PROTECTED]:$ ./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_arrayfloat, 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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2005-01-16 Thread Vassilii Khachaturov
Package: libboost-dev
Version: 1.32.0-2
Severity: normal

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:
[EMAIL PROTECTED]:$ make t-boost-multiarray-reindex1
g++ -Wall -O3 -g -ansi -pedantic-errors -MMD   t-boost-multiarray-reindex1.cpp  
 -o t-boost-multiarray-reindex1
[EMAIL PROTECTED]:$ ./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_arrayfloat, 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;
}

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)

Versions of packages libboost-dev depends on:
ii  libstdc++5-3.3-dev [libstdc++ 1:3.3.5-5  The GNU Standard C++ Library v3 (d

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]