Package: src:python-setproctitle Version: 1.3.7-2 User: [email protected] Usertags: python3.15 Tags: patch
Hi! While rebuilding the python related packages against the python version 3.15rc1 we found that python-setproctitle fails to build from source [1]. This fixed upstream with the commit "fix: fix segfault after clearenv() on Python 3.15" (68125ab). I'm attaching the patch used to build the package in the sandbox. Please consider including this patch in your next upload. Happy hacking, [1]: https://debusine.debian.net/debian/r-python-python3.15/work-request/1063575/ -- "Can you imagine what I would do if I could do all I can?" -- Sun Tzu Saludos /\/\ /\ >< `/
commit 68125abf821ee6ebfb4a4eb86ffe655a4c072c9e Author: Victor Stinner <[email protected]> Date: Thu Oct 30 15:12:24 2025 +0100 fix: fix segfault after clearenv() on Python 3.15 Fix find_argv_from_env() if clearenv() has been called. Python 3.15 implements os.environ.clear() as clearenv(). Co-Authored-By: Karolina Surma <[email protected]> diff --git a/src/spt_setup.c b/src/spt_setup.c index ba7a7a6..4078d36 100644 --- a/src/spt_setup.c +++ b/src/spt_setup.c @@ -139,6 +139,13 @@ find_argv_from_env(int argc, char *arg0) } buf[argc] = NULL; + /* environ can be NULL if clearenv() has been called. + * Python 3.15 implements os.environ.clear() as clearenv(). */ + if (!environ) { + spt_debug("environ pointer is NULL"); + goto exit; + } + /* Walk back from environ until you find argc-1 null-terminated strings. * Don't look for argv[0] as it's probably not preceded by 0. */ ptr = environ[0];

