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

[3.12] Lambda generators cause assertion failure:python: Objects/genobject.c:400: gen_close: Assertionexception_handler_depth > 0' failed.` #119897

Closed
Assignees
iritkatriel
Labels
3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump
@mgorny

Description

@mgorny

Crash report

What happened?

When CPython 3.12 is built with assertions enabled, the following snippet causes the interpreter to crash:

x=lambda: (yield3)next(x())
$ ./python /tmp/LambdasTest.py python: Objects/genobject.c:400: gen_close: Assertion `exception_handler_depth > 0' failed.Aborted (core dumped)

This doesn't happen with 3.11 or with main. From a quick bisect:

This was triggered in the wild by Nuitka's test suite:Nuitka/Nuitka#2893.

CC@iritkatriel

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.12.3+ (heads/3.12:6d9677d78e, Jun 1 2024, 11:06:51) [GCC 14.1.1 20240516]

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp