sphinx-build: fix python stack overflow (Trac #10950)
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 21 Jan 2016 21:43:37 +0000 (21:43 +0000)
committerSergei Trofimovich <siarheit@google.com>
Thu, 21 Jan 2016 21:43:37 +0000 (21:43 +0000)
commit4c11db6377aa4fba0c4d70a1e9508247fd053bce
treea00e7024222f2f4aa15ab3355d9be61db4193664
parent4c4a0a52d3ca5befd2a632544e9541703007e356
sphinx-build: fix python stack overflow (Trac #10950)

Summary:
commit a034031a102bc08c76a6cdb104b72922ae22c96b did not
fix problem completely. Stack overflows still occasionally
happen.

Easy to test by the following Torture Test:

  while sphinx-build -T -N -E -a -b html \
        -d docs/users_guide/.doctrees-html \
        -D latex_paper_size=letter \
        docs/users_guide docs/users_guide/build-html/users_guide
  do
    echo again
  done

sphinx build large nested data structures when parses GHC manual
(docs/users_guide/glasgow_exts.rst is 455KB in size) which
can't be serialized useing default python call stack depth of 1000
calls.

The patch increases stack depth 10 times. Survived 2 hours of
Torture Test.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Test Plan: ran Torture Test to make sure it is stable

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1809

GHC Trac Issues: #10950
docs/users_guide/conf.py