[New-bugs-announce] [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set

Roman Yurchak report at bugs.python.org
Thu Aug 6 16:20:07 EDT 2020

New submission from Roman Yurchak <rth.yurchak at gmail.com>:

The `_Py_Sigset_Converter` function is conditionally defined  in https://github.com/python/cpython/blob/777b611c8c5676b80898a429f71d28e59bddc49d/Modules/posixmodule.h#L27 if `ifdef HAVE_SIGSET_T`

However this function is called unconditionally in https://github.com/python/cpython/blob/777b611c8c5676b80898a429f71d28e59bddc49d/Modules/clinic/signalmodule.c.h#L385 (there are 4 such occurrences), which leads to a compilation error when `HAVE_SIGSET_T` is not set.

This is regression in 3.8+ as far as I can tell due to changes in https://github.com/python/cpython/pull/6720 

I imagine the solution could be to always define this function but raise an exception if it is called when HAVE_SIGSET_T` is undefined, as done in the following patch: https://github.com/iodide-project/pyodide/blob/fc5495ffdb54a11fd588dc60ba6b8777f90c3724/cpython/patches/0006-fix-Py_Sigset_Converter.patch 

Would this be acceptable, or is there a better way of handling it? Thanks!

messages: 374963
nosy: Roman Yurchak, pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set
versions: Python 3.8, Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list