CYGWIN: warning on missing secure randomness function #148461
Copy link
Copy link
Closed
Labels
OS-unsupportedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
While compiling latest sources of Python on CYGWIN, this warning is printed:
unable to use secure randomness
This happens because the platform is not handled into Objects\mimalloc\prim\unix\prim.c.
However, this can be fixed very easily because CYGWIN provides arc4random_buf(), which is already used by the ports for other plaforms.
So, the issue can be fixed by simply adding an || defined(__CYGWIN__) near __FreeBSD__, __NetBSD__ and others.
This is a patch for mimalloc, so see also #113141 for reference.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
OS-unsupportedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Activity
pythongh-148461: use arc4random_buf() on CYGWIN
gh-148461: Use arc4random_buf() in mimalloc on Cygwin (#148462)
pythongh-159111: Restore arc4random_buf() usage on Cygwin in vendored…