Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-44113: Update __xxtestfuzz not to use Py_SetProgramName #26083

Merged
merged 5 commits into from
May 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Modules/_xxtestfuzz/fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,17 @@ int __lsan_is_turned_off(void) { return 1; }


int LLVMFuzzerInitialize(int *argc, char ***argv) {
PyConfig config;
PyConfig_InitIsolatedConfig(&config);
PyStatus status;
wchar_t* wide_program_name = Py_DecodeLocale(*argv[0], NULL);
Py_SetProgramName(wide_program_name);
status = PyConfig_SetString(&config, &config.program_name,
corona10 marked this conversation as resolved.
Show resolved Hide resolved
wide_program_name);
if (PyStatus_Exception(status)) {
PyConfig_Clear(&config);
Py_ExitStatusException(status);
}
corona10 marked this conversation as resolved.
Show resolved Hide resolved

return 0;
corona10 marked this conversation as resolved.
Show resolved Hide resolved
}

Expand Down