Opened 11 years ago

Closed 11 years ago

#6044 closed Bugs (fixed)

Assertion failed in relaxed_heap remove()

Reported by: Ponomarev Andrew <ponomarev.a.v@…> Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

There is an assertion in boost/pending/relaxed_heap.hpp:166 when trying to remove() a zero-int from a relaxed_heap. Moreover, my investigation showed that that assert statement doesn't work in a proper way at all. As far as I understand it's purpose is to verify that the element being removed is present in heap. But attempt to remove() inexistent element doesn't cause an assertion, in the opposite, an attempt to remove() zero-int always cause an assertion.

I propose to change this assertion to the way this check is performed in contains() method. Proposed patch is enclosed.

Attachments (1)

relaxed_heap_assertion_bug_data.zip (1.0 KB ) - added by Ponomarev Andrew <ponomarev.a.v@…> 11 years ago.

Download all attachments as: .zip

Change History (3)

by Ponomarev Andrew <ponomarev.a.v@…>, 11 years ago

comment:1 by Jeremiah Willcock, 11 years ago

Component: Nonegraph
Owner: set to Jeremiah Willcock

comment:2 by Jeremiah Willcock, 11 years ago

Resolution: fixed
Status: newclosed

(In [75074]) Removed incorrect != 0 test on boost::optional; fixes #6044

Note: See TracTickets for help on using tickets.