diff --git a/setup/installer/linux/util.c b/setup/installer/linux/util.c index b06d6083c9..c619cec16f 100644 --- a/setup/installer/linux/util.c +++ b/setup/installer/linux/util.c @@ -183,6 +183,7 @@ void initialize_interpreter(int argc, char **argv, char *outr, char *errr, Py_NoUserSiteDirectory = 1; Py_VerboseFlag = 0; Py_DebugFlag = 0; + Py_HashRandomizationFlag = 1; Py_SetProgramName(exe_path); Py_SetPythonHome(base_dir); diff --git a/setup/installer/osx/app/util.c b/setup/installer/osx/app/util.c index a3dbc35d16..b8e1e360fd 100644 --- a/setup/installer/osx/app/util.c +++ b/setup/installer/osx/app/util.c @@ -55,6 +55,7 @@ void initialize_interpreter(const char **ENV_VARS, const char **ENV_VAR_VALS, Py_DontWriteBytecodeFlag = 1; Py_IgnoreEnvironmentFlag = 1; Py_NoUserSiteDirectory = 1; + Py_HashRandomizationFlag = 1; //Py_VerboseFlag = 1; //Py_DebugFlag = 1; diff --git a/setup/installer/windows/util.c b/setup/installer/windows/util.c index 5ed6bbce69..310938d3e0 100644 --- a/setup/installer/windows/util.c +++ b/setup/installer/windows/util.c @@ -319,6 +319,9 @@ void initialize_interpreter(wchar_t *outr, wchar_t *errr, flag = (int*)GetProcAddress(dll, "Py_NoUserSiteDirectory"); if (!flag) ExitProcess(_show_error(L"Failed to get user_site flag", L"", 1)); *flag = 1; + flag = (int*)GetProcAddress(dll, "Py_HashRandomizationFlag "); + if (!flag) ExitProcess(_show_error(L"Failed to get hash randomization flag", L"", 1)); + *flag = 1; flag = (int*)GetProcAddress(dll, "Py_VerboseFlag"); if (!flag) ExitProcess(_show_error(L"Failed to get verbose flag", L"", 1)); //*flag = 1;