Bug 41950

Critical

GemStone/S 64 Bit

3.0.1, 3.0, 2.4.4.7, 2.4.4.6, 2.4.4.5, 2.4.4.4, 2.4.4.3, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4, 2.3.1.6, 2.3.1, 2.3, 2.2.5.4, 2.2.5.3, 2.2.5.2, 2.2.5.1, 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:

  IntegerKeyValueDictionary
  StringKeyValueDictionary
  CanonicalStringDictionary
  IdentityKeyValueDictionary
  IdentityDictionary
  SymbolDictionary
  LanguageDictionary
  SymbolKeyValueDictionary

Workaround

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