id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8395,Valgrind error in lockfree::queue,adam@…,timblechmann,"The following code {{{ #include int main() { int i = 0; boost::lockfree::queue q(128); q.push(&i); q.push(&i); return 0; } }}} compiled with {{{ g++ -o test test.cpp -I/opt/boost/include }}} produces the following valgrind output {{{ ==32040== Memcheck, a memory error detector ==32040== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==32040== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==32040== Command: ./test ==32040== ==32040== Conditional jump or move depends on uninitialised value(s) ==32040== at 0x401E77: boost::atomics::detail::base_atomic::node>, void, 8u, false>::compare_exchange_strong(boost::lockfree::detail::tagged_ptr::node>&, boost::lockfree::detail::tagged_ptr::node> const&, boost::memory_order, boost::memory_order) volatile (in /tmp/test) ==32040== by 0x401DD9: boost::atomics::detail::base_atomic::node>, void, 8u, false>::compare_exchange_weak(boost::lockfree::detail::tagged_ptr::node>&, boost::lockfree::detail::tagged_ptr::node> const&, boost::memory_order, boost::memory_order) volatile (in /tmp/test) ==32040== by 0x4019E0: boost::atomics::detail::base_atomic::node>, void, 8u, false>::compare_exchange_weak(boost::lockfree::detail::tagged_ptr::node>&, boost::lockfree::detail::tagged_ptr::node>, boost::memory_order) volatile (in /tmp/test) ==32040== by 0x40121C: bool boost::lockfree::queue::do_push(int* const&) (in /tmp/test) ==32040== by 0x400CF6: boost::lockfree::queue::push(int* const&) (in /tmp/test) ==32040== by 0x40097E: main (in /tmp/test) ==32040== ==32040== Conditional jump or move depends on uninitialised value(s) ==32040== at 0x40121F: bool boost::lockfree::queue::do_push(int* const&) (in /tmp/test) ==32040== by 0x400CF6: boost::lockfree::queue::push(int* const&) (in /tmp/test) ==32040== by 0x40097E: main (in /tmp/test) ==32040== ==32040== ==32040== HEAP SUMMARY: ==32040== in use at exit: 0 bytes in 0 blocks ==32040== total heap usage: 129 allocs, 129 frees, 8,256 bytes allocated ==32040== ==32040== All heap blocks were freed -- no leaks are possible ==32040== ==32040== For counts of detected and suppressed errors, rerun with: -v ==32040== Use --track-origins=yes to see where uninitialised values come from ==32040== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 2) }}} This might be an issue with the atomic library, but I have not been able to track it further. OS is Fedora F18 (3.8.3-203.fc18.x86_64) G++ is g++ (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8) Valgrind is valgrind-3.8.1 ",Bugs,new,To Be Determined,lockfree,Boost 1.53.0,Problem,,,