Repository: ericniebler/range-v3

Issue #293: Simple action::insert of view::iota into vector causes Clang ASAN error
Created: 2016-03-07T21:40:20Z
I'm getting a "container-overflow" error when I compile and run the following code under Clang (v3.6.2-1) address-sanitizer. Perhaps this is an error / false-positive in Clang's address-sanitizer. Please can you shed an light on what you think might be happening?
Many thanks for your help.
#include <range/v3/all.hpp>

int main() {
    std::vector<int> fred = { 0, 1, 2 };

    // This is fine
    ranges::action::insert( fred, std::end( fred ), std::vector<int>{ { 3, 4, 5 } } );

    // This causes Clang ASAN to report container-overflow
    ranges::action::insert( fred, std::end( fred ), ranges::view::iota( 3, 6 ) );
}
Commands:
clang++ -g -DRANGES_SUPPRESS_IOTA_WARNING -std=c++14 -stdlib=libc++ -fsanitize=address -fno-omit-frame-pointer -isystem range-v3/include append_prob.cpp -o append_prob.clang_asan
setenv ASAN_SYMBOLIZER_PATH /usr/lib/llvm-3.6/bin/llvm-symbolizer
setenv ASAN_OPTIONS         "detect_leaks=1 symbolize=1 external_symbolizer_path=/usr/lib/llvm-3.6/bin/llvm-symbolizer"
./append_prob.clang_asan

Errors:
=================================================================
==12853==ERROR: AddressSanitizer: container-overflow on address 0x60400000dfe8 at pc 0x0000004e9aa2 bp 0x7fffdf3a5a10 sp 0x7fffdf3a5a08
WRITE of size 4 at 0x60400000dfe8 thread T0
    #0 0x4e9aa1 in void std::__1::allocator<int>::construct<int, int>(int*, int&&) /usr/include/c++/v1/memory:1645:13
    #1 0x4e9aa1 in void std::__1::allocator_traits<std::__1::allocator<int> >::__construct<int, int>(std::__1::integral_constant<bool, true>, std::__1::allocator<int>&, int*, int&&) /usr/include/c++/v1/memory:1572
    #2 0x4e9aa1 in void std::__1::allocator_traits<std::__1::allocator<int> >::construct<int, int>(std::__1::allocator<int>&, int*, int&&) /usr/include/c++/v1/memory:1453
    #3 0x4e9aa1 in _ZNSt3__16vectorIiNS_9allocatorIiEEE6insertIN6ranges2v314basic_iteratorINS6_9iota_viewIivEENS6_16default_sentinelEEEEENS_9enable_ifIXaaaasr19__is_input_iteratorIT_EE5valuentsr21__is_forward_iteratorISD_EE5valuesr16is_constructibleIiNS_15iterator_traitsISD_E9referenceEEE5valueENS_11__wrap_iterIPiEEE4typeENSH_IPKiEESD_SD_ /usr/include/c++/v1/vector:1893
    #4 0x4e60de in decltype (((ranges::v3::(anonymous namespace)::unwrap_reference({parm#1})).insert)(ranges::v3::(anonymous namespace)::begin(ranges::v3::(anonymous namespace)::unwrap_reference({parm#1})), (ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>){ranges::v3::(anonymous namespace)::begin({parm#3})}, (ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>){ranges::v3::(anonymous namespace)::end({parm#3})})) ranges::v3::adl_insert_detail::detail::insert_impl<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::detail::take_exactly_view_<ranges::v3::iota_view<int, void>, true>, ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::detail::take_exactly_view_<ranges::v3::iota_view<int, void>, true>&&, std::__1::integral_constant<bool, true>) /tmp/range-v3/include/range/v3/action/insert.hpp:122:28
    #5 0x4e4e85 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_6detail18take_exactly_view_INS0_9iota_viewIivEELb1EEENS0_14basic_iteratorISF_NS0_16default_sentinelEEELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSM_INSP_IbJXsrNNS0_8concepts6modelsINSQ_10ReservableEJSK_EEE4typeE5valueEXsrNNSR_INSQ_17RandomAccessRangeEJSK_EEE4typeE5valueEEEENSP_IbJXoosrNST_4typeE5valueLb1EEXoosrNSV_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNSR_INSQ_10SizedRangeEJSL_EEE4typeE5valueEEEENSP_IbJXoosrNSY_4typeE5valueLb1EEXoosrNS10_4typeE5valueLb1EEEEEEEilEEEOSK_T0_OSL_ /tmp/range-v3/include/range/v3/action/insert.hpp:141:13
    #6 0x4e41eb in _ZNK6ranges2v317adl_insert_detail9insert_fnclIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_6detail18take_exactly_view_INS0_9iota_viewIivEELb1EEELi42ELi0EEEDTcl6insertclsr3stdE7forwardIT_Efp_Efp0_clsr3stdE7forwardIT1_Efp1_EEEOSI_T0_OSJ_ /tmp/range-v3/include/range/v3/action/insert.hpp:199:28
    #7 0x4e32b8 in main /tmp/append_prob.cpp:10:2
    #8 0x7f998a362a3f in __libc_start_main /build/buildd/glibc-2.21/csu/libc-start.c:289
    #9 0x4392c8 in _start (/tmp/append_prob.clang_asan+0x4392c8)

0x60400000dfe8 is located 24 bytes inside of 36-byte region [0x60400000dfd0,0x60400000dff4)
allocated by thread T0 here:
    #0 0x4df712 in operator new(unsigned long) (/tmp/append_prob.clang_asan+0x4df712)
    #1 0x5007eb in std::__1::__allocate(unsigned long) /usr/include/c++/v1/new:156:10
    #2 0x5007eb in std::__1::allocator<int>::allocate(unsigned long, void const*) /usr/include/c++/v1/memory:1634
    #3 0x5007eb in std::__1::allocator_traits<std::__1::allocator<int> >::allocate(std::__1::allocator<int>&, unsigned long) /usr/include/c++/v1/memory:1439
    #4 0x5007eb in std::__1::__split_buffer<int, std::__1::allocator<int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<int>&) /usr/include/c++/v1/__split_buffer:325
    #5 0x4e7041 in std::__1::vector<int, std::__1::allocator<int> >::reserve(unsigned long) /usr/include/c++/v1/vector:1534:53
    #6 0x4e58f8 in decltype (((ranges::v3::(anonymous namespace)::unwrap_reference({parm#1})).insert)(ranges::v3::(anonymous namespace)::begin(ranges::v3::(anonymous namespace)::unwrap_reference({parm#1})), (ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>){ranges::v3::(anonymous namespace)::begin({parm#3})}, (ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>){ranges::v3::(anonymous namespace)::end({parm#3})})) ranges::v3::adl_insert_detail::detail::insert_impl<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::detail::take_exactly_view_<ranges::v3::iota_view<int, void>, true>, ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::detail::take_exactly_view_<ranges::v3::iota_view<int, void>, true>&&, std::__1::integral_constant<bool, true>) /tmp/range-v3/include/range/v3/action/insert.hpp:121:21
    #7 0x4e4e85 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_6detail18take_exactly_view_INS0_9iota_viewIivEELb1EEENS0_14basic_iteratorISF_NS0_16default_sentinelEEELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSM_INSP_IbJXsrNNS0_8concepts6modelsINSQ_10ReservableEJSK_EEE4typeE5valueEXsrNNSR_INSQ_17RandomAccessRangeEJSK_EEE4typeE5valueEEEENSP_IbJXoosrNST_4typeE5valueLb1EEXoosrNSV_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNSR_INSQ_10SizedRangeEJSL_EEE4typeE5valueEEEENSP_IbJXoosrNSY_4typeE5valueLb1EEXoosrNS10_4typeE5valueLb1EEEEEEEilEEEOSK_T0_OSL_ /tmp/range-v3/include/range/v3/action/insert.hpp:141:13
    #8 0x4e41eb in _ZNK6ranges2v317adl_insert_detail9insert_fnclIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_6detail18take_exactly_view_INS0_9iota_viewIivEELb1EEELi42ELi0EEEDTcl6insertclsr3stdE7forwardIT_Efp_Efp0_clsr3stdE7forwardIT1_Efp1_EEEOSI_T0_OSJ_ /tmp/range-v3/include/range/v3/action/insert.hpp:199:28
    #9 0x4e32b8 in main /tmp/append_prob.cpp:10:2
    #10 0x7f998a362a3f in __libc_start_main /build/buildd/glibc-2.21/csu/libc-start.c:289

SUMMARY: AddressSanitizer: container-overflow /usr/include/c++/v1/memory:1645 void std::__1::allocator<int>::construct<int, int>(int*, int&&)
Shadow bytes around the buggy address:
  0x0c087fff9ba0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9bb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9bc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9bd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9be0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c087fff9bf0: fa fa fa fa fa fa fa fa fa fa 00 00 00[fc]fc fa
  0x0c087fff9c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c087fff9c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==12853==ABORTING

Duplicate issue #206: AddressSanitizer has been disabled in travis for a while...
Created: 2015-07-28T14:07:30Z
TL;DR:

travis ASan builds are not testing anything, so we should disable them
ASan complains about memory errors in a couple of tests (action::insert/push_front/push_back) where valgrind doesn't complain.

Long story short, today ASan panicked in an app using range-v3 due to some issue with action::push_back. I looked into it and learned the following:


LLVM ubuntu builds come with ASan disabled since January

LLVM deprecated the auto-tools build system in ~January in favor of CMake. ASan doesn't work with auto-tools anymore and all LLVM ubuntu package build-bots still use the deprecated auto-tools system.



I ran ASan locally in Debug mode with the following flags and the following test "broke":

cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address,integer,undefined,leak -fno-omit-frame-pointer" -DCMAKE_BUILD_TYPE=Debug


action::insert
action::push_front
action::push_back



All the error messages are very similar so it seems to be the same issue showing up in ranges::insert.
Can anybody reproduce this?
Here the output:
action::insert
=================================================================
==12222==ERROR: AddressSanitizer: container-overflow on address 0x60300000db50 at pc 0x00010fd53414 bp 0x7fff4ff386c0 sp 0x7fff4ff386b8
WRITE of size 4 at 0x60300000db50 thread T0
    #0 0x10fd53413 in std::__1::enable_if<((__is_input_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value) && (!(__is_forward_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value))) && (is_constructible<int, std::__1::iterator_traits<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::reference>::value), std::__1::__wrap_iter<int*> >::type std::__1::vector<int, std::__1::allocator<int> >::insert<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >(std::__1::__wrap_iter<int const*>, ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > >, ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > >) (range-v3/build/./test/action/act.insert+0x100091413)
    #1 0x10fd50544 in _ZN6ranges2v317adl_insert_detail6detail11insert_implIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_4view7ints_fnEEENS0_14basic_iteratorINS0_6detail13common_cursorINSH_INSI_14counted_cursorINSH_INS0_9iota_viewIivEENS0_16default_sentinelEEExEENSI_16counted_sentinelEEENS0_14basic_sentinelISQ_EEEESU_EELi42ELi0EEEDTcldtclL_ZNS0_12_GLOBAL__N_116unwrap_referenceEEfp_E6insertclL_ZNSW_5beginEEclL_ZNSW_16unwrap_referenceEEfp_EEcvT2_ilclL_ZNSW_5beginEEfp1_EEcvSX_ilclL_ZNSW_3endEEfp1_EEEEOT_T0_OT1_NS4_17integral_constantIbLb1EEE (range-v3/build/./test/action/act.insert+0x10008e544)
    #2 0x10fd4e9c2 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_4view7ints_fnEEENS0_14basic_iteratorINS0_6detail13common_cursorINSG_INSH_14counted_cursorINSG_INS0_9iota_viewIivEENS0_16default_sentinelEEExEENSH_16counted_sentinelEEENS0_14basic_sentinelISP_EEEEST_EELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSX_INS10_IbJXsrNNS0_8concepts6modelsINS11_10ReservableEJSV_EEE4typeE5valueEXsrNNS12_INS11_17RandomAccessRangeEJSV_EEE4typeE5valueEEEENS10_IbJXoosrNS14_4typeE5valueLb1EEXoosrNS16_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNS12_INS11_18SizedIteratorRangeEJDTclL_ZNS0_12_GLOBAL__N_15beginEEcl3valISW_EEEEDTclL_ZNS1B_3endEEcl3valISW_EEEEEEE4typeE5valueEEEENS10_IbJXoosrNS19_4typeE5valueLb1EEXoosrNS1E_4typeE5valueLb1EEEEEEE_EEEOSV_T0_OSW_ (range-v3/build/./test/action/act.insert+0x10008c9c2)
    #3 0x10fd057b9 in decltype(insert(std::forward<std::__1::vector<int, std::__1::allocator<int> >&>(fp)fp0std::forward<ranges::v3::take_exactly_view<ranges::v3::view::ints_fn> >(fp1))) ranges::v3::adl_insert_detail::insert_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::view::ints_fn>, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::view::ints_fn>&&) const (range-v3/build/./test/action/act.insert+0x1000437b9)
    #4 0x10fcc7539 in main (range-v3/build/./test/action/act.insert+0x100005539)
    #5 0x7fff85c1a5c8 in start (/usr/lib/system/libdyld.dylib+0x35c8)
    #6 0x0  (<unknown module>)

0x60300000db50 is located 16 bytes inside of 28-byte region [0x60300000db40,0x60300000db5c)
allocated by thread T0 here:
    #0 0x10ff5babb in wrap__Znwm (/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib+0x45abb)
    #1 0x10fd26167 in std::__1::__split_buffer<int, std::__1::allocator<int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<int>&) (range-v3/build/./test/action/act.insert+0x100064167)
    #2 0x10fd19c0a in std::__1::__split_buffer<int, std::__1::allocator<int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<int>&) (range-v3/build/./test/action/act.insert+0x100057c0a)
    #3 0x10fd3d9d0 in std::__1::vector<int, std::__1::allocator<int> >::reserve(unsigned long) (range-v3/build/./test/action/act.insert+0x10007b9d0)
    #4 0x10fd4f825 in _ZN6ranges2v317adl_insert_detail6detail11insert_implIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_4view7ints_fnEEENS0_14basic_iteratorINS0_6detail13common_cursorINSH_INSI_14counted_cursorINSH_INS0_9iota_viewIivEENS0_16default_sentinelEEExEENSI_16counted_sentinelEEENS0_14basic_sentinelISQ_EEEESU_EELi42ELi0EEEDTcldtclL_ZNS0_12_GLOBAL__N_116unwrap_referenceEEfp_E6insertclL_ZNSW_5beginEEclL_ZNSW_16unwrap_referenceEEfp_EEcvT2_ilclL_ZNSW_5beginEEfp1_EEcvSX_ilclL_ZNSW_3endEEfp1_EEEEOT_T0_OT1_NS4_17integral_constantIbLb1EEE (range-v3/build/./test/action/act.insert+0x10008d825)
    #5 0x10fd4e9c2 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_4view7ints_fnEEENS0_14basic_iteratorINS0_6detail13common_cursorINSG_INSH_14counted_cursorINSG_INS0_9iota_viewIivEENS0_16default_sentinelEEExEENSH_16counted_sentinelEEENS0_14basic_sentinelISP_EEEEST_EELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSX_INS10_IbJXsrNNS0_8concepts6modelsINS11_10ReservableEJSV_EEE4typeE5valueEXsrNNS12_INS11_17RandomAccessRangeEJSV_EEE4typeE5valueEEEENS10_IbJXoosrNS14_4typeE5valueLb1EEXoosrNS16_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNS12_INS11_18SizedIteratorRangeEJDTclL_ZNS0_12_GLOBAL__N_15beginEEcl3valISW_EEEEDTclL_ZNS1B_3endEEcl3valISW_EEEEEEE4typeE5valueEEEENS10_IbJXoosrNS19_4typeE5valueLb1EEXoosrNS1E_4typeE5valueLb1EEEEEEE_EEEOSV_T0_OSW_ (range-v3/build/./test/action/act.insert+0x10008c9c2)
    #6 0x10fd057b9 in decltype(insert(std::forward<std::__1::vector<int, std::__1::allocator<int> >&>(fp)fp0std::forward<ranges::v3::take_exactly_view<ranges::v3::view::ints_fn> >(fp1))) ranges::v3::adl_insert_detail::insert_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::view::ints_fn>, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::view::ints_fn>&&) const (range-v3/build/./test/action/act.insert+0x1000437b9)
    #7 0x10fcc7539 in main (range-v3/build/./test/action/act.insert+0x100005539)
    #8 0x7fff85c1a5c8 in start (/usr/lib/system/libdyld.dylib+0x35c8)
    #9 0x0  (<unknown module>)

SUMMARY: AddressSanitizer: container-overflow (range-v3/build/./test/action/act.insert+0x100091413) in std::__1::enable_if<((__is_input_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value) && (!(__is_forward_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iter
Shadow bytes around the buggy address:
  0x1c0600001b10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x1c0600001b60: fa fa fa fa fa fa fa fa 00 00[fc]fc fa fa 00 00
  0x1c0600001b70: 00 00 fa fa 00 00 06 fa fa fa 00 00 00 03 fa fa
  0x1c0600001b80: 00 00 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa
  0x1c0600001b90: fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa 00 00
  0x1c0600001ba0: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa
  0x1c0600001bb0: 00 00 00 fa fa fa fd fd fd fa fa fa 00 00 00 fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==12222==ABORTING
action::push_back
=================================================================
==12276==ERROR: AddressSanitizer: container-overflow on address 0x60300000db4c at pc 0x0001059d53f4 bp 0x7fff5a342d00 sp 0x7fff5a342cf8
WRITE of size 4 at 0x60300000db4c thread T0
    #0 0x1059d53f3 in std::__1::enable_if<((__is_input_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value) && (!(__is_forward_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value))) && (is_constructible<int, std::__1::iterator_traits<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::reference>::value), std::__1::__wrap_iter<int*> >::type std::__1::vector<int, std::__1::allocator<int> >::insert<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >(std::__1::__wrap_iter<int const*>, ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > >, ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > >) (range-v3/build/./test/action/act.push_back+0x10011e3f3)
    #1 0x1059d2524 in _ZN6ranges2v317adl_insert_detail6detail11insert_implIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSH_INSI_14counted_cursorINSH_ISF_NS0_16default_sentinelEEExEENSI_16counted_sentinelEEENS0_14basic_sentinelISO_EEEESS_EELi42ELi0EEEDTcldtclL_ZNS0_12_GLOBAL__N_116unwrap_referenceEEfp_E6insertclL_ZNSU_5beginEEclL_ZNSU_16unwrap_referenceEEfp_EEcvT2_ilclL_ZNSU_5beginEEfp1_EEcvSV_ilclL_ZNSU_3endEEfp1_EEEEOT_T0_OT1_NS4_17integral_constantIbLb1EEE (range-v3/build/./test/action/act.push_back+0x10011b524)
    #2 0x1059d09a2 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSG_INSH_14counted_cursorINSG_ISE_NS0_16default_sentinelEEExEENSH_16counted_sentinelEEENS0_14basic_sentinelISN_EEEESR_EELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSV_INSY_IbJXsrNNS0_8concepts6modelsINSZ_10ReservableEJST_EEE4typeE5valueEXsrNNS10_INSZ_17RandomAccessRangeEJST_EEE4typeE5valueEEEENSY_IbJXoosrNS12_4typeE5valueLb1EEXoosrNS14_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNS10_INSZ_18SizedIteratorRangeEJDTclL_ZNS0_12_GLOBAL__N_15beginEEcl3valISU_EEEEDTclL_ZNS19_3endEEcl3valISU_EEEEEEE4typeE5valueEEEENSY_IbJXoosrNS17_4typeE5valueLb1EEXoosrNS1C_4typeE5valueLb1EEEEEEE_EEEOST_T0_OSU_ (range-v3/build/./test/action/act.push_back+0x1001199a2)
    #3 0x1059d0339 in decltype(insert(std::forward<std::__1::vector<int, std::__1::allocator<int> >&>(fp)fp0std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp1))) ranges::v3::adl_insert_detail::insert_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_back+0x100119339)
    #4 0x1059cfe3e in decltype((void)(ranges::v3::(anonymous namespace)::insert(ranges::v3::(anonymous namespace)::unwrap_reference(fp)ranges::v3::(anonymous namespace)::end(fp)std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp0)))) ranges::v3::adl_push_back_detail::push_back<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) (range-v3/build/./test/action/act.push_back+0x100118e3e)
    #5 0x1059cf91f in std::__1::vector<int, std::__1::allocator<int> >& ranges::v3::adl_push_back_detail::push_back_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_back+0x10011891f)
    #6 0x105993dda in _ZNK6ranges2v36action6actionINS0_20adl_push_back_detail12push_back_fnEEclINSt3__16vectorIiNS7_9allocatorIiEEEEJNS0_17take_exactly_viewINS0_9iota_viewIivEEEEELi42ELi0EEEDTcldtdefpT7action_fp_spclsr3stdE7forwardIT0_Efp0_EEERT_DpOSG_ (range-v3/build/./test/action/act.push_back+0x1000dcdda)
    #7 0x1058bb9cc in main (range-v3/build/./test/action/act.push_back+0x1000049cc)
    #8 0x7fff85c1a5c8 in start (/usr/lib/system/libdyld.dylib+0x35c8)
    #9 0x0  (<unknown module>)

0x60300000db4c is located 12 bytes inside of 24-byte region [0x60300000db40,0x60300000db58)
allocated by thread T0 here:
    #0 0x105d34abb in wrap__Znwm (lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib+0x45abb)
    #1 0x1059a9a27 in std::__1::__split_buffer<int, std::__1::allocator<int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<int>&) (range-v3/build/./test/action/act.push_back+0x1000f2a27)
    #2 0x1059a63da in std::__1::__split_buffer<int, std::__1::allocator<int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<int>&) (range-v3/build/./test/action/act.push_back+0x1000ef3da)
    #3 0x1059a1f60 in std::__1::vector<int, std::__1::allocator<int> >::reserve(unsigned long) (range-v3/build/./test/action/act.push_back+0x1000eaf60)
    #4 0x1059d1805 in _ZN6ranges2v317adl_insert_detail6detail11insert_implIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSH_INSI_14counted_cursorINSH_ISF_NS0_16default_sentinelEEExEENSI_16counted_sentinelEEENS0_14basic_sentinelISO_EEEESS_EELi42ELi0EEEDTcldtclL_ZNS0_12_GLOBAL__N_116unwrap_referenceEEfp_E6insertclL_ZNSU_5beginEEclL_ZNSU_16unwrap_referenceEEfp_EEcvT2_ilclL_ZNSU_5beginEEfp1_EEcvSV_ilclL_ZNSU_3endEEfp1_EEEEOT_T0_OT1_NS4_17integral_constantIbLb1EEE (range-v3/build/./test/action/act.push_back+0x10011a805)
    #5 0x1059d09a2 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSG_INSH_14counted_cursorINSG_ISE_NS0_16default_sentinelEEExEENSH_16counted_sentinelEEENS0_14basic_sentinelISN_EEEESR_EELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSV_INSY_IbJXsrNNS0_8concepts6modelsINSZ_10ReservableEJST_EEE4typeE5valueEXsrNNS10_INSZ_17RandomAccessRangeEJST_EEE4typeE5valueEEEENSY_IbJXoosrNS12_4typeE5valueLb1EEXoosrNS14_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNS10_INSZ_18SizedIteratorRangeEJDTclL_ZNS0_12_GLOBAL__N_15beginEEcl3valISU_EEEEDTclL_ZNS19_3endEEcl3valISU_EEEEEEE4typeE5valueEEEENSY_IbJXoosrNS17_4typeE5valueLb1EEXoosrNS1C_4typeE5valueLb1EEEEEEE_EEEOST_T0_OSU_ (range-v3/build/./test/action/act.push_back+0x1001199a2)
    #6 0x1059d0339 in decltype(insert(std::forward<std::__1::vector<int, std::__1::allocator<int> >&>(fp)fp0std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp1))) ranges::v3::adl_insert_detail::insert_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_back+0x100119339)
    #7 0x1059cfe3e in decltype((void)(ranges::v3::(anonymous namespace)::insert(ranges::v3::(anonymous namespace)::unwrap_reference(fp)ranges::v3::(anonymous namespace)::end(fp)std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp0)))) ranges::v3::adl_push_back_detail::push_back<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) (range-v3/build/./test/action/act.push_back+0x100118e3e)
    #8 0x1059cf91f in std::__1::vector<int, std::__1::allocator<int> >& ranges::v3::adl_push_back_detail::push_back_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_back+0x10011891f)
    #9 0x105993dda in _ZNK6ranges2v36action6actionINS0_20adl_push_back_detail12push_back_fnEEclINSt3__16vectorIiNS7_9allocatorIiEEEEJNS0_17take_exactly_viewINS0_9iota_viewIivEEEEELi42ELi0EEEDTcldtdefpT7action_fp_spclsr3stdE7forwardIT0_Efp0_EEERT_DpOSG_ (range-v3/build/./test/action/act.push_back+0x1000dcdda)
    #10 0x1058bb9cc in main (range-v3/build/./test/action/act.push_back+0x1000049cc)
    #11 0x7fff85c1a5c8 in start (/usr/lib/system/libdyld.dylib+0x35c8)
    #12 0x0  (<unknown module>)

SUMMARY: AddressSanitizer: container-overflow (range-v3/build/./test/action/act.push_back+0x10011e3f3) in std::__1::enable_if<((__is_input_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value) && (!(__is_forward_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_i
Shadow bytes around the buggy address:
  0x1c0600001b10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x1c0600001b60: fa fa fa fa fa fa fa fa 00[04]fc fa fa fa 00 00
  0x1c0600001b70: 00 00 fa fa 00 00 06 fa fa fa 00 00 00 03 fa fa
  0x1c0600001b80: 00 00 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa
  0x1c0600001b90: fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa 00 00
  0x1c0600001ba0: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa
  0x1c0600001bb0: 00 00 00 fa fa fa fd fd fd fa fa fa 00 00 00 fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==12276==ABORTING
action::push_front
=================================================================
==12317==ERROR: AddressSanitizer: container-overflow on address 0x60300000db4c at pc 0x00010a149be4 bp 0x7fff55bcdce0 sp 0x7fff55bcdcd8
WRITE of size 4 at 0x60300000db4c thread T0
    #0 0x10a149be3 in std::__1::enable_if<((__is_input_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value) && (!(__is_forward_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value))) && (is_constructible<int, std::__1::iterator_traits<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::reference>::value), std::__1::__wrap_iter<int*> >::type std::__1::vector<int, std::__1::allocator<int> >::insert<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >(std::__1::__wrap_iter<int const*>, ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > >, ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > >) (range-v3/build/./test/action/act.push_front+0x10011dbe3)
    #1 0x10a146d14 in _ZN6ranges2v317adl_insert_detail6detail11insert_implIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSH_INSI_14counted_cursorINSH_ISF_NS0_16default_sentinelEEExEENSI_16counted_sentinelEEENS0_14basic_sentinelISO_EEEESS_EELi42ELi0EEEDTcldtclL_ZNS0_12_GLOBAL__N_116unwrap_referenceEEfp_E6insertclL_ZNSU_5beginEEclL_ZNSU_16unwrap_referenceEEfp_EEcvT2_ilclL_ZNSU_5beginEEfp1_EEcvSV_ilclL_ZNSU_3endEEfp1_EEEEOT_T0_OT1_NS4_17integral_constantIbLb1EEE (range-v3/build/./test/action/act.push_front+0x10011ad14)
    #2 0x10a145192 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSG_INSH_14counted_cursorINSG_ISE_NS0_16default_sentinelEEExEENSH_16counted_sentinelEEENS0_14basic_sentinelISN_EEEESR_EELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSV_INSY_IbJXsrNNS0_8concepts6modelsINSZ_10ReservableEJST_EEE4typeE5valueEXsrNNS10_INSZ_17RandomAccessRangeEJST_EEE4typeE5valueEEEENSY_IbJXoosrNS12_4typeE5valueLb1EEXoosrNS14_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNS10_INSZ_18SizedIteratorRangeEJDTclL_ZNS0_12_GLOBAL__N_15beginEEcl3valISU_EEEEDTclL_ZNS19_3endEEcl3valISU_EEEEEEE4typeE5valueEEEENSY_IbJXoosrNS17_4typeE5valueLb1EEXoosrNS1C_4typeE5valueLb1EEEEEEE_EEEOST_T0_OSU_ (range-v3/build/./test/action/act.push_front+0x100119192)
    #3 0x10a144b29 in decltype(insert(std::forward<std::__1::vector<int, std::__1::allocator<int> >&>(fp)fp0std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp1))) ranges::v3::adl_insert_detail::insert_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_front+0x100118b29)
    #4 0x10a144635 in decltype((void)(ranges::v3::(anonymous namespace)::insert(fpranges::v3::(anonymous namespace)::begin(fp)std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp0)))) ranges::v3::adl_push_front_detail::push_front<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) (range-v3/build/./test/action/act.push_front+0x100118635)
    #5 0x10a14419f in std::__1::vector<int, std::__1::allocator<int> >& ranges::v3::adl_push_front_detail::push_front_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_front+0x10011819f)
    #6 0x10a1086ea in _ZNK6ranges2v36action6actionINS0_21adl_push_front_detail13push_front_fnEEclINSt3__16vectorIiNS7_9allocatorIiEEEEJNS0_17take_exactly_viewINS0_9iota_viewIivEEEEELi42ELi0EEEDTcldtdefpT7action_fp_spclsr3stdE7forwardIT0_Efp0_EEERT_DpOSG_ (range-v3/build/./test/action/act.push_front+0x1000dc6ea)
    #7 0x10a0303fc in main (range-v3/build/./test/action/act.push_front+0x1000043fc)
    #8 0x7fff85c1a5c8 in start (/usr/lib/system/libdyld.dylib+0x35c8)
    #9 0x0  (<unknown module>)

0x60300000db4c is located 12 bytes inside of 24-byte region [0x60300000db40,0x60300000db58)
allocated by thread T0 here:
    #0 0x10a4b4abb in wrap__Znwm (lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib+0x45abb)
    #1 0x10a11db07 in std::__1::__split_buffer<int, std::__1::allocator<int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<int>&) (range-v3/build/./test/action/act.push_front+0x1000f1b07)
    #2 0x10a11a4ba in std::__1::__split_buffer<int, std::__1::allocator<int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<int>&) (range-v3/build/./test/action/act.push_front+0x1000ee4ba)
    #3 0x10a1165c0 in std::__1::vector<int, std::__1::allocator<int> >::reserve(unsigned long) (range-v3/build/./test/action/act.push_front+0x1000ea5c0)
    #4 0x10a145ff5 in _ZN6ranges2v317adl_insert_detail6detail11insert_implIRNSt3__16vectorIiNS4_9allocatorIiEEEENS4_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSH_INSI_14counted_cursorINSH_ISF_NS0_16default_sentinelEEExEENSI_16counted_sentinelEEENS0_14basic_sentinelISO_EEEESS_EELi42ELi0EEEDTcldtclL_ZNS0_12_GLOBAL__N_116unwrap_referenceEEfp_E6insertclL_ZNSU_5beginEEclL_ZNSU_16unwrap_referenceEEfp_EEcvT2_ilclL_ZNSU_5beginEEfp1_EEcvSV_ilclL_ZNSU_3endEEfp1_EEEEOT_T0_OT1_NS4_17integral_constantIbLb1EEE (range-v3/build/./test/action/act.push_front+0x100119ff5)
    #5 0x10a145192 in _ZN6ranges2v317adl_insert_detail6insertIRNSt3__16vectorIiNS3_9allocatorIiEEEENS3_11__wrap_iterIPiEENS0_17take_exactly_viewINS0_9iota_viewIivEEEENS0_14basic_iteratorINS0_6detail13common_cursorINSG_INSH_14counted_cursorINSG_ISE_NS0_16default_sentinelEEExEENSH_16counted_sentinelEEENS0_14basic_sentinelISN_EEEESR_EELi42ELi0EEEDTclsr6detailE11insert_implclsr3stdE7forwardIT_Efp_Eclsr3stdE4movefp0_Eclsr3stdE7forwardIT1_Efp1_EcvNS3_7is_sameIN4meta2v116integer_sequenceIbJXsrNNSV_INSY_IbJXsrNNS0_8concepts6modelsINSZ_10ReservableEJST_EEE4typeE5valueEXsrNNS10_INSZ_17RandomAccessRangeEJST_EEE4typeE5valueEEEENSY_IbJXoosrNS12_4typeE5valueLb1EEXoosrNS14_4typeE5valueLb1EEEEEEE4typeE5valueEXsrNNS10_INSZ_18SizedIteratorRangeEJDTclL_ZNS0_12_GLOBAL__N_15beginEEcl3valISU_EEEEDTclL_ZNS19_3endEEcl3valISU_EEEEEEE4typeE5valueEEEENSY_IbJXoosrNS17_4typeE5valueLb1EEXoosrNS1C_4typeE5valueLb1EEEEEEE_EEEOST_T0_OSU_ (range-v3/build/./test/action/act.push_front+0x100119192)
    #6 0x10a144b29 in decltype(insert(std::forward<std::__1::vector<int, std::__1::allocator<int> >&>(fp)fp0std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp1))) ranges::v3::adl_insert_detail::insert_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, std::__1::__wrap_iter<int*>, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_front+0x100118b29)
    #7 0x10a144635 in decltype((void)(ranges::v3::(anonymous namespace)::insert(fpranges::v3::(anonymous namespace)::begin(fp)std::forward<ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> > >(fp0)))) ranges::v3::adl_push_front_detail::push_front<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) (range-v3/build/./test/action/act.push_front+0x100118635)
    #8 0x10a14419f in std::__1::vector<int, std::__1::allocator<int> >& ranges::v3::adl_push_front_detail::push_front_fn::operator()<std::__1::vector<int, std::__1::allocator<int> >&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >, 42, 0>(std::__1::vector<int, std::__1::allocator<int> >&&&, ranges::v3::take_exactly_view<ranges::v3::iota_view<int, void> >&&) const (range-v3/build/./test/action/act.push_front+0x10011819f)
    #9 0x10a1086ea in _ZNK6ranges2v36action6actionINS0_21adl_push_front_detail13push_front_fnEEclINSt3__16vectorIiNS7_9allocatorIiEEEEJNS0_17take_exactly_viewINS0_9iota_viewIivEEEEELi42ELi0EEEDTcldtdefpT7action_fp_spclsr3stdE7forwardIT0_Efp0_EEERT_DpOSG_ (range-v3/build/./test/action/act.push_front+0x1000dc6ea)
    #10 0x10a0303fc in main (range-v3/build/./test/action/act.push_front+0x1000043fc)
    #11 0x7fff85c1a5c8 in start (/usr/lib/system/libdyld.dylib+0x35c8)
    #12 0x0  (<unknown module>)

SUMMARY: AddressSanitizer: container-overflow (range-v3/build/./test/action/act.push_front+0x10011dbe3) in std::__1::enable_if<((__is_input_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> >, ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_iterator<ranges::v3::iota_view<int, void>, ranges::v3::default_sentinel>, long long>, ranges::v3::detail::counted_sentinel>, ranges::v3::basic_sentinel<ranges::v3::detail::counted_sentinel> > > >::value) && (!(__is_forward_iterator<ranges::v3::basic_iterator<ranges::v3::detail::common_cursor<ranges::v3::basic_iterator<ranges::v3::detail::counted_cursor<ranges::v3::basic_
Shadow bytes around the buggy address:
  0x1c0600001b10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0600001b50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x1c0600001b60: fa fa fa fa fa fa fa fa 00[04]fc fa fa fa 00 00
  0x1c0600001b70: 00 00 fa fa 00 00 06 fa fa fa 00 00 00 03 fa fa
  0x1c0600001b80: 00 00 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa
  0x1c0600001b90: fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa 00 00
  0x1c0600001ba0: 00 fa fa fa 00 00 00 00 fa fa 00 00 00 fa fa fa
  0x1c0600001bb0: 00 00 00 fa fa fa fd fd fd fa fa fa 00 00 00 fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==12317==ABORTING

Closing comment (2016-03-11T09:47:42Z): @CaseyCarter I just tried this with clang (tot-3.9) and libc++ (tot-3.9) and these issues are gone. Is this related to #293 ? Looks very similar.