This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Arfrever, pkt, python-dev, serhiy.storchaka
Date 2015-02-02.13:09:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422882568.25.0.916544938298.issue23369@psf.upfronthosting.co.za>
In-reply-to
Content
"\uffff"*((2**32)//6 + 1) is calculated at compile time. This requires much memory and can cause swapping. May be this was a cause of failing tests on some buildbots:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/2623/steps/test/logs/stdio
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4/builds/749/steps/test/logs/stdio

Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/__main__.py", line 3, in <module>
    regrtest.main_in_temp_cwd()
  File "/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/regrtest.py", line 1564, in main_in_temp_cwd
    main()
  File "/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/regrtest.py", line 738, in main
    raise Exception("Child error on {}: {}".format(test, result[1]))
Exception: Child error on test_json: Exit code -9
*** [buildbottest] Error code 1

At least my computer hanged on first run of this test.

To prevent computing this string constant at compile time you can use a variable. And '\x00' can be used instead of '\uffff', it needs less memory.
History
Date User Action Args
2015-02-02 13:09:28serhiy.storchakasetrecipients: + serhiy.storchaka, Arfrever, python-dev, pkt
2015-02-02 13:09:28serhiy.storchakasetmessageid: <1422882568.25.0.916544938298.issue23369@psf.upfronthosting.co.za>
2015-02-02 13:09:28serhiy.storchakalinkissue23369 messages
2015-02-02 13:09:27serhiy.storchakacreate