
Adapted from a report on comp.lang.python from Wolfgang Lipp: class Child: def __init__(self, parent): self.__dict__['parent'] = parent def __getattr__(self, attr): self.parent.a = 1 self.parent.b = 1 self.parent.c = 1 self.parent.d = 1 self.parent.e = 1 self.parent.f = 1 self.parent.g = 1 self.parent.h = 1 self.parent.i = 1 return getattr(self.parent, attr) class Parent: def __init__(self): self.a = Child(self) print Parent().__dict__ segfaults both 2.1 and current (well, maybe a day old) CVS. Haven't tried Tim's latest patch, but I don't believe that will make any difference. It's obvious <wink> what's happening; the dict's resizing inside the for loop in dict_repr and the ep pointer is dangling. By the time we've shaken all of these out of dictobject.c it's going to be pretty close to free-threading safe, I'd have thought. reentrancy-sucks-ly y'rs M. -- But since I'm not trying to impress anybody in The Software Big Top, I'd rather walk the wire using a big pole, a safety harness, a net, and with the wire not more than 3 feet off the ground. -- Grant Griffin, comp.lang.python

"MH" == Michael Hudson <mwh@python.net> writes:
MH> segfaults both 2.1 and current (well, maybe a day old) CVS. MH> Haven't tried Tim's latest patch, but I don't believe that MH> will make any difference. That is highly, highly nasty. Sounds to me like there ought to be an emergency 2.1.1 patch made for this, bumping Thomas's work to 2.1.2 if necessary. And if we can trojan in the NAIPL (New And Improved Python License), I wouldn't mind. :) -Barry

"BAW" == Barry A Warsaw <barry@digicool.com> writes: "MH" == Michael Hudson <mwh@python.net> writes:
MH> segfaults both 2.1 and current (well, maybe a day old) CVS. MH> Haven't tried Tim's latest patch, but I don't believe that will MH> make any difference. BAW> That is highly, highly nasty. Sounds to me like there ought to BAW> be an emergency 2.1.1 patch made for this, bumping Thomas's BAW> work to 2.1.2 if necessary. And if we can trojan in the NAIPL BAW> (New And Improved Python License), I wouldn't mind. :) We can release a critical patch for this bug, ala the CriticalPatches page for the Python 2.0 release. Jeremy

On Fri, 1 Jun 2001, Barry A. Warsaw wrote:
"MH" == Michael Hudson <mwh@python.net> writes:
MH> segfaults both 2.1 and current (well, maybe a day old) CVS. MH> Haven't tried Tim's latest patch, but I don't believe that MH> will make any difference.
That is highly, highly nasty.
Yes.
Sounds to me like there ought to be an emergency 2.1.1 patch made for this, bumping Thomas's work to 2.1.2 if necessary.
Really? Two mild counterpoints: 1) It's *old*; 1.5.2 at least, and that's only because that's the oldest version I happen to have lying around. It's quite similar to the test_mutants oddness in some ways. 2) There's at least one other crasher in 2.1; the one in the compiler where a variable is referenced in a class and in a contained method. (I've actually run into that one). But a "fix these crashers" release seems reasonable if there's someone with the time to put it out (not me!).
And if we can trojan in the NAIPL (New And Improved Python License), I wouldn't mind. :)
Well me neither... Cheers, M.

On Fri, Jun 01, 2001 at 11:12:33AM -0400, Barry A. Warsaw wrote:
"MH" == Michael Hudson <mwh@python.net> writes:
MH> segfaults both 2.1 and current (well, maybe a day old) CVS. MH> Haven't tried Tim's latest patch, but I don't believe that MH> will make any difference.
That is highly, highly nasty. Sounds to me like there ought to be an emergency 2.1.1 patch made for this, bumping Thomas's work to 2.1.2 if necessary.
Why bump 'my work' ? I'm just reviewing patches checked into the head. A fix for the above problems would fit in a patch release very nicely, and a release is a release. Besides, releasing 2.1.1 as 2.1 + dict fix would be a CVS nightmare. Unless you propose to keep it out of CVS, Barry ? :)
And if we can trojan in the NAIPL (New And Improved Python License), I wouldn't mind. :)
I'll channel Guido by saying he wouldn't even allow us to ship it with anything other than the PSF licence :) Gee-I'd-almost-think-you-had-a-need-for-an-FSF-suffered-licence-ly y'rs -- Thomas Wouters <thomas@xs4all.net> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

"TW" == Thomas Wouters <thomas@xs4all.net> writes:
>> That is highly, highly nasty. Sounds to me like there ought to >> be an emergency 2.1.1 patch made for this, bumping Thomas's >> work to 2.1.2 if necessary. TW> Why bump 'my work' ? I'm just reviewing patches checked into TW> the head. A fix for the above problems would fit in a patch TW> release very nicely, and a release is a release. Besides, TW> releasing 2.1.1 as 2.1 + dict fix would be a CVS TW> nightmare. Unless you propose to keep it out of CVS, Barry ? TW> :) Oh no! You know me, I like to release those maintenance releases early and often. :) Anyway, that's why /you're/ the 2.1.1 czar. >> And if we can trojan in the NAIPL (New And Improved Python >> License), I wouldn't mind. :) TW> I'll channel Guido by saying he wouldn't even allow us to ship TW> it with anything other than the PSF licence :) :) TW> Gee-I'd-almost-think-you-had-a-need-for-an-FSF-suffered-licence-ly TW> y'rs Where'd you get /that/ idea? :) -Barry
participants (4)
-
barry@digicool.com
-
Jeremy Hylton
-
Michael Hudson
-
Thomas Wouters