Re: [Boost-bugs] [Boost C++ Libraries] #11832: clang-cl + boost intrusive = miscompile

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11832: clang-cl + boost intrusive = miscompile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-08 22:38:02

#11832: clang-cl + boost intrusive = miscompile
  Reporter: Yaron Keren <yaron.keren@…> | Owner: igaztanaga
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: intrusive
   Version: Boost 1.59.0 | Severity: Problem
Resolution: | Keywords:

Comment (by Yaron Keren <yaron.keren@…>):

 Reid Kleckner diagnosed the problem in

 In boost/intrusive/detail/parent_from_member.hpp, the implementation of
 offset_from_pointer_to_member goes down the #idefs to the #else case,
 which subtracts one from the offset to create the off-by-one pointer.
 BOOST_INTRUSIVE_MSVC_ABI_PTR_TO_MEMBER should be defined for clang-cl.

 This could be fixed by modifying parent_from_member.hpp:26 from:

 #if defined(BOOST_MSVC) || ((defined(_WIN32) || defined(__WIN32__) ||
 defined(WIN32)) && defined(BOOST_INTEL))


 #if defined(_MSC_VER) || ((defined(_WIN32) || defined(__WIN32__) ||
 defined(WIN32)) && defined(BOOST_INTEL))

 since BOOST_MSVC is defined only for Visual C++ while _MSC_VER is defined
 for both Visual C++ and clang-cl.

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC