Skip to content

Commit

Permalink
Fix test_concurrent_queue failure with ICL19.0/VS2017 (#1141)
Browse files Browse the repository at this point in the history
Prevent an incorrect optimization by ICL 19.0 (fixed in ICL 19.1) with VS 2017 stdlib with inline-level=1 (/Ob1) that resulted in premature object destruction inside `std::unordered_set`.

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
  • Loading branch information
dnmokhov authored Jun 30, 2023
1 parent e813596 commit 88f73bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/tbb/test_concurrent_queue.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2022 Intel Corporation
Copyright (c) 2005-2023 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -219,6 +219,7 @@ struct TrackableItem {
auto it = object_addresses.find(this);
CHECK(it != object_addresses.end());
object_addresses.erase(it);
CHECK(object_addresses.count(this) == 0);
}
};

Expand Down

0 comments on commit 88f73bb

Please sign in to comment.