fuzz: try setting PYTHONNOUSERSITE=1 to avoid loading site-packages
authorAugie Fackler <augie@google.com>
Thu, 11 Oct 2018 07:27:24 -0400
changeset 40146 adfe4bb53a47
parent 40145 21261fc0fb2b
child 40147 58ebf5083843
fuzz: try setting PYTHONNOUSERSITE=1 to avoid loading site-packages Right now the fuzzer is crashing trying to look up the home dir for uid 0, which is breaking in the fuzz environment. Differential Revision: https://phab.mercurial-scm.org/D4936
contrib/fuzz/manifest.cc
--- a/contrib/fuzz/manifest.cc	Wed Oct 03 10:46:56 2018 +0200
+++ b/contrib/fuzz/manifest.cc	Thu Oct 11 07:27:24 2018 -0400
@@ -30,6 +30,7 @@
 	}
 	strncpy(cpypath, pypath.c_str(), pypath.size());
 	setenv("PYTHONPATH", cpypath, 1);
+	setenv("PYTHONNOUSERSITE", "1", 1);
 	Py_SetPythonHome(cpypath);
 	Py_InitializeEx(0);
 	return 0;