Bug 41950


GemStone/S 64 Bit

3.0.1, 3.0,,,,,, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4,, 2.3.1, 2.3,,,,, 2.2.5, 2.2.4, 2.2.3, 2.2.2

All platforms

3.1, 2.4.5

Corruption using KeyValueDictionary>>removeKey:otherwise:

Using KeyValueDictionary>>removeKey:otherwise: with a key that does not
occur within the dictionary can sometimes result in decrementing the numElements
and numCollisions fields in the dictionary, even though nothing was actually
removed.  This won't be detectable until additional entries are removed
from the dictionary, causing the numElements field to become negative and
triggering an #objErrCorruptObj error (2261).

This bug effects KeyValueDictionary and all subclasses that don't override
the #removeKey:otherwise: method, including:



Use other remove methods, or check that the key actually does exist in
the dictionary before using #removeKey:otherwise:.

If you have dictionaries suffering from this problem, contact GemStone
Technical Support for code that will repair the dictionaries.

Last updated: 11/23/11