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 09:53:51
#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 kab@â¦):
Replying to [comment:9 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.
Ah, I didn't realize that. So there are no objects whose dynamic type is
rv<T>. That would mean the static downcast is hitting the "undefined
behavior" case at the end of 5.2.9/8. And if the compiler can figure that
out (that the T* really can't be an rv<T>*) then it can generate pretty
much any old garbage code.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3950#comment:10> 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