Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3479 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2011-04-18 19:57 +1000 |
| Last post | 2011-04-18 19:57 +1000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: An unusual question... Chris Angelico <rosuav@gmail.com> - 2011-04-18 19:57 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-04-18 19:57 +1000 |
| Subject | Re: An unusual question... |
| Message-ID | <mailman.508.1303120623.9059.python-list@python.org> |
On Mon, Apr 18, 2011 at 7:53 PM, <wisecracker@tesco.net> wrote: > Talking of nefarious usage... > > I wonder what this would do left unchecked on a current machine and current Python install... > > ### > > global somestring > somestring = " " > > while 1: > #print somestring > somestring = somestring + " " > > ### It'd take a while, but eventually bomb with MemoryError. If instead you double the string's length with "somestring=somestring+somestring", it'll bomb a lot quicker. I know because I tried it. We have an isolation environment in which we'll be allowing our clients to provide Python scripts - which means we have to be sure it'll all be safe. BTW, the point at which it bombs is defined by ulimit/rlimit, unless you fiddle with the memory allocator. See previous thread on the subject. :D Chris Angelico
Back to top | Article view | comp.lang.python
csiph-web