----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/128893/ -----------------------------------------------------------
Review request for KDE Frameworks and Boudhayan Gupta. Repository: baloo Description ------- Old code was plain wrong: - auto it = std::upper_bound(subDocs.begin(), subDocs.end(), id); - - // Merge the id if it does not - auto prev = it - 1; - if (*prev != id) { - subDocs.insert(it, id); - } => you deref begin()-1 in my test case => BAM ;) Diffs ----- autotests/unit/engine/documenturldbtest.cpp 448821b src/engine/documenturldb.cpp 5083e7a src/engine/idutils.h cc7da9c src/engine/writetransaction.cpp 3808970 Diff: https://git.reviewboard.kde.org/r/128893/diff/ Testing ------- Wrote test, valgrind shows error (or you get segfault, depending on luck) with old code, new one works. Thanks, Christoph Cullmann