[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Strange crashes

From: Peter McNab <mcnab_p_at_melbpc.org.au>
Date: 2006-04-10 13:02:04 CEST

Stefan Küng wrote:
> On 4/10/06, Norbert Unterberg <nunterberg@gmail.com> wrote:
>
>> The only thing I can think of (except overclocking or overheating) is
>> that some other thread is changing cachedDir in between these two
>> lines. I do not know the context, but I guess cachedDir is a local
>> variable? If yes, then I am out of ideas.
>>
>
> Yes, cachedDir is a local variable, so it can't be changed by another
> thread. Ok, another thread can mess with the object cachedDir points
> to, but it can't set cachedDir itself to NULL.
>
> Stefan
>
>

Several possibilities surface.
1 Is cachedDir's state guaranteed to be correct or initialized
correctly on entry to the function where it has scope *every time* ?.
2 Is the the full length evaluated? i.e.is there a chance that only
part of the variable is evaluated when determining the NULL condition?
Instead of treating the variable as a boolean, for the purposes of
testing for NULL is there a specialized function for evaluating object
pointers for NULL?

Peter
Received on Mon Apr 10 13:04:42 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.