Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python 3.14 stack overflow detection is incompatible with C++ Boost make_fcontext() coroutines #139653

Open
Labels
@vstinner

Description

@vstinner

Python 3.14 introduced a new stack overflow detection mecanism:InternalDocs/stack_protection.md (#130396).

The KiCad application uses C++ Boostmake_fcontext() coroutines which runs coroutine intheir own stack.

Code example fromfcontext doc:

// context-functionvoidf(intptr);// creates a new stackstd::size_t size =8192;void*sp(std::malloc(size));// context fc uses f() as context function// fcontext_t is placed on top of context stack// a pointer to fcontext_t is returnedfcontext_tfc(make_fcontext(sp,size,f));

_Py_InitializeRecursionLimits() is called in the main thread, whereas_Py_CheckRecursiveCall() is called for the first time in a coroutine (make_fcontext()).

Problem: Pythondetects a stack overflow because it's not aware that the stack base address and size changed whenmake_fcontext() was called.

pthread functions such aspthread_attr_getguardsize() are incompatible withmake_fcontext().

cc@markshannon

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp