[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-07 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-27277 as a duplicate of this issue. -- ___ Python tracker ___ ___ Python-bugs-list

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-07 Thread STINNER Victor
STINNER Victor added the comment: I rejected my two other ideas to fix this issue: * bpo-45094: Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds * bpo-45115: Windows: enable compiler optimizations when building

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-07 Thread STINNER Victor
STINNER Victor added the comment: Even if Python 3.9 and 3.10 have the idea, I don't think that long exception chains are common enough to justify a backport. I prefer to leave the code as it it in stable branches, and see how things go with the change in the main branch. I close the issue.

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset fb305092a5d7894b41f122c1a1117b3abf4c567e by Victor Stinner in branch 'main': bpo-44348: BaseException deallocator uses trashcan (GH-28190) https://github.com/python/cpython/commit/fb305092a5d7894b41f122c1a1117b3abf4c567e --

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Using trashcan, it's possible to create a long longer than 10 000 exceptions. But currently, Python does crash in this case, so I stopped the benchmark at 10 000. -- ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: bench.py: pyperf benchmarks on BaseException_dealloc(). Benchmarks results on PR 28190 on Fedora 34 with LTO (I didn't use PGO nor CPU pinning). It says "faster" but it's likely noise in the build or in the benchmark (again, I didn't use CPU pinning, and I

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: test_recursion_in_except_handler() creates chained of exceptions. When an exception is deallocated, it calls the deallocator of another exception, etc. * recurse_in_except() sub-test creates chains of 11 nested deallocator calls *

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26617 pull_request: https://github.com/python/cpython/pull/28190 ___ Python tracker ___

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread Steve Dower
Steve Dower added the comment: It should also be possible to reduce the stack size of each frame. We've done that before, because there were multiple temporary buffers allocated on the stack that were trivially moved into functions. I bet we can also reduce the number of indirections, as

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Another *working* approach to fix this issue: bpo-45115 "Windows: enable compiler optimizations when building Python in debug mode". -- ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: See bpo-45094: "Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds". -- ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-10 Thread Mark Shannon
Mark Shannon added the comment: New changeset 54cb63863f19a7c64d9a3a5fd97bdfc0dd7ab374 by Mark Shannon in branch 'main': bpo-44348: Move trace-info to thread-state (GH-26623) https://github.com/python/cpython/commit/54cb63863f19a7c64d9a3a5fd97bdfc0dd7ab374 --

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-09 Thread Ken Jin
Ken Jin added the comment: @Steve thanks for the info, > This is already what we do, so if someone has increased stack usage, they > should also decrease the value here. I see the recursion limit set in _PyEval_InitState but I don't see any special settings for windows. Is it somewhere

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-09 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +25213 pull_request: https://github.com/python/cpython/pull/26627 ___ Python tracker ___ ___

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-09 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +Mark.Shannon nosy_count: 9.0 -> 10.0 pull_requests: +25208 pull_request: https://github.com/python/cpython/pull/26623 ___ Python tracker ___

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-09 Thread Senthil Kumaran
Change by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-09 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-44360 "test_compile segfault on AMD64 Ubuntu 3.x". -- ___ Python tracker ___ ___

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-08 Thread Steve Dower
Steve Dower added the comment: > Decrease the global recursion limit only for windows debug. This is already what we do, so if someone has increased stack usage, they should also decrease the value here. Hopefully the non-debug value doesn't have to be reduced. In that case, it's worth

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6d518bb3a11f9b16098f45b21a13ebe8f537f045 by Pablo Galindo in branch 'main': bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function (GH-26493)" (GH-26596)

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-08 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +25179 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26596 ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: There are many buildbot failures today and this is getting a bit out of hand so I'm starting with a revert of f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 until we have a better plan. -- ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-08 Thread Ken Jin
New submission from Ken Jin : Hi all, I created this issue after discussion in https://bugs.python.org/issue39573#msg395206: In issue39573 "[C API] Make PyObject an opaque structure in the limited C API" the commit f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 ("Py_TYPE becomes a static inline