Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 22C5E200B81 for ; Tue, 30 Aug 2016 01:56:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 212CE160AC8; Mon, 29 Aug 2016 23:56:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 67B88160AB8 for ; Tue, 30 Aug 2016 01:56:24 +0200 (CEST) Received: (qmail 87536 invoked by uid 500); 29 Aug 2016 23:56:23 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 87527 invoked by uid 99); 29 Aug 2016 23:56:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2016 23:56:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 266301805FC for ; Mon, 29 Aug 2016 23:56:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.426 X-Spam-Level: X-Spam-Status: No, score=-0.426 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id AUlhxMxXKsF9 for ; Mon, 29 Aug 2016 23:56:22 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id 46A0D5FADD for ; Mon, 29 Aug 2016 23:56:22 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B91D4E02E6 for ; Mon, 29 Aug 2016 23:56:21 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id B75C43A0248 for ; Mon, 29 Aug 2016 23:56:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1758310 - /httpd/httpd/trunk/server/mpm/winnt/child.c Date: Mon, 29 Aug 2016 23:56:21 -0000 To: cvs@httpd.apache.org From: jchampion@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160829235621.B75C43A0248@svn01-us-west.apache.org> archived-at: Mon, 29 Aug 2016 23:56:25 -0000 Author: jchampion Date: Mon Aug 29 23:56:21 2016 New Revision: 1758310 URL: http://svn.apache.org/viewvc?rev=1758310&view=rev Log: mpm_winnt: clear OVERLAPPED structs before reuse MSDN documentation states that Any unused members of [an OVERLAPPED] structure should always be initialized to zero before the structure is used in a function call. Otherwise, the function may fail and return ERROR_INVALID_PARAMETER. Prior to this patch, the internal state left over from previous overlapped I/O was passed into the next call. It's unclear what effect this might have, if any. (I have not personally witnessed an ERROR_INVALID_PARAMETER myself.) Modified: httpd/httpd/trunk/server/mpm/winnt/child.c Modified: httpd/httpd/trunk/server/mpm/winnt/child.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?rev=1758310&r1=1758309&r2=1758310&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/winnt/child.c (original) +++ httpd/httpd/trunk/server/mpm/winnt/child.c Mon Aug 29 23:56:21 2016 @@ -136,10 +136,17 @@ static void mpm_recycle_completion_conte * state so -don't- close it. */ if (context) { + HANDLE saved_event; + apr_pool_clear(context->ptrans); context->ba = apr_bucket_alloc_create(context->ptrans); context->next = NULL; + + saved_event = context->overlapped.hEvent; + memset(&context->overlapped, 0, sizeof(context->overlapped)); + context->overlapped.hEvent = saved_event; ResetEvent(context->overlapped.hEvent); + apr_thread_mutex_lock(qlock); if (qtail) { qtail->next = context;