[Python-checkins] gh-96678: Avoid undefined behaviour in test (GH-96672) (#96795)

pablogsal webhook-mailer at python.org
Tue Sep 13 11:04:22 EDT 2022


https://github.com/python/cpython/commit/cc8b006ae3140162de2b616786ca4452f39c1767
commit: cc8b006ae3140162de2b616786ca4452f39c1767
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2022-09-13T16:04:00+01:00
summary:

gh-96678: Avoid undefined behaviour in test (GH-96672) (#96795)

(cherry picked from commit 6ba686d97fd6d2a2169696c6629f7de9482f52db)

Co-authored-by: Matthias Görgens <matthias.goergens at gmail.com>

Co-authored-by: Matthias Görgens <matthias.goergens at gmail.com>

files:
M Programs/_testembed.c

diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index f84445690eb8..a2a2ff40b277 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -1581,7 +1581,7 @@ static int test_init_is_python_build(void)
     config._is_python_build = INT_MAX;
     env = getenv("NEGATIVE_ISPYTHONBUILD");
     if (env && strcmp(env, "0") != 0) {
-        config._is_python_build++;
+        config._is_python_build = INT_MIN;
     }
     init_from_config_clear(&config);
     Py_Finalize();



More information about the Python-checkins mailing list