Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(228)

Unified Diff: Modules/_multiprocessing/semaphore.c

Issue 27591: multiprocessing: Possible uninitialized pointer use in Windows builds
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Modules/_multiprocessing/semaphore.c
+++ b/Modules/_multiprocessing/semaphore.c
@@ -108,16 +108,18 @@ semlock_acquire(SemLockObject *self, PyO
/* prepare list of handles */
nhandles = 0;
handles[nhandles++] = self->handle;
if (_PyOS_IsMainThread()) {
sigint_event = _PyOS_SigintEvent();
assert(sigint_event != NULL);
handles[nhandles++] = sigint_event;
+ } else {
haypo 2016/07/23 02:06:33 PEP 7: } else {
+ sigint_event = NULL;
}
/* do the wait */
Py_BEGIN_ALLOW_THREADS
if (sigint_event != NULL)
ResetEvent(sigint_event);
res = WaitForMultipleObjectsEx(nhandles, handles, FALSE, full_msecs, FALSE);
Py_END_ALLOW_THREADS
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+