Revision b09d35d...

Go back to digest for 4th May 2014

Bug Fixes in Development Tools

Milian Wolff committed changes in [kdevplatform] /duchain:

Fix item repo issues with hash clashes and monster buckets.

1) Do not alter bucketPtr before freeing it up.

Before, we deleted an item and then sometimes changed the bucketPtr
when there where clashing items. If the new bucketPtr was then a
monster, we assumed its item was deleted and assert that. As we
deleted the item in a different bucket, the assertion did not hold
and we crashed...

The assertion happens when a normal item is deleted and another
monster item exists with the same hash in a different bucket.

2) Unset next bucket for hash, before deconverting it.

This is probably just a workaround, as a comment above hints at
a general problem here, that this should be done more regularly.
Calling setNextBucketForHash(hash, 0) always though leads to other,
new problems and assertions. So I'll leave it as is for now.

The assertion happens when a monster item is deleted and another
item exists with the same hash in a different bucket.

File Changes

Modified 2 files
  • /duchain
  •   language/repositories/itemrepository.h
  •   language/tests/test_itemrepository.cpp
2 files changed in total