Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3950: boost::interprocess::mapped_region destructor deletes shm where it shouldn't.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-23 07:51:50
#3950: boost::interprocess::mapped_region destructor deletes shm where it
shouldn't.
-------------------------------------------+--------------------------------
Reporter: Lénaïc Huard <lhuard@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: interprocess
Version: Boost 1.42.0 | Severity: Problem
Keywords: |
-------------------------------------------+--------------------------------
Comment(by igaztanaga):
I think GCC is right, because the dynamic type of the object is not rv<T>
but T. We don't create any rv<T> object so downcasting T to a non-existent
rv<T> object is at least doubtful. The standard says:
INCITS+ISO+IEC+14882-2003
C++03 standard.
3.10 Lvalues and rvalues / 15
If a program attempts to access the stored value of an object through an
lvalue of other than one of the following types the behavior is
undefined48):
- the dynamic type of the object,
- a cv-qualified version of the dynamic type of the object,
- a type that is the signed or unsigned type corresponding to the
dynamic type of the object,
- a type that is the signed or unsigned type corresponding to a cv-
qualified version of the dynamic type of
the object,
- an aggregate or union type that includes one of the aforementioned
types among its members (including,
recursively, a member of a subaggregate or contained union),
- a type that is a (possibly cv-qualified) base class type of the
dynamic type of the object,
- a char or unsigned char type.
rv<T> is a class, but not an aggregate class, since (8.5.1 Aggregates
[dcl.init.aggr] p.2):
An aggregate class is a class with no user-declared constructors, no
private or protected non-static data members, no base classes, and no
virtual functions.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3950#comment:9> 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:03 UTC