[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Infinite loop in objc_storeWeak
From: |
David Chisnall |
Subject: |
Re: Infinite loop in objc_storeWeak |
Date: |
Fri, 15 Jun 2012 14:24:57 +0100 |
Hi Thomas,
A couple of questions:
Are you using the release version of libobjc or svn? Your line numbers don't
match up with mine, so it may be that this is a bug that's already fixed in
svn. I'm currently waiting for Quentin to test another bug fix and then I'll
be doing a new release next week.
The second question is whether you remembered to initialise the weak pointer to
0, or call objc_initWeak() for the first store?
David
On 15 Jun 2012, at 14:18, Thomas Davie wrote:
> Hi all,
>
> I'm just trying to get some zeroing weak reference code working, and wrote
> myself a little wrapper library that gives me an NSValue like object storing
> a zeroing weak reference to another object.
>
> Unfortunately, when that's linked into another project and run, I get an
> infinite loop in objc_storeWeak (as shown below).
>
> Anyone know how to deal with this scenario?
>
> Thanks
>
> Tom Davie
>
> 0x00007ffff69bd37c in objc_storeWeak (addr=<optimized out>, obj=<optimized
> out>) at arc.m:493
> 493 if (0 == ref->ref[i])
> (gdb) p ref
> $1 = <optimized out>
> (gdb) n
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 500 if (ref->next == NULL)
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 500 if (ref->next == NULL)
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
> (gdb)
> 493 if (0 == ref->ref[i])
> (gdb)
> 491 for (int i=0 ; i<4 ; i++)
>
>
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep
-- Sent from my Apple II
- Infinite loop in objc_storeWeak, Thomas Davie, 2012/06/15
- Re: Infinite loop in objc_storeWeak,
David Chisnall <=
- Re: Infinite loop in objc_storeWeak, Thomas Davie, 2012/06/15
- Re: Infinite loop in objc_storeWeak, David Chisnall, 2012/06/15
- Re: Infinite loop in objc_storeWeak, Thomas Davie, 2012/06/18
- Re: Infinite loop in objc_storeWeak, David Chisnall, 2012/06/18
- Re: Infinite loop in objc_storeWeak, Thomas Davie, 2012/06/18
- Re: Infinite loop in objc_storeWeak, David Chisnall, 2012/06/18