Community
cancel
Showing results for 
Search instead for 
Did you mean: 
vanswaaij
Beginner
24 Views

my_dummy_slot.hint_for_push and hint_for_pop used uninitialized


It seems that tbb::internal::generic_scheduler.my_dummy_slot.hint_for_push and hint_for_pop remain uninitialized before use in task_stream::push or pop.

This is in tbb40_233oss, compiled on LINUX FEDORA 14

Thanks.


0 Kudos
3 Replies
Anton_M_Intel
Employee
24 Views

Well, you are right that hints are not initialized for dummy slot. However, it is not a correctness issue. Because, 1) hints are used to distribute contention in the starvation-resistent queue, the actual value is not really important, and 2)slots in arena object are initilized by memset first and then by arena::process when a worker joins, the dummy slot can probably be used only by master thread in some situations - not a problem.
Are you rather concerned about some warning by the compiler or a correctness tool?
vanswaaij
Beginner
24 Views

Well, you are right that hints are not initialized for dummy slot. However, it is not a correctness issue. Because, 1) hints are used to distribute contention in the starvation-resistent queue, the actual value is not really important, and 2)slots in arena object are initilized by memset first and then by arena::process when a worker joins, the dummy slot can probably be used only by master thread in some situations - not a problem.
Are you rather concerned about some warning by the compiler or a correctness tool?

I thought as much but wanted to be sure.
I'm evaluating Intel Inspector XE and both fields were flagged as being used uninitialized.

Thanks for looking.
Alexey_K_Intel3
Employee
24 Views

Thank you for reporting the issue.
Though it is not a real correctness issue as Anton mentioned, I think there is no good reason not to initialize these fields; in other words, we will fix it.