gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUMail crashes


From: Riccardo Mottola
Subject: Re: GNUMail crashes
Date: Thu, 23 Oct 2014 10:02:32 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 SeaMonkey/2.30

Hi,

Ivan Vučica wrote:
Have you tested this by creating a new non-constant NSString object, printing out its -retainCount, using it as a key for NSMapInsert(), then printing out its -retainCount again? (Or overriding -retain and observing if it is called?)

Relevant code seems to live in 'NSConcreteMapTable.m' and 'GSIMap.h'.
no, testing was complicated because triggered only by error conditions.

My guess is that since an object is used as a "key", if for some reason the object gets dealloc'd outside the map, the key becomes invalid (I understand what while values do get retained on insertion, keys are not). I thus decided to retain the key at every insertion and release it later on removal. Seems to work, but since I found not a valid way to trigger this bug (except for running GNUMail in gdb for hours) it is more a theoretical fix.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]