[LLVMbugs] [Bug 10119] Placement new bug with -O2 or -O3 and -DNDEBUG

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 10 12:51:53 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10119

Eli Friedman <sharparrow1 at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Eli Friedman <sharparrow1 at yahoo.com> 2011-06-10 14:51:53 CDT ---
The issue comes down to the following code in boost::interprocess::offset_ptr:
   void* get_pointer() const
   {  return (internal.m_offset == 1) ? 0 :
(const_cast<char*>(reinterpret_cast<const char*>(this)) + internal.m_offset); }

Given the values of m_offset which are used, this code has undefined behavior
per the C++ standard.  As such, marking invalid; please file a bug against
boost.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list