Skip to content

phtree_multimap_d_test fails with NUM_DUPL = 10 #154

Description

@tzaeschke

The phtree_multimap_d_test fails when setting NUM_DUPL = 10.
Specifically, the PhTreeMMDTest.TestUpdateWithEmplaceHint test fails with core dump.

Tested with: Ubuntu 22.04, gcc 12.3, ASAN enabled

This problem occurs only in the following scenario:

auto iter = find(p1, ..);
erase(p1, ...);
emplace_hint(iter, p2);

Reusing iter after erase() looks very dangerous, but should be alright in this scenario, emplace_hint has actually been designed to work with iterators after a single erase() occurred. However, in this case it does not appear to work, either because the returned iterator is wrong (unlikely) or because emplace_hint() does not handle the iterator correctly.

The result is that emplace_hint() inserts the entry at the wrong location.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions