Skip to content

Commit 8eef6dd

Browse files
authored
[SYCL][Coverity] Fix wrapper escape in graph memory pool (#19049)
- This is actually a false positive, but this change should prevent future false positives from happening. Fixes CID: 524576 Note, CID: 516777 is the same false positive but the design of the algorithm in that function makes providing a similar fix impossible.
1 parent 068a0d0 commit 8eef6dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/source/detail/graph_memory_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ graph_mem_pool::tryReuseExistingAllocation(
144144

145145
while (!NodesToCheck.empty()) {
146146
auto CurrentNode = NodesToCheck.front().lock();
147-
NodesToCheck.pop();
148147

149148
if (CurrentNode->MTotalVisitedEdges > 0) {
150149
continue;
@@ -176,6 +175,7 @@ graph_mem_pool::tryReuseExistingAllocation(
176175

177176
// Mark node as visited
178177
CurrentNode->MTotalVisitedEdges = 1;
178+
NodesToCheck.pop();
179179
}
180180

181181
return std::nullopt;

0 commit comments

Comments
 (0)