summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-09-13 15:04:00 (GMT)
committerGitHub <noreply@github.com>2022-09-13 15:04:00 (GMT)
commitcc8b006ae3140162de2b616786ca4452f39c1767 (patch)
tree34f36f570526dc973c16d0523251434c9f5c848e
parentf2d7fa88390502fa408b8f1e1ad1b6d23a04c48a (diff)
downloadcpython-cc8b006ae3140162de2b616786ca4452f39c1767.zip
cpython-cc8b006ae3140162de2b616786ca4452f39c1767.tar.gz
cpython-cc8b006ae3140162de2b616786ca4452f39c1767.tar.bz2
gh-96678: Avoid undefined behaviour in test (GH-96672) (#96795)
(cherry picked from commit 6ba686d97fd6d2a2169696c6629f7de9482f52db) Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com> Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
-rw-r--r--Programs/_testembed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index f844456..a2a2ff4 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();