From owner-freebsd-toolchain@freebsd.org Sun Jul 5 02:59:35 2015 Return-Path: Delivered-To: freebsd-toolchain@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 3866AA846 for ; Sun, 5 Jul 2015 02:59:35 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4151A0C for ; Sun, 5 Jul 2015 02:59:35 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by phabric-backend.isc.freebsd.org (Postfix, from userid 1346) id 08718C017; Sun, 5 Jul 2015 02:59:35 +0000 (UTC) Date: Sun, 5 Jul 2015 02:59:35 +0000 To: freebsd-toolchain@freebsd.org From: "araujo (Marcelo Araujo)" Reply-to: D2690+334+b4a053d3a7c96652@FreeBSD.org Subject: [Differential] [Commandeered] D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules Message-ID: X-Priority: 3 Thread-Topic: D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules X-Herald-Rules: <28> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: Y2M3ODgwNzhlNGU0M2Q5NjMyZTYwOGZmMTc0IFWYnZc= Precedence: bulk X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 02:59:35 -0000 araujo commandeered this revision. araujo edited reviewers, added: rodrigc; removed: araujo. araujo added a comment. I will take it to be able to update the patch that I'm gonna start to test as dicussed with @rodrigc. REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D2690 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: araujo, bapt, emaste, dim, rodrigc Cc: imp, freebsd-toolchain-list From owner-freebsd-toolchain@freebsd.org Sun Jul 5 03:18:18 2015 Return-Path: Delivered-To: freebsd-toolchain@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 DF587AAF8 for ; Sun, 5 Jul 2015 03:18:17 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) by mx1.freebsd.org (Postfix) with ESMTP id C086F355E for ; Sun, 5 Jul 2015 03:18:17 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by phabric-backend.isc.freebsd.org (Postfix, from userid 1346) id B9EEECDFE; Sun, 5 Jul 2015 03:18:17 +0000 (UTC) Date: Sun, 5 Jul 2015 03:18:17 +0000 To: freebsd-toolchain@freebsd.org From: "araujo (Marcelo Araujo)" Reply-to: D2690+334+b4a053d3a7c96652@FreeBSD.org Subject: [Differential] [Updated, 55 lines] D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules Message-ID: <5f07774b76b6035b3e14869abb5528ad@localhost.localdomain> X-Priority: 3 Thread-Topic: D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules X-Herald-Rules: <28> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: Y2M3ODgwNzhlNGU0M2Q5NjMyZTYwOGZmMTc0IFWYofk= Precedence: bulk X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_5f07774b76b6035b3e14869abb5528ad" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 03:18:18 -0000 --b1_5f07774b76b6035b3e14869abb5528ad Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: 8bit araujo updated this revision to Diff 6699. araujo added a comment. Update @rodrigc's patch with dim's review and with my changes too. I'm gonna start to test it today! REPOSITORY rS FreeBSD src repository CHANGES SINCE LAST UPDATE https://reviews.freebsd.org/D2690?vs=5826&id=6699 BRANCH /head REVISION DETAIL https://reviews.freebsd.org/D2690 AFFECTED FILES usr.sbin/ypbind/ypbind.c EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: araujo, bapt, emaste, dim, rodrigc Cc: imp, freebsd-toolchain-list --b1_5f07774b76b6035b3e14869abb5528ad Content-Type: text/x-patch; charset=utf-8; name="D2690.6699.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D2690.6699.patch" ZGlmZiAtLWdpdCBhL3Vzci5zYmluL3lwYmluZC95cGJpbmQuYyBiL3Vzci5zYmluL3lwYmluZC95 cGJpbmQuYwotLS0gYS91c3Iuc2Jpbi95cGJpbmQveXBiaW5kLmMKKysrIGIvdXNyLnNiaW4veXBi aW5kL3lwYmluZC5jCkBAIC0xMDYsMTYgKzEwNiwxNiBAQAogdm9pZAl5cF9yZXN0cmljdGVkX21v ZGUoY2hhciAqKTsKIGludAl2ZXJpZnkoc3RydWN0IGluX2FkZHIpOwogCi1jaGFyICpkb21haW5f bmFtZTsKLXN0cnV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ueXBiaW5kX2JpbmRpbmdfYWRkciwKKwkgICAgJnJhZGRycC0+c2luX2FkZHIuc19h ZGRyLCBzaXplb2YodV9pbnQzMl90KSk7CisJbWVtY3B5KCZ5YnIueXBiaW5kX3Jlc3BfdS55cGJp bmRfYmluZGluZm8ueXBiaW5kX2JpbmRpbmdfcG9ydCwKKwkgICAgJnJhZGRycC0+c2luX3BvcnQs IHNpemVvZih1X3Nob3J0KSk7CiAKIAlpZiAod3JpdGV2KHlwZGItPmRvbV9sb2NrZmQsIGlvdiwg MikgIT0gaW92WzBdLmlvdl9sZW4gKyBpb3ZbMV0uaW92X2xlbikgewogCQlzeXNsb2coTE9HX1dB Uk5JTkcsICJ3cml0ZTogJW0iKTsKCg== --b1_5f07774b76b6035b3e14869abb5528ad-- From owner-freebsd-toolchain@freebsd.org Sun Jul 5 10:58:32 2015 Return-Path: Delivered-To: freebsd-toolchain@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 D6524A552 for ; Sun, 5 Jul 2015 10:58:32 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) by mx1.freebsd.org (Postfix) with ESMTP id B703E1616 for ; Sun, 5 Jul 2015 10:58:32 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by phabric-backend.isc.freebsd.org (Postfix, from userid 1346) id AD2F1A360; Sun, 5 Jul 2015 10:58:32 +0000 (UTC) Date: Sun, 5 Jul 2015 10:58:32 +0000 To: freebsd-toolchain@freebsd.org From: "dim (Dimitry Andric)" Reply-to: D2690+334+b4a053d3a7c96652@FreeBSD.org Subject: [Differential] [Commented On] D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules Message-ID: X-Priority: 3 Thread-Topic: D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules X-Herald-Rules: <28> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: Y2M3ODgwNzhlNGU0M2Q5NjMyZTYwOGZmMTc0IFWZDdg= Precedence: bulk X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 10:58:32 -0000 dim added inline comments. INLINE COMMENTS usr.sbin/ypbind/ypbind.c:622 While we are here, can we please update this to a post-K&R definition? E.g.: static bool_t broadcast_result(caddr_t out, struct sockaddr_in *addr) REPOSITORY rS FreeBSD src repository REVISION DETAIL https://reviews.freebsd.org/D2690 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: araujo, bapt, emaste, dim, rodrigc Cc: imp, freebsd-toolchain-list From owner-freebsd-toolchain@freebsd.org Sun Jul 5 11:00:30 2015 Return-Path: Delivered-To: freebsd-toolchain@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 46E84A59C for ; Sun, 5 Jul 2015 11:00:30 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) by mx1.freebsd.org (Postfix) with ESMTP id 2FE2A1910 for ; Sun, 5 Jul 2015 11:00:30 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by phabric-backend.isc.freebsd.org (Postfix, from userid 1346) id 29110A416; Sun, 5 Jul 2015 11:00:30 +0000 (UTC) Date: Sun, 5 Jul 2015 11:00:30 +0000 To: freebsd-toolchain@freebsd.org From: "dim (Dimitry Andric)" Reply-to: D2690+334+b4a053d3a7c96652@FreeBSD.org Subject: [Differential] [Accepted] D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules Message-ID: <4663c5d71fdf1861a81a7dc3444b700a@localhost.localdomain> X-Priority: 3 Thread-Topic: D2690: In ypbind, eliminate error: dereferencing type-punned pointer will break strict-aliasing rules X-Herald-Rules: <28> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: Y2M3ODgwNzhlNGU0M2Q5NjMyZTYwOGZmMTc0IFWZDk4= Precedence: bulk X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2015 11:00:30 -0000 dim accepted this revision. dim added a comment. This revision has a positive review. For the rest, LGTM. REPOSITORY rS FreeBSD src repository BRANCH /head REVISION DETAIL https://reviews.freebsd.org/D2690 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: araujo, bapt, emaste, rodrigc, dim Cc: imp, freebsd-toolchain-list