When libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
calls p.pop, the highest priority node is deallocated. All but the last
node are still used after being deallocated. In particular, the
node with id zero is deallocated after it has been processed.
Then when processing the next closest node to 0, the relaxation loop
calls p_modify with an iterator that points to the memory formerly allocated
to the node that has id 0, thus invoking undefined behaviour.
I see this as a failure on arc-elf32 because the p_modify call mentioned above
calls join_node_children, and that function never returns.
--
Summary: priority_queue_dijkstra.cc operates on deallocated
memory
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amylaar at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31884