]> granicus.if.org Git - python/commit
When weakref proxies are involved in binary & ternary slot operations,
authorFred Drake <fdrake@acm.org>
Thu, 18 Oct 2001 18:04:18 +0000 (18:04 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 18 Oct 2001 18:04:18 +0000 (18:04 +0000)
commit73006d02374e785c660f15bad0aabcf197d97ce8
tree844d1bd2f69a4890ea70bca54ac9fcb2cad53a03
parenta5343ccd28245d96feb21d1457802b97a76aa210
When weakref proxies are involved in binary & ternary slot operations,
the left-hand operand may not be the proxy in all cases.  If it isn't,
we end up doing two things: a) unwrapping something that isn't a
PyWeakReference (later resulting in a core dump) and b) passing a
proxy as the right-hand operand anyway, even though that can't be
handled by the actual handler (maybe eventually causing a core dump).

This is fixed by always unwrapping all the proxies involved before
passing anything to the actual handler.
Objects/weakrefobject.c