- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Anton Malakhov (Intel)
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'm evaluating Intel Inspector XE and both fields were flagged as being used uninitialized.
Thanks for looking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page