Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

test_concurrent_vector bug or trick ?

Blas_Rodriguez_Somoz
94 Views
Hello.

This code comes from test_concurrent_vector.cpp (tbb40_20111130):

template
void TestVectorTypes() {
tbb::concurrent_vector v;
for( int i=0; i<100; ++i ) {
// VC8 does not properly align a temporary value; to work around, use explicit variable
ClassWithVectorType foo(i);
v.push_back(foo);
for( int j=0; i
ClassWithVectorType bar(j);
ASSERT( v==bar, NULL );
}
}
}
Is the self-comparison (i
It is here at least since vers tbb30_20100406.
I found it because it throws a warning when compiling with clang.
0 Kudos
3 Replies
RafSchietekat
Black Belt
94 Views
It's a bug (the test should be for j
The comment about alignment is a bit intriguing...
Blas_Rodriguez_Somoz
94 Views
Yes there are more, and I'll post it in 15 minutes (more or less)

I'm not sure if gcc must throw this warning, but the others I've found are warnings that gcc missed and theoretically must throw.

Anton_P_Intel
Employee
94 Views
Thank you very much for catching and reporting it.
it is definitely a bug that have to be fixed.

If you have more issues of the type you are very welcome to post it.
Reply