[New-bugs-announce] [issue44114] Incorrect function signatures in dictobject.c
Joe Marshall
report at bugs.python.org
Wed May 12 08:46:01 EDT 2021
New submission from Joe Marshall <joe.marshall at nottingham.ac.uk>:
There's a couple of wrong function signatures in dictobject.c,
dictkeys_reversed and dictitems_reversed are defined as single arg functions like so: PyObject *(PyObject *), and are then passed around and called as PyCFunctions, which should be PyObject *(PyObject *self,PyObject *args). dictvalues_reversed is correct.
This works fine on most C compilers as the extra arg is just ignored, but on things that use strict function pointer type checking (e.g. webassembly), it crashes (and hence any of the tests that happen to use these functions fails, which is a surprising number)
I've got a fix in my pyodide repo, which I'll chuck in as a pull request on github.
----------
components: Interpreter Core
messages: 393506
nosy: joemarshall
priority: normal
severity: normal
status: open
title: Incorrect function signatures in dictobject.c
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44114>
_______________________________________
More information about the New-bugs-announce
mailing list