[ python-Bugs-1533105 ] NetBSD build with --with-pydebug causes SIGSEGV
SourceForge.net
noreply at sourceforge.net
Fri Aug 18 11:55:24 CEST 2006
Bugs item #1533105, was opened at 2006-08-02 13:00
Message generated for change (Comment added) made by splitscreen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1533105&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Matt Fleming (splitscreen)
Assigned to: Nobody/Anonymous (nobody)
Summary: NetBSD build with --with-pydebug causes SIGSEGV
Initial Comment:
The testInfiniteRecursion test in
Lib/test/test_exceptions.py causes Python to segfault
if it has been compiled on NetBSD with --with-pydebug.
This is due to the fact that the default stack size on
NetBSD is 2MB and Python tries to allocate memory for
debugging information on the stack.
The documentation (README under 'Setting the
optimization/debugging options'?) should be updated to
state that if you want to run the test suite with
debugging enabled in the interpreter, you are advised
to increase the stack size, probably to 4096.
This issue is also in release24-maint.
Matt
----------------------------------------------------------------------
>Comment By: Matt Fleming (splitscreen)
Date: 2006-08-18 09:55
Message:
Logged In: YES
user_id=1126061
Hmm.. perhaps this problem is more widespread that I'd
realised. Apparently the default stack size on windows is
1MB (someone correct me if I'm wrong). Perhaps there should
be an option with the configure script to change the stack
size?
Alternatively we could stop allocating space for debug error
messages on the stack ;-)
----------------------------------------------------------------------
Comment By: Hirokazu Yamamoto (ocean-city)
Date: 2006-08-18 09:49
Message:
Logged In: YES
user_id=1200846
Sorry for interruption. I encountered this problem on VC6
debug build too. Is there any chance to supress recursion
limit for this test like this?
Index: Lib/test/test_exceptions.py
===================================================================
--- Lib/test/test_exceptions.py (revision 51370)
+++ Lib/test/test_exceptions.py (working copy)
@@ -306,16 +306,25 @@
self.assertEquals(x.fancy_arg, 42)
def testInfiniteRecursion(self):
+ def run(f):
+ import sys
+ limit = sys.getrecursionlimit()
+ sys.setrecursionlimit(400) # supress for debug mode
+ try:
+ self.assertRaises(RuntimeError, f)
+ finally:
+ sys.setrecursionlimit(limit)
+
def f():
return f()
- self.assertRaises(RuntimeError, f)
+ run(f)
def g():
try:
return g()
except ValueError:
return -1
- self.assertRaises(RuntimeError, g)
+ run(g)
def test_main():
run_unittest(ExceptionTests)
----------------------------------------------------------------------
Comment By: Matt Fleming (splitscreen)
Date: 2006-08-09 10:23
Message:
Logged In: YES
user_id=1126061
Patches for trunk and 2.4 attached.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-08-09 05:40
Message:
Logged In: YES
user_id=33168
Matt, can you make a patch? Doc changes are fine to go into
2.5 (and 2.4).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1533105&group_id=5470
More information about the Python-bugs-list
mailing list