-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Sanitizer error in tbb #140
Comments
It is a weird approach that we use potentially invalid pointer ( |
Hi, this issue is preventing us from using some option of the gcc sanitizer. |
Seeing these errors in TBB 4.4.6 (we are stuck on this version for now, but plan to upgrade to the latest release in the medium-term), GCC6, and centos7 with sanitize. Thought it might be related to the issues described here and/or TBB constructs in the std namespace, so rebuilt TBB with |
We are working on a workaround but it will be available in a future release. Currently, I do not know how to avoid the issue with TBB 4.4.6 without TBB runtime modifications. Perhaps, you can rework the application to guarantee |
Thanks for the feedback @alexey-katranov . Please update this issue when TBB is updated upstream to address this, we might be able to upgrade to the latest TBB release by then. |
Thanks for your work. I will update tbb as soon there is a release where the issue is fixed. |
FYI. Making the inheritance public does not solve the issue. We tried a couple of workarounds but they also did not help. It looks like some sanitizer issue. We will continue investigation to understand the root cause but it might take some time. |
Here I have the same problem, but at different places: */TBB/include/tbb/task.h:779:49 contexts: 778 static void spawn_root_and_wait( task& root ) { 1045 inline void interface5::internal::task_base::spawn( task& t ) { Manjaro Linux, gcc 8.3.0, tbb 2019.0 |
@marcomanno recently oneTBB got a lot of Sanitizer related fixes. Could you please check if this issue is still reproducible with latest master? |
@marcomanno please reopen if the problem still exist with oneTBB 2021.4 or latest master. |
Building my project with option -fsanitize I get this error:
../TBB-2017U5-0226-headers/inc/tbb/task.h:749:49: runtime error: member call on address 0x7fbe9802bc00 which does not point to an object of type 'scheduler'
0x7fbe9802bc00: note: object is of type 'tbb::internal::custom_schedulertbb::internal::IntelSchedulerTraits'
00 00 00 00 f0 ab 7f a0 be 7f 00 00 00 00 00 00 00 00 00 00 e0 be 02 98 be 7f 00 00 e0 be 02 98
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'tbb::internal::custom_schedulertbb::internal::IntelSchedulerTraits'
I believe that the problem is here: class custom_scheduler: private generic_scheduler
The private inheritance make the cast from class custom_scheduler to class generic_scheduler not defined, and then the method:
void spawn_and_wait_for_all( task& child ) {
prefix().owner->wait_for_all( *this, &child );
}
has an undefined behaviour.
I do not know if my analysis is correct, but I if you could fix it in some way...
The text was updated successfully, but these errors were encountered: