Menu

#13 Clang + libc++ crash

1.6.0
accepted
khizmax
None
5
2014-07-07
2013-10-27
khizmax
No

Workaround: use libcds atomics. For that, in libcds 1.4 comment this lines in cds/comiler/clang/defs.h:

// C++11 atomic support - only for libc++
#if __has_feature(cxx_atomic) && defined(_LIBCPP_VERSION)
#   define CDS_CXX11_ATOMIC_SUPPORT     1
#endif

It seems the problem in libc++ atomic implementation. Maybe, clang admits more aggresive optimization around "native" atomics. The problem is observed even in single-threaded apps. The core dumps point to inside of cds::memory::michael::Heap.

Discussion

  • khizmax

    khizmax - 2013-10-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,10 @@
     Workaround: use libcds atomics. For that, in libcds 1.4 comment this lines in cds/comiler/clang/defs.h:
    
    +~~~~~~
     // C++11 atomic support - only for libc++
     #if __has_feature(cxx_atomic) && defined(_LIBCPP_VERSION)
     #   define CDS_CXX11_ATOMIC_SUPPORT     1
    -#endif 
    +#endif
    +~~~~~~ 
    
     It seems the problem in libc++ atomic implementation. Maybe, clang admits more aggresive optimization around "native" atomics. The problem is observed even in single-threaded apps. The core dumps point to inside of cds::memory::michael::Heap.
    
    • Group: 1.5.0 --> 1.6.0
     
  • khizmax

    khizmax - 2014-07-07
     

Log in to post a comment.

MongoDB Logo MongoDB