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 27DFF200C5C for ; Thu, 20 Apr 2017 18:07:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 26722160B9F; Thu, 20 Apr 2017 16:07:00 +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 6E085160B91 for ; Thu, 20 Apr 2017 18:06:59 +0200 (CEST) Received: (qmail 58903 invoked by uid 500); 20 Apr 2017 16:06:58 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 58891 invoked by uid 99); 20 Apr 2017 16:06:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2017 16:06:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 09B29CDA65; Thu, 20 Apr 2017 16:06:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fq4n8vKqXGS8; Thu, 20 Apr 2017 16:06:57 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 63DA95F297; Thu, 20 Apr 2017 16:06:56 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C1596E00A6; Thu, 20 Apr 2017 16:06:55 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 9A0ECC404BB; Thu, 20 Apr 2017 16:06:55 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============9161591163064594921==" MIME-Version: 1.0 Subject: Re: Review Request 58512: Avoid a crash in HTTP decoder. From: Anand Mazumdar To: Anand Mazumdar , James Peach , Jiang Yan Xu Cc: Anindya Sinha , mesos Date: Thu, 20 Apr 2017 16:06:55 -0000 Message-ID: <20170420160655.24123.58074@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Anand Mazumdar X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/58512/ X-Sender: Anand Mazumdar References: <20170419160209.32394.14901@reviews-vm2.apache.org> In-Reply-To: <20170419160209.32394.14901@reviews-vm2.apache.org> Reply-To: Anand Mazumdar X-ReviewRequest-Repository: mesos archived-at: Thu, 20 Apr 2017 16:07:00 -0000 --===============9161591163064594921== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58512/#review172504 ----------------------------------------------------------- 3rdparty/libprocess/src/decoder.hpp Lines 208 (patched) hmm, these seem not related to the review i.e., avoiding the crash. Can you create a separate patch with these changes and mark this as dependent on it? Good catch! 3rdparty/libprocess/src/decoder.hpp Lines 715 (patched) set `decoder->failed=true` here? If it's already set earlier, add an explicit invariant check here before this line? 3rdparty/libprocess/src/decoder.hpp Lines 1017 (patched) Ditto as above. - Anand Mazumdar On April 19, 2017, 4:02 p.m., Anindya Sinha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58512/ > ----------------------------------------------------------- > > (Updated April 19, 2017, 4:02 p.m.) > > > Review request for mesos, Anand Mazumdar, James Peach, and Jiang Yan Xu. > > > Bugs: MESOS-7400 > https://issues.apache.org/jira/browse/MESOS-7400 > > > Repository: mesos > > > Description > ------- > > If the callback `on_headers_complete()` fails, the decoder's writer > object is `None()`. So, when the callback `on_message_complete()` is > called, we should not crash in that case. > Note that the `CHECK(decoder->writer)` is valid for the callback > `on_body()` is valid since this callback is called only on a success > in `on_headers_complete()` callback. > > > Diffs > ----- > > 3rdparty/libprocess/src/decoder.hpp 4c779d42548958e610142438a57529ccb4478053 > 3rdparty/libprocess/src/tests/decoder_tests.cpp c0efef571815752cc28e5a0dc7a07adc82bb31d5 > > > Diff: https://reviews.apache.org/r/58512/diff/2/ > > > Testing > ------- > > All tests passed. > > > Thanks, > > Anindya Sinha > > --===============9161591163064594921==--