From owner-svn-src-head@freebsd.org Sun May 29 03:47:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA88EB4F7A3; Sun, 29 May 2016 03:47:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BED9E1682; Sun, 29 May 2016 03:47:21 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x22d.google.com with SMTP id g64so54037369pfb.2; Sat, 28 May 2016 20:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=tOmhjE5pOYEBknuS2/pGgKAO23G7UsmL1DcarZUmN9s=; b=NE3GGdPLPaZiKKwKahG+9F1AX4i1wRzlIQuwvE5lJM/efnve+Mv59H9/JRNZ1R26Kc M7eUlEW/e4QK1BcfDp0F4jUIvPrf+0lsR+frxMuQeiDJIJwfSn05DE84gfm17YRXVYaO +fdFtCbgF7JZQCTD0SIBgeyPyrq+wYXjwRtUBSfXNXcTO6yKKo3BLrDHYrvIfHWTowFy nbpgDALQ6PIcj3rY0w0IGN4NP0P7EC4+JCqu5jyRFV5GZFf1MS02uUa8DyY4J9ZsTW0m PByAEyyr4n1sMasiKi8URiQI/8IcMsxZQg9SiE/TGRwA33OwpB0uSBp83yDzwfxeElSo ZeIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=tOmhjE5pOYEBknuS2/pGgKAO23G7UsmL1DcarZUmN9s=; b=iN1z5DJ9HsHW8WiPeF9ZYZaOwPxP0b4w3NVcwhw5//uLCwQOA7Z2w+aX4qA9pM9y5z d5Xxsp5cy88AH1qwA2jSrGnW19JpGvMzJg58JZtLFXzsTvigLBcgDEcrkysU6vIPNM9A 9hSiXVDDDT797dy4Y5jsPr0iE1CFdBsOBqxahomXdZYbyiVbJknF5Gp6ma2fwHwm6+OK QfEyyAhdQEXYn7/3SjG+UAUF9wnp11nC+fSrnfKgh5+J6+kxzty3CT6p7y0HNeEep8e6 aobrrzBOn2S5NTMLqSvOaJvhL0vRYHvLlsTVEQyXQi56lXO0FSLY6aNIC31Y24JnlSYq S+MA== X-Gm-Message-State: ALyK8tJgPjpTyn6EDI26J36avZskEE+b4R2gicnYj+6EajRfCGthsrMdE5JB8rKS4tBT4g== X-Received: by 10.98.8.146 with SMTP id 18mr31731038pfi.14.1464493641262; Sat, 28 May 2016 20:47:21 -0700 (PDT) Received: from pinklady.local (c-73-97-222-46.hsd1.wa.comcast.net. [73.97.222.46]) by smtp.gmail.com with ESMTPSA id p13sm23528042pfj.58.2016.05.28.20.47.20 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 28 May 2016 20:47:20 -0700 (PDT) Subject: Re: svn commit: r300932 - head/usr.sbin/rpcbind Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8EAE00F1-0BE3-435C-87C8-D10F9F9549E8"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <7c4e662d-069c-114e-c9d1-320a6571bc89@FreeBSD.org> Date: Sat, 28 May 2016 20:47:17 -0700 Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <7EF99230-228E-49CD-B924-4B594E90ECDF@gmail.com> References: <201605290342.u4T3gpUB045575@repo.freebsd.org> <7c4e662d-069c-114e-c9d1-320a6571bc89@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 03:47:22 -0000 --Apple-Mail=_8EAE00F1-0BE3-435C-87C8-D10F9F9549E8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 28, 2016, at 20:44, Bryan Drewery wrote: >=20 > On 5/28/2016 8:42 PM, Garrett Cooper wrote: >> Author: ngie >> Date: Sun May 29 03:42:50 2016 >> New Revision: 300932 >> URL: https://svnweb.freebsd.org/changeset/base/300932 >>=20 >> Log: >> Catch malloc(3) errors and socket(2) errors >>=20 >> - malloc failing will result in a delayed segfault >> - socket failing will result in delayed failures with setsockopt >>=20 >> Exit in the event that either of these high-level conditions are = met. >>=20 >> Reported by: Coverity >> CID: 976288, 976321, 976858 >> Sponsored by: EMC / Isilon Storage Division >>=20 >> Modified: >> head/usr.sbin/rpcbind/util.c >>=20 >> Modified: head/usr.sbin/rpcbind/util.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/usr.sbin/rpcbind/util.c Sun May 29 02:59:03 2016 = (r300931) >> +++ head/usr.sbin/rpcbind/util.c Sun May 29 03:42:50 2016 = (r300932) >> @@ -336,6 +336,7 @@ network_init(void) >> if (local_in4 =3D=3D NULL) { >> if (debugging) >> fprintf(stderr, "can't alloc local ip4 = addr\n"); >> + exit(1); >> } >> memcpy(local_in4, res->ai_addr, sizeof *local_in4); >> } >> @@ -351,6 +352,7 @@ network_init(void) >> if (local_in6 =3D=3D NULL) { >> if (debugging) >> fprintf(stderr, "can't alloc local ip6 = addr\n"); >> + exit(1); >=20 > Did something meaningful get printed before this on hitting this = error, > without debug? Nope. It just crashed.. I=E2=80=99ve briefly thought about it, and I = think that err/errx would be better. I=E2=80=99ll run some more = tests/fix some more Coverity issues in the area, and send it out for CR. Thanks, -Ngie --Apple-Mail=_8EAE00F1-0BE3-435C-87C8-D10F9F9549E8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXSmZGAAoJEPWDqSZpMIYVy88QAL934+0lNAnbhPwWWm5YFWoJ aegRSBIUbPpnQhyklftVNmNq1Z7EuNtb0WYHenNEi7HnPVUoYTf/ZMS3+KK/PUnU /weB31Evv2yVcRU3pblNiUkahm8kxnRAy/7qHkBTarFPn3oIQ5i8CHRvmo+olhdr +v7neqz/7bWMn2Cw45aSaAo9RAN0Ew4saeAJwmZlNd4i4ZSwT4b3a/gRtmVLErDZ PYPDB6ola1m+X0vx6zXYRFKQV1pXWMb+bsT4dPyyO/fmvirHhdaac0IbJxLHDkHC 8VOmORKb52qLpgqp/ZRPPX3Dnq3DpM/sB9P+5Ru/PkpI693H5Qc3YR1St/8j+a+l 7Y6a3OSSbCZs1EK2GDx664WNZi0ZS0Go5tVmpaxiqk6ki/norUkNdIS9gn+7Mgn+ TZRsTN9s8udPGAb576ceuF2f7Txt4IsKvxHwvuDXVA/WHtOdPt8IMGsuT+d24yUM gWmPi5Ss4TQ6zHCUDP+77tvUUFHhfU5O5cP+VdVagG86crE2pOq1lpQ4wDznt3zM 2gGkQZR3AerfigwW1ARzkbUjxPnCXW1oRJJYvZF1z1Abcp4kWmUibUVgA46np7Ff 14/98UTfOSOePsl61HjyVJLDBP9jQApTjAwfqeI1PR3lmYcGs43lLR6aMos/Sk2r hC3F23RIii2B0m4gauP4 =413+ -----END PGP SIGNATURE----- --Apple-Mail=_8EAE00F1-0BE3-435C-87C8-D10F9F9549E8--