From owner-freebsd-ports-bugs@freebsd.org Sat Jul 2 12:30:22 2016 Return-Path: Delivered-To: freebsd-ports-bugs@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 B52F3B8FD3F for ; Sat, 2 Jul 2016 12:30:22 +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 mx1.freebsd.org (Postfix) with ESMTPS id 969D22BA9 for ; Sat, 2 Jul 2016 12:30:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u62CULJn036780 for ; Sat, 2 Jul 2016 12:30:22 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 209742] devel/godot: Improve port (v2.0.3); add devel/godot-tools port Date: Sat, 02 Jul 2016 12:30:21 +0000 X-Bugzilla-Reason: AssignedTo 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: feature, patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lightside@gmx.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback+ X-Bugzilla-Changed-Fields: flagtypes.name attachments.isobsolete attachments.created 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-ports-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2016 12:30:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209742 lightside changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172034|maintainer-approval?(FreeBS | Flags|D@ShaneWare.Biz) | Attachment #172034|0 |1 is obsolete| | Attachment #172038| |maintainer-approval?(FreeBS Flags| |D@ShaneWare.Biz) --- Comment #42 from lightside --- Created attachment 172038 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D172038&action= =3Dedit Proposed patch (since 415742 revision) (In reply to comment #41) > I don't see the need for the extra if() - To include the extra WARN_PRINT > add it after if(sysctl()!=3D0) when you set the string to zero length, as= you > setting the string to zero length there would be no point in creating the > String and testing if it equals "" I guess, the check for empty string might be needed, in case sysctl returns empty string (not sure, if this is possible, but still), like in Linux case= for readlink. This is two exception cases, which were combined into one WARN_PR= INT. The "buf[0] =3D '\0';" is similar to Linux case with "memset(buf,0,256);" But from the code of vn_fullpath1 function, it assigns '\0' to last buf(fer) position: https://github.com/freebsd/freebsd/blob/28823d06561e2e9911180b17a57e05ff19d= 7cbf6/sys/kern/vfs_cache.c#L1303 So it should be ok without manual assign. You could check various examples on the following search request: https://github.com/freebsd/freebsd/search?q=3DKERN_PROC_PATHNAME The source code for sysctl_kern_proc_pathname function is here, for referen= ce: https://github.com/freebsd/freebsd/blob/736e07849585def123cc8c3042c05c77f3d= 11e2e/sys/kern/kern_proc.c#L1995 Particularly, there is even "/proc/curproc/file" example (for readlink usag= e, instead of "/proc/self/exe", like in Linux case): https://github.com/freebsd/freebsd/blob/bb4ff000de429abf7115b8d078833c46838= 7f1dd/contrib/libexecinfo/backtrace.c#L55 which works, but returns warnings several times, if used similarly as for L= inux case. But there is explicit differentiation in compiler-rt source code (sysctl for FreeBSD and readlink for others): https://github.com/freebsd/freebsd/blob/9c27ec33f2c82fe6c60c9c375a88f96a1e1= 0a6a2/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc#L715 In case of pathname request for other process, there is an example with che= ck for "len =3D=3D 0 || strlen(pathname) =3D=3D 0" and "No cached pathname for= process" error: https://github.com/freebsd/freebsd/blob/290f0204ae95d6dc92ba9c15fafe090e9d4= 338af/tools/test/ptrace/scescx.c#L170 New patch attached, with your suggestion. --=20 You are receiving this mail because: You are the assignee for the bug.=