Skip to content
Snippets Groups Projects
Unverified Commit 563f0584 authored by Serhiy Storchaka's avatar Serhiy Storchaka Committed by GitHub
Browse files

[3.10] gh-94938: Fix errror detection of unexpected keyword arguments (GH-94999) (GH-95354)


When keyword argument name is an instance of a str subclass with
overloaded methods __eq__ and __hash__, the former code could not find
the name of an extraneous keyword argument to report an error, and
_PyArg_UnpackKeywords() returned success without setting the
corresponding cell in the linearized arguments array. But since the number
of expected initialized cells is determined as the total number of passed
arguments, this lead to reading NULL as a keyword parameter value, that
caused SystemError or crash or other undesired behavior..
(cherry picked from commit ebad53a4)

Co-authored-by: default avatarSerhiy Storchaka <storchaka@gmail.com>
parent fb422147
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment