Skip to content

_Py_InitializeRecursionLimits fails on Windows 7 due to absence of GetCurrentThreadStackLimits #138185

@chw0239

Description

@chw0239

Bug report

Bug description:

The function _Py_InitializeRecursionLimits uses GetCurrentThreadStackLimits to get information about thread stack limits, but according to documentations of windows, this API requires Windows 8+, which will cause programs to abort on startup on Windows 7 and earlier:

The procedure entry point GetCurrentThreadStackLimits could not be located in the dynamic link library KERNEL32.dll

It seems there are some workaround for this API on Windows 7, which works fine on my PC. So maybe we can change this API call to a more compatible version?

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions