https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63345

Malcolm Parsons <malcolm.parsons at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |malcolm.parsons at gmail dot 
com

--- Comment #9 from Malcolm Parsons <malcolm.parsons at gmail dot com> ---
Created attachment 38201
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38201&action=edit
fix undefined behaviour in stl_tree.h

(In reply to Jonathan Wakely from comment #8)
> I believe all the real problems are fixed now.

Clang 3.8.0 still reports undefined behaviour in stl_tree.h using GCC 5.3.0:

lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../include/c++/5.3.0/bits/stl_tree.h:1910:28:
runtime error: upcast of address 0x00000225d260 with insufficient space for an
object of type 'std::_Rb_tree_node<std::pair<const void *const,
testing::(anonymous namespace)::MockObjectState> >'
0x00000225d260: note: pointer points here
 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  60 d2 25 02 00
00 00 00  60 d2 25 02
              ^ 

The attached patch fixes it for me.

Reply via email to