0

I am using operating system MacOS Sierra(version 10.12.5) and log in as the root user.

The length of the string is 38405.

I am using eval to convert string to list

I have added following in my python file:

1.

resource.setrlimit(resource.RLIMIT_STACK, [0x10000000, resource.RLIM_INFINITY])
sys.setrecursionlimit(0x100000)

But get the following error

resource.setrlimit(resource.RLIMIT_STACK, [0x10000000, resource.RLIM_INFINITY])
ValueError: current limit exceeds maximum limit
  1. If I use os.system('ulimit -s 65532') getting following error

Same Error

s_push: parser stack overflow MemoryError

How to resolve this issue?

The string, I tried to convert can be found the following link

https://drive.google.com/open?id=0B_JtQtd0sA4nMlJ0RGNRU3JZVGM

Definition of the function present in the string is as follows

def expres(functor,args=[]):
    return [functor]+args
Tom
  • 904
  • 1
  • 7
  • 21
  • Why are you messing around with the resources? 38405 characters is not a long string. – Nick Chapman Jul 06 '17 at 08:01
  • Nick. When tried to convert string to list, it returning "s_push: parser stack overflow MemoryError" error – Tom Jul 06 '17 at 08:31
  • Please paste the string you are trying to convert. – Nick Chapman Jul 06 '17 at 08:35
  • I have uploaded string in the URL https://drive.google.com/open?id=0B_JtQtd0sA4nMlJ0RGNRU3JZVGM – Tom Jul 06 '17 at 08:54
  • https://stackoverflow.com/questions/13005760/python-nested-lambdas-s-push-parser-stack-overflow-memory-error – Nick Chapman Jul 06 '17 at 09:00
  • Possible duplicate of [Python: nested lambdas -- \`s\_push: parser stack overflow Memory Error\`](https://stackoverflow.com/questions/13005760/python-nested-lambdas-s-push-parser-stack-overflow-memory-error) – stovfl Jul 06 '17 at 17:31

0 Answers0