The following code consistently crashes Python 2.4 on Mac OS X: import threading class foo: def __getattr__(self, x): self.foo def j(): foo().bar t = threading.Thread(target=j, args=()) t.start()
Logged In: YES user_id=1449422 Hello. I have the same segfault :-( Python version: from SVN Python 2.5a0 (trunk, Feb 19 2006, 22:22:12) [GCC 3.4.4 [FreeBSD] 20050518] on freebsd6 Best regards, Alexander.
I can still reproduce this on FreeBSD 7.0 BETA2. Python version is Python 2.5.1 (r251:54863, Nov 14 2007, 13:09:04) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7
And under 2.6 on OS X. I doubt this is a BSD thing but more of a recursion depth issue. And I don't think there is anything to fix here. The recursion depth is a per-thread thing, and this test is blowing the C stack before the recursion depth is reached. If you drop the recursion limit lower the proper exception is raised (I had to drop mine down to 400 to trigger the exception). So this is not a Python issue, per-se, just a limitation of the C stack and how things are implemented. While we do everything we can to prevent crashes, this just can't be helped as the C stack is not under our control. Closing as invalid.
History
Date
User
Action
Args
2022-04-11 14:56:15
admin
set
github: 42897
2007-11-15 20:44:40
brett.cannon
set
status: open -> closedversions: + Python 2.6nosy: + brett.cannontitle: recursive __getattr__ in thread crashes BSDs -> recursive __getattr__ in thread crashesmessages: + resolution: not a bug