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

Argument Clinic: vararg + kw-only crash #110864

Closed
Assignees
sobolevn
@sobolevn

Description

@sobolevn

Bug report

Originally found in#110782 by@mxschmitt and@JelleZijlstra

This is the reproducer:

/*[clinic input]null_or_tuple_for_varargs    name: object    *constraints: object    covariant: bool = False[clinic start generated code]*/staticPyObject*null_or_tuple_for_varargs_impl(PyObject*module,PyObject*name,PyObject*constraints,intcovariant)/*[clinic end generated code: output=a785b35421358983 input=017dc120cb6e651b]*/{assert(name!=NULL);assert(constraints!=NULL);assert(covariant==0||covariant==1);Py_RETURN_NONE;}

When called withname=..., it crashes:

>>>import_testclinic>>>_testclinic.null_or_tuple_for_varargs('a')>>>_testclinic.null_or_tuple_for_varargs(name='a')Assertionfailed: (constraints!=NULL),functionnull_or_tuple_for_varargs_impl,file_testclinic.c,line1148.[1]30808abort      ./python.exe

I have a PR ready with the fix.
CC@erlend-aasland as AC maintainer.

Linked PRs

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp