From owner-freebsd-gnome@freebsd.org Mon Jul 30 19:11:26 2018 Return-Path: Delivered-To: freebsd-gnome@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BA3E105E8D5 for ; Mon, 30 Jul 2018 19:11:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E7FCA80356 for ; Mon, 30 Jul 2018 19:11:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id ACE4F105E8D4; Mon, 30 Jul 2018 19:11:25 +0000 (UTC) Delivered-To: gnome@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AF37105E8D3 for ; Mon, 30 Jul 2018 19:11:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B74F8034F for ; Mon, 30 Jul 2018 19:11:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 60B922586C for ; Mon, 30 Jul 2018 19:11:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w6UJBOpa013468 for ; Mon, 30 Jul 2018 19:11:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w6UJBOnR013445 for gnome@FreeBSD.org; Mon, 30 Jul 2018 19:11:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 214338] [PATCH] devel/glib20: new kqueue() backend for file monitoring Date: Mon, 30 Jul 2018 19:11:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: needs-patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: lightside@gmx.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: eugen@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 19:11:26 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214338 --- Comment #59 from lightside --- (In reply to comment #56) > Fixed MSTOSBT macro for files/kqueue_fnm.c. The MSTOSBT macro used in kq_fnm_create function in files/kqueue_fnm.c file= as: kfnm->rate_lim_time_init =3D MSTOSBT(kfnm->s.rate_limit_time_init); where KQUEUE_MON_RATE_LIMIT_TIME_INIT defined as: #ifndef KQUEUE_MON_RATE_LIMIT_TIME_INIT # define KQUEUE_MON_RATE_LIMIT_TIME_INIT 1000 #endif and used for "kfms.rate_limit_time_init =3D KQUEUE_MON_RATE_LIMIT_TIME_INIT= ;" in g_kqueue_file_monitor_is_supported function in files/gkqueuefilemonitor.c f= ile before kq_fnm_create function invocation. If change "<" to "<=3D" in "for (int64_t i =3D 0; i < 1000; ++i) {" for te= stcase in comment #56, then possible to get result for 1000 value: % cc --version | head -1 FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 % cc -O2 -o test test.c % ./test && echo ok || echo not ok <..> 998: funct =3D 4286377361, macro =3D -8589935, false 999: funct =3D 4290672328, macro =3D -4294968, false 1000: funct =3D 4294967295, macro =3D -1, false not ok % cc -O2 -DFIXED=3D1 -o test test.c % ./test && echo ok || echo not ok <..> 998: funct =3D 4286377361, macro =3D 4286377361, true 999: funct =3D 4290672328, macro =3D 4290672328, true 1000: funct =3D 4294967295, macro =3D 4294967295, true ok % clang60 --version | head -1 clang version 6.0.1 (tags/RELEASE_601/final) % clang60 -O2 -o test test.c % ./test && echo ok || echo not ok <..> 998: funct =3D 4286377361, macro =3D 4286377361, true 999: funct =3D 4290672328, macro =3D 4290672328, true 1000: funct =3D 4294967295, macro =3D 4294967295, true ok % clang60 -O2 -DFIXED=3D1 -o test test.c % ./test && echo ok || echo not ok <..> 998: funct =3D 4286377361, macro =3D 4286377361, true 999: funct =3D 4290672328, macro =3D 4290672328, true 1000: funct =3D 4294967295, macro =3D 4294967295, true ok In other words, if kfnm->s.rate_limit_time_init was assigned to 1000 value, then kfnm->rate_lim_time_init maybe assigned to -1 instead of 4294967295, if compiled without fix for MSTOSBT macro (attachment #195598) with using Clang 3.4.1 base compiler on FreeBSD 10.4 amd64. Sorry about long explanations. --=20 You are receiving this mail because: You are on the CC list for the bug.=