[Pythonmac-SIG] Re: [ python-Patches-580869 ] Fix for seg fault on test_re on mac osx
Steven Majewski
sdm7g@mac.com
Thu, 10 Oct 2002 13:25:42 -0400
Got this on a patch I filed quite a while ago to fix the problem of
seg faulting on test_re if you don't do a limit or ulimit from the
shell before running the tests.
I verified that this still works for me and that I'm NOT running as root.
But I haven't upgraded to 10.2 yet: Maybe this is a 10.1 vs. 10.2 problem
?
Can a few of you out there give the following 3 lines a try under either 10.
1
and/or 10.2 and tell me if it works for you ? :
import resource
soft, hard = resource.getrlimit(resource.RLIMIT_STACK )
resource.setrlimit( resource.RLIMIT_STACK, (1024 * 2048, hard))
-- Steve Majewski
On Thursday, October 10, 2002, at 11:57 AM, noreply@sourceforge.net wrote:
> Patches item #580869, was opened at 2002-07-12 22:15
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=305470&aid=580869&group_id=
> 5470
>
> Category: Tests
> Group: Python 2.3
> Status: Open
> Resolution: None
> Priority: 5
> Submitted By: Steven D. Majewski (sdm7g)
> Assigned to: Barry A. Warsaw (bwarsaw)
> Summary: Fix for seg fault on test_re on mac osx
>
> Initial Comment:
>
>
> import resource
> soft, hard = resource.getrlimit(
> resource.RLIMIT_STACK )
> resource.setrlimit( resource.RLIMIT_STACK, (1024 *
> 2048, hard))
>
>
> is the python equivalent of the tcsh 'limit stack 2048'
> and will
> keep python from seg faulting on test_re .
>
> ( maybe wrapped in a "if os.platform == 'darwin' : " --
> are there any other systems that have this problem ? )
>
> -- Steve Majewski
>
>
> ----------------------------------------------------------------------
>
>> Comment By: Skip Montanaro (montanaro)
> Date: 2002-10-10 10:57
>
> Message:
> Logged In: YES
> user_id=44345
>
> I tried adding the above code to regrtest.py. When I tried to
> run python regrtest.py test_re I got a ValueError exception:
> "not allowed to raise maximum limit". I have no trouble using
> the ulimit builtin command to raise my stack size. Steve,
> were you perhaps running as root when you tried this?
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=305470&aid=580869&group_id=
> 5470