Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the memory sanitizer false positive in :func:`os.getrandom`.
4 changes: 4 additions & 0 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -17195,6 +17195,10 @@ os_getrandom_impl(PyObject *module, Py_ssize_t size, int flags)
goto error;
}

#ifdef _Py_MEMORY_SANITIZER
__msan_unpoison(data, size);
#endif

return PyBytesWriter_FinishWithSize(writer, n);

error:
Expand Down
Loading