Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitfield in std::_Bit_reference in std::vector implementation #1451

Open
derekbruening opened this issue Nov 28, 2014 · 1 comment
Open

bitfield in std::_Bit_reference in std::vector implementation #1451

derekbruening opened this issue Nov 28, 2014 · 1 comment

Comments

@derekbruening
Copy link
Contributor

From [email protected] on February 23, 2014 18:43:04

I'm seeing these on both Linux and Mac (so should we have part of the
default supps shared across them?!?)

I have not studied it enough to know if some heuristic will handle it, or whether it's a real bug -- but most likely it's a false positive due to a few bits in there being uninit but not mattering.

Error #1: UNINITIALIZED READ: reading register ecx
#0 std::_Bit_reference::operator bool [/usr/include/c++/4.2.1/bits/stl_bvector.h:81]
#1 std::_Bit_const_iterator::operator* [/usr/include/c++/4.2.1/bits/stl_bvector.h:287]
#2 std::__copy<>::copy<> [/usr/include/c++/4.2.1/bits/stl_algobase.h:283]
#3 std::__copy_aux<> [/usr/include/c++/4.2.1/bits/stl_algobase.h:315]
#4 std::__copy_normal<>::__copy_n<> [/usr/include/c++/4.2.1/bits/stl_algobase.h:340]
#5 std::copy<> [/usr/include/c++/4.2.1/bits/stl_algobase.h:400]
#6 std::vector<>::_M_copy_aligned [/usr/include/c++/4.2.1/bits/stl_bvector.h:777]
#7 std::vector<>::vector [/usr/include/c++/4.2.1/bits/stl_bvector.h:501]
#8 std::vector<>::vector [/usr/include/c++/4.2.1/bits/stl_bvector.h:502]
#9 std::_Construct<> [/usr/include/c++/4.2.1/bits/stl_construct.h:81]
#10 std::__uninitialized_copy_aux<> [/usr/include/c++/4.2.1/bits/stl_uninitialized.h:87]
#11 std::uninitialized_copy<> [/usr/include/c++/4.2.1/bits/stl_uninitialized.h:113]
Note: @0:00:19.253 in thread 733130
Note: instruction: cmp %ecx $0x00000000

Error #2: UNINITIALIZED READ: reading register ecx
#0 std::_Bit_reference::operator bool [/usr/include/c++/4.2.1/bits/stl_bvector.h:81]
#1 std::_Bit_const_iterator::operator* [/usr/include/c++/4.2.1/bits/stl_bvector.h:287]
#2 std::vector<>::operator[] [/usr/include/c++/4.2.1/bits/stl_bvector.h:609]
...
Note: @0:00:28.555 in thread 733130
Note: instruction: cmp %ecx $0x00000000

Error #3: UNINITIALIZED READ: reading register ecx
#0 std::_Bit_reference::operator bool [/usr/include/c++/4.2.1/bits/stl_bvector.h:81]
#1 std::_Bit_const_iterator::operator* [/usr/include/c++/4.2.1/bits/stl_bvector.h:287]
#2 std::vector<>::operator[] [/usr/include/c++/4.2.1/bits/stl_bvector.h:609]
...
Note: @0:00:28.999 in thread 733130
Note: instruction: cmp %ecx $0x00000000

Original issue: http://code.google.com/p/drmemory/issues/detail?id=1451

@derekbruening
Copy link
Contributor Author

From [email protected] on March 25, 2014 07:06:18

I'm also seeing a single frame like this:

Dr.M Error #1: UNINITIALIZED READ: reading register eax
Dr.M # 0 std::_Bit_reference::operator bool [/usr/include/c++/4.2.1/bits/stl_bvector.h:81]
Dr.M # 1 Board::addHorizontalWall [user code anonymized]
Dr.M # 2 load [user code anonymized]
Dr.M # 3 main [user code anonymized]
Dr.M Note: @0:00:01.012 in thread 945349
Dr.M Note: instruction: cmp %eax $0x00000000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant