From owner-freebsd-standards@FreeBSD.ORG Sun Feb 23 22:45:10 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01776BF for ; Sun, 23 Feb 2014 22:45:10 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DFC011D78; Sun, 23 Feb 2014 22:45:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1NMj9lV063972; Sun, 23 Feb 2014 22:45:09 GMT (envelope-from gerald@freefall.freebsd.org) Received: (from gerald@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1NMj9nm063971; Sun, 23 Feb 2014 22:45:09 GMT (envelope-from gerald) Date: Sun, 23 Feb 2014 22:45:09 GMT Message-Id: <201402232245.s1NMj9nm063971@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org, gerald@FreeBSD.org, gerald@FreeBSD.org From: gerald@FreeBSD.org Subject: Re: ports/182657: [patch] lang/gcc48: expose c99 math in 'std' namespace X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 22:45:10 -0000 Synopsis: [patch] lang/gcc48: expose c99 math in 'std' namespace State-Changed-From-To: open->feedback State-Changed-By: gerald State-Changed-When: Sun Feb 23 22:44:50 UTC 2014 State-Changed-Why: First of all, sorry for the delay. There have been a couple of issues with the lang/gcc ports that I needed to address first and this has taken longer than I had expected. I would love to expose c99 math to FreeBSD users of GCC. The proposed patch seems a bit hackish, though, and specific to the lang/gcc* ports? Or do you think that could be pushed upstream? That would be the best approach, first for GCC 4.9 and then we could look into backporting to GCC 4.8, perhaps GCC 4.7. Gerald http://www.freebsd.org/cgi/query-pr.cgi?pr=182657 From owner-freebsd-standards@FreeBSD.ORG Mon Feb 24 11:06:58 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CDCFB63 for ; Mon, 24 Feb 2014 11:06:58 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 290F81631 for ; Mon, 24 Feb 2014 11:06:58 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1OB6wqX027701 for ; Mon, 24 Feb 2014 11:06:58 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1OB6vAY027699 for freebsd-standards@FreeBSD.org; Mon, 24 Feb 2014 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 24 Feb 2014 11:06:57 GMT Message-Id: <201402241106.s1OB6vAY027699@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 11:06:58 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 47 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Mar 3 11:06:53 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54135F0A for ; Mon, 3 Mar 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 408AE957 for ; Mon, 3 Mar 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s23B6r8C008669 for ; Mon, 3 Mar 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s23B6qER008667 for freebsd-standards@FreeBSD.org; Mon, 3 Mar 2014 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 3 Mar 2014 11:06:52 GMT Message-Id: <201403031106.s23B6qER008667@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2014 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 47 problems total. From owner-freebsd-standards@FreeBSD.ORG Sat Mar 8 17:20:00 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C22FB852 for ; Sat, 8 Mar 2014 17:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 81E0B75A for ; Sat, 8 Mar 2014 17:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s28HK0pC013911 for ; Sat, 8 Mar 2014 17:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s28HK0E5013910; Sat, 8 Mar 2014 17:20:00 GMT (envelope-from gnats) Resent-Date: Sat, 8 Mar 2014 17:20:00 GMT Resent-Message-Id: <201403081720.s28HK0E5013910@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Roman Bogorodskiy Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A791674A for ; Sat, 8 Mar 2014 17:18:34 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93AC96E9 for ; Sat, 8 Mar 2014 17:18:34 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s28HIYGj013845 for ; Sat, 8 Mar 2014 17:18:34 GMT (envelope-from novel@freefall.freebsd.org) Received: (from novel@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s28HIY9n013844; Sat, 8 Mar 2014 17:18:34 GMT (envelope-from novel) Message-Id: <201403081718.s28HIY9n013844@freefall.freebsd.org> Date: Sat, 8 Mar 2014 17:18:34 GMT From: Roman Bogorodskiy To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Roman Bogorodskiy List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 17:20:00 -0000 >Number: 187378 >Category: standards >Synopsis: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 08 17:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Roman Bogorodskiy >Release: FreeBSD 11.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r262685: Sun Mar 2 11:35:38 UTC 2014 peter@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64 >Description: As per this document: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html stdlib.h should define W* macros like WEXITSTATUS etc. However, it doesn't. On 10-STABLE, I get: (21:13) novel@kloomba:~ %> cat stdlib_wmacros.c #include #ifndef WEXITSTATUS # error WEXITSTATUS not defined #endif (21:13) novel@kloomba:~ %> cc -c stdlib_wmacros.c stdlib_wmacros.c:4:3: error: WEXITSTATUS not defined # error WEXITSTATUS not defined ^ 1 error generated. (21:13) novel@kloomba:~ %> The same test on Fedora 18: (12:17) novel@localhost:~ %> cat stdlib_wmacros.c #include #ifndef WEXITSTATUS # error WEXITSTATUS not defined #endif (12:17) novel@localhost:~ %> gcc -c stdlib_wmacros.c (12:18) novel@localhost:~ %> >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Mon Mar 10 11:06:54 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FD531C4 for ; Mon, 10 Mar 2014 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA1F821 for ; Mon, 10 Mar 2014 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2AB6rsq043367 for ; Mon, 10 Mar 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2AB6rNe043365 for freebsd-standards@FreeBSD.org; Mon, 10 Mar 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 Mar 2014 11:06:53 GMT Message-Id: <201403101106.s2AB6rNe043365@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2014 11:06:54 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/187378 standards stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 48 problems total. From owner-freebsd-standards@FreeBSD.ORG Tue Mar 11 16:40:02 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FF884F9 for ; Tue, 11 Mar 2014 16:40:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00E05C34 for ; Tue, 11 Mar 2014 16:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2BGe1NF031030 for ; Tue, 11 Mar 2014 16:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2BGe1J9031029; Tue, 11 Mar 2014 16:40:01 GMT (envelope-from gnats) Date: Tue, 11 Mar 2014 16:40:01 GMT Message-Id: <201403111640.s2BGe1J9031029@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Peter Pentchev List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 16:40:02 -0000 The following reply was made to PR standards/187378; it has been noted by GNATS. From: Peter Pentchev To: Roman Bogorodskiy Cc: bug-followup@freebsd.org Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) Date: Tue, 11 Mar 2014 18:24:43 +0200 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 08, 2014 at 05:18:34PM +0000, Roman Bogorodskiy wrote: >=20 > >Number: 187378 > >Category: standards > >Synopsis: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) > >Release: FreeBSD 11.0-CURRENT amd64 > >Organization: > >Environment: > System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0= r262685: Sun Mar 2 11:35:38 UTC 2014 peter@freefall.freebsd.org:/usr/obj/u= sr/src/sys/FREEFALL amd64 >=20 >=20 > >Description: > As per this document: >=20 > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html >=20 > stdlib.h should define W* macros like WEXITSTATUS etc. However, it doesn'= t. FWIW, this is even documented in FreeBSD's stdlib.h :) /* XXX XSI requires pollution from here. We'd rather not. */ Yes, I know this doesn't help you much; I'm just trying to point out that, well, this is not an accidental omission, but a deliberate design decision. For the reasons for it you'll have to ask the people who did it - this particular text seems to have been added by Garrett Wollman back in 2002, but I think that he was just documenting the status quo rather than making a decision right there and then. G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org p.penchev@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 This sentence claims to be an Epimenides paradox, but it is lying. --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJTHzjFAAoJEGUe77AlJ98TNqsQAJ7NHp9017FoScKycpvoPlCi wqzMMlT4gMLRSzg11BQTMVUjH4fG1Rk4q9Hy3aUJdII2G1lfG6prz2U6mOwmUxOr Gjn3ex0/stukIdQfIWMPjxcNZQ4CWTkg8bfsE8Izn3t38WmeOayzURrBE0PKYc1G B6IO7C1ndX2Sfpehoty+VGryWeo6PByWzh/H99NHPPvvTXYLgDKfrsuDKcIO/923 ejod5jExz81dVqNoNCf90F6C/KmJVVHayq2ApYOYzoKjFuh4wISdr8kHOnLQu0Aa O9lv3n92CJx9I8GxZqX9dlxjYOtzHir3Pjnu5Jx3wXZiRYzp2lUQ2Mj6ml0zffnk bJS8OEUWNie1tGLH3RLGQUsVRWLFhwe47iOmxa6wtdRAY+V3//sWFIoE3XBLwoQj bJF5x6Lx6mE+AD1lKgFmZdX2OhP0CjanCJ0qWsWTQjF21yuz8PKN2qQMLsGqpGky kwtd3evKeZtO1w48WcSbZ9KrAi0F8iH5Pi4sJ2y7ni6Y+/hKl5sjDBJiUU6AQejy 8WINjjtj7+z6GZ5PcjAF4rPI8F5K9e6EhZo5trd6mBYJ1OM5XZa/cziaT6w3w2Eb Yr3aRoV2Sby4I5HM5LOdcxrGhr3668kamyihPWRgfJIOdLGOSkUHJuq5BAJRWgUL 6KdKm822hGpfgmA9rAff =kj6X -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e-- From owner-freebsd-standards@FreeBSD.ORG Tue Mar 11 17:00:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FA15D50 for ; Tue, 11 Mar 2014 17:00:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72E3AE0E for ; Tue, 11 Mar 2014 17:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2BH019E036641 for ; Tue, 11 Mar 2014 17:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2BH01Af036640; Tue, 11 Mar 2014 17:00:01 GMT (envelope-from gnats) Date: Tue, 11 Mar 2014 17:00:01 GMT Message-Id: <201403111700.s2BH01Af036640@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Roman Bogorodskiy Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Roman Bogorodskiy List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 17:00:01 -0000 The following reply was made to PR standards/187378; it has been noted by GNATS. From: Roman Bogorodskiy To: Peter Pentchev Cc: bug-followup@freebsd.org, wollman@FreeBSD.org Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) Date: Tue, 11 Mar 2014 20:52:34 +0400 --DKU6Jbt7q3WqK7+M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter Pentchev wrote: > > stdlib.h should define W* macros like WEXITSTATUS etc. However, it does= n't. >=20 > FWIW, this is even documented in FreeBSD's stdlib.h :) >=20 > /* XXX XSI requires pollution from here. We'd rather not. */ >=20 > Yes, I know this doesn't help you much; I'm just trying to point out > that, well, this is not an accidental omission, but a deliberate design > decision. For the reasons for it you'll have to ask the people who did > it - this particular text seems to have been added by Garrett Wollman > back in 2002, but I think that he was just documenting the status quo > rather than making a decision right there and then. Thanks for pointing that out, I didn't notice that comment. Anyway, I found the commit that introduces this comment: http://svnweb.freebsd.org/base/head/include/stdlib.h?annotate=3D103728 Unfortunately, commit message doesn't provide reasoning about that. I've CCed wollman@. Roman Bogorodskiy --DKU6Jbt7q3WqK7+M Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJTHz9RAAoJEMltX/4IwiJqMD4H/3OAYTN66KEgNPwuf80sHkKl CJoxt5XQL8Xd4ub7tJhxoCi8mrcosB/gNkuTuFu07uVGDTCyyZdVd1eSBi/yxerX qpjULaM2T1r80bgXFUz/2lODe6uj//itMkCIJjyju/iWuXHXz5DteHsXEizdE3Dy 1AERZCNOMo1eF1L8VcI+AbW2MS+NRj8VmFddeUP3ZGOVYa+i2f55CYdRrIruteIS 0GM76TdLphcDzRnRg6Z1lXV8s/rQwt6YPaT+QWemiUxj5Kx40zCuDmg0O3OHaURy AONkqQ0WLsKCrpKeLGHU9UMic5FSekHBRYZ+E4pgsm3E5YkLUAB063OnO4ACq1w= =DjlU -----END PGP SIGNATURE----- --DKU6Jbt7q3WqK7+M-- From owner-freebsd-standards@FreeBSD.ORG Tue Mar 11 17:30:58 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF891D67 for ; Tue, 11 Mar 2014 17:30:58 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id B3BED1C1 for ; Tue, 11 Mar 2014 17:30:58 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 347AC781E9A; Wed, 12 Mar 2014 04:30:56 +1100 (EST) Date: Wed, 12 Mar 2014 04:30:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Peter Pentchev Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) In-Reply-To: <201403111640.s2BGe1J9031029@freefall.freebsd.org> Message-ID: <20140312035904.L898@besplex.bde.org> References: <201403111640.s2BGe1J9031029@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PqKqMW83 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=ByQfNe_rhZcA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=uZvujYp8AAAA:8 a=JCwHtQ7qWEg1GrNU1p4A:9 a=D0mDy0fUJgJ3YimM:21 a=CjuIK1q_8ugA:10 a=WQLKnJ1XLdQA:10 Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 17:30:59 -0000 On Tue, 11 Mar 2014, Peter Pentchev wrote: > > >Description: > > As per this document: > >=20 > > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html > >=20 > > stdlib.h should define W* macros like WEXITSTATUS etc. However, it doesn'= > t. > > FWIW, this is even documented in FreeBSD's stdlib.h :) > > /* XXX XSI requires pollution from here. We'd rather not. */ > > Yes, I know this doesn't help you much; I'm just trying to point out > that, well, this is not an accidental omission, but a deliberate design > decision. For the reasons for it you'll have to ask the people who did > it - this particular text seems to have been added by Garrett Wollman > back in 2002, but I think that he was just documenting the status quo > rather than making a decision right there and then. This was a bug in XSI. You can't even use these macros without doing something nonstandard to get a value that they apply too. Unfortunately, the infestation has now spread to POSIX itself -- this is now shaded CX instead of XSI in the above URL. The infestation has also spread to the nested includes. In the 2001 version: 11720 XSI Inclusion of the header may also make visible all symbols from , 11721 , , and . This is now shaded CX. It bug is still a "may", so is not required. Applications cannot depend on it, so they must include for themself if they want to use a function like wait() to get values that the WEXITSTATUS, etc., macros apply to. The POSIX CX and XSI markup is much more readable than the ifdefs in the C source code, even when when it is misrendered by at least text browsers. It allows a sorted linear list of functions, while the C source code is grouped to create XSI and BSD sections that become increasingly unreadable as they grow internal ifdef tangles. The C ifdefs are inherently more complicated since they need version numbers for the standards. glibc uses a differently organization that makes stdlib.h several times larger and more than several times more unreadable. Bruce From owner-freebsd-standards@FreeBSD.ORG Tue Mar 11 18:20:02 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57236558 for ; Tue, 11 Mar 2014 18:20:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 444D4BBB for ; Tue, 11 Mar 2014 18:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2BIK16l061753 for ; Tue, 11 Mar 2014 18:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2BIK1uV061723; Tue, 11 Mar 2014 18:20:01 GMT (envelope-from gnats) Date: Tue, 11 Mar 2014 18:20:01 GMT Message-Id: <201403111820.s2BIK1uV061723@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Garrett Wollman Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Garrett Wollman List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 18:20:02 -0000 The following reply was made to PR standards/187378; it has been noted by GNATS. From: Garrett Wollman To: Roman Bogorodskiy Cc: bug-followup@freebsd.org Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) Date: Tue, 11 Mar 2014 14:15:41 -0400 < said: > Peter Pentchev wrote: >> > stdlib.h should define W* macros like WEXITSTATUS etc. However, it doesn't. >> >> FWIW, this is even documented in FreeBSD's stdlib.h :) >> >> /* XXX XSI requires pollution from here. We'd rather not. */ >> >> Yes, I know this doesn't help you much; I'm just trying to point out >> that, well, this is not an accidental omission, but a deliberate design >> decision. For the reasons for it you'll have to ask the people who did >> it - this particular text seems to have been added by Garrett Wollman >> back in 2002, but I think that he was just documenting the status quo >> rather than making a decision right there and then. In IEEE Std.1003.1-2001 (SUSv6), those macros were marked as XSI extensions. FreeBSD does not claim to implement XSI (which mostly memorializes old System V mistakes that the vendors who control The Open Group were unwilling to give up on). In IEEE Std.1003.1-2008 (SUSv7), they are marked CX (mandatory C extensions) instead. The change history is unhelpful; I've sent a query to the Austin Group list asking if anyone can recall why this change was made. -GAWollman From owner-freebsd-standards@FreeBSD.ORG Tue Mar 11 18:24:27 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 334F86D4 for ; Tue, 11 Mar 2014 18:24:27 +0000 (UTC) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [IPv6:2001:470:8b2d:1e1c:21b:21ff:feb8:d7b0]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 017B8C77 for ; Tue, 11 Mar 2014 18:24:26 +0000 (UTC) Received: from khavrinen.csail.mit.edu (localhost [127.0.0.1]) by khavrinen.csail.mit.edu (8.14.7/8.14.7) with ESMTP id s2BIOOFb043510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL CN=khavrinen.csail.mit.edu issuer=Client+20CA); Tue, 11 Mar 2014 14:24:25 -0400 (EDT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.14.7/8.14.7/Submit) id s2BIOOVX043507; Tue, 11 Mar 2014 14:24:24 -0400 (EDT) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21279.21720.764577.196253@khavrinen.csail.mit.edu> Date: Tue, 11 Mar 2014 14:24:24 -0400 From: Garrett Wollman To: Bruce Evans Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) In-Reply-To: <20140312035904.L898@besplex.bde.org> References: <201403111640.s2BGe1J9031029@freefall.freebsd.org> <20140312035904.L898@besplex.bde.org> X-Mailer: VM 7.17 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (khavrinen.csail.mit.edu [127.0.0.1]); Tue, 11 Mar 2014 14:24:25 -0400 (EDT) Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 18:24:27 -0000 < said: > This was a bug in XSI. You can't even use these macros without doing > something nonstandard to get a value that they apply too. > Unfortunately, the infestation has now spread to POSIX itself -- this is > now shaded CX instead of XSI in the above URL. See RETURN VALUE for system() at XSHv7 page 2069: If command is not a null pointer, system ( ) shall return the termination status of the command language interpreter in the format specified by waitpid ( ). The termination status shall be as defined for the sh utility; otherwise, the termination status is unspecified. If some error prevents the command language interpreter from executing after the child process is created, the return value from system ( ) shall be as if the command language interpreter had terminated using exit(127) or _exit(127). If a child process cannot be created, or if the termination status for the command language interpreter cannot be obtained, system ( ) shall return -1 and set errno to indicate the error. This paragraph is also shaded CX, not XSI, and was CX in XSHv6 (at p. 1474). -GAWollman From owner-freebsd-standards@FreeBSD.ORG Tue Mar 11 20:57:58 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 528253A7; Tue, 11 Mar 2014 20:57:58 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id F092162; Tue, 11 Mar 2014 20:57:57 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 79FD3D450CE; Wed, 12 Mar 2014 07:57:50 +1100 (EST) Date: Wed, 12 Mar 2014 07:57:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: standards@freebsd.org Subject: Re: Signal 0 on FreeBSD 10 In-Reply-To: <20140312054619.Y1320@besplex.bde.org> Message-ID: <20140312071019.R1629@besplex.bde.org> References: <99EC19A9-E8FE-49F7-9A4A-17D275036E8A@langille.org> <20140311020944.GW1746@glenbarber.us> <21279.7837.935822.615182@hergotha.csail.mit.edu> <20140312054619.Y1320@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PqKqMW83 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=ZJADz0W7IUu3IAA_cOoA:9 a=CjuIK1q_8ugA:10 Cc: Robert Watson , Dan Langille , Garrett Wollman X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 20:57:58 -0000 [List changed from developers to standards] On Wed, 12 Mar 2014, Bruce Evans wrote: > Some wording from POSIX.1-2001-draft7: > > % 3543 DESCRIPTION > % 3544 CX The functionality described on this reference page is > aligned with the ISO C standard. Any > % 3545 conflict between the requirements described here and the > ISO C standard is unintentional. This > % 3546 volume of IEEE Std 1003.1-200x defers to the ISO C > standard. > > Since the specification for fclose()ing conflicts, this paragraph voids the > specification for fclose()ing. > > % 3547 The abort( ) function shall cause abnormal process > termination to occur, unless the signal > % 3548 SIGABRT is being caught and the signal handler does not > return. > > Strangely, POSIX turns off the requirement for abort() to fclose() in the > one case where C99 allows it to work. Perhaps I am reading something > backwards. > > % 3549 CX The abnormal termination processing shall include at > least the effect of fclose( ) on all open > % 3550 streams and the default actions defined for SIGABRT. > % 3551 XSI On XSI-conformant systems, in addition the abnormal > termination processing shall include the > % 3552 effect of fclose( ) on message catalog descriptors. > > The part that specifies undefined behaviour. It is only undefined when > abort() is called from a signal handler other than after certain voluntary > signals, of course. > > Perhaps this is fixed in newer versions of POSIX, but it is impossible to > fix the historical mistake of fclose()ing in signal handlers. All that > can be required is to attempt to do safe parts of fclose() on streams > which can be safely located by the implementation. An average > implementation can barely locate stderr safely, but doesn't know that > this is safe so it can't do anything. This is indeed sort of fixed in newer versions. The changes are even documented in the changes section. - abort() is now in the async-signal-safe list - "shall include at least the effect of fclose( )" is changed to "_may_ include an _attempt_ to effect fclose( )". - the extras for XSI are removed (they were null because message catalogs are read-only) So the historical behaviour is permitted (except for undefined behaviour in it), but it is fully optional so applications can no longer depend on the implementation making best efforts to do it. The fflush() in FreeBSD was new in 4.4BSD. It was not in FreeBSD-1. So it is perhaps not too late to remove it. % --- /c/src1/lib/libc/stdlib/abort.c Sun Jun 13 00:56:10 1993 % +++ /usr/src/lib/libc/stdlib/abort.c Sat Aug 23 14:16:03 2003 % @@ -1,5 +1,5 @@ % /* % - * Copyright (c) 1985 Regents of the University of California. % - * All rights reserved. % + * Copyright (c) 1985, 1993 % + * The Regents of the University of California. All rights reserved. % * % * Redistribution and use in source and binary forms, with or without % @@ -33,33 +33,51 @@ % % #if defined(LIBC_SCCS) && !defined(lint) % -static char sccsid[] = "@(#)abort.c 5.11 (Berkeley) 2/23/91"; % +static char sccsid[] = "@(#)abort.c 8.1 (Berkeley) 6/4/93"; % #endif /* LIBC_SCCS and not lint */ % +#include % +__FBSDID("$FreeBSD: src/lib/libc/stdlib/abort.c,v 1.9 2003/08/16 11:43:57 davidxu Exp $"); % % -#include % +#include "namespace.h" % +#include % #include % #include % #include % +#include % +#include "un-namespace.h" % + % +void (*__cleanup)(); % % void % abort() % { % - sigset_t mask; % + struct sigaction act; % + % + /* % + * POSIX requires we flush stdio buffers on abort. % + * XXX ISO C requires that abort() be async-signal-safe. % + */ % + if (__cleanup) % + (*__cleanup)(); POSIX mistakes here. % % - sigfillset(&mask); % + sigfillset(&act.sa_mask); % /* % - * don't block SIGABRT to give any handler a chance; we ignore % - * any errors -- X311J doesn't allow abort to return anyway. % + * Don't block SIGABRT to give any handler a chance; we ignore % + * any errors -- ISO C doesn't allow abort to return anyway. % */ % - sigdelset(&mask, SIGABRT); % - (void)sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL); % - (void)kill(getpid(), SIGABRT); % + sigdelset(&act.sa_mask, SIGABRT); % + (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); % + (void)raise(SIGABRT); % % /* % - * if SIGABRT ignored, or caught and the handler returns, do % + * If SIGABRT was ignored, or caught and the handler returns, do % * it again, only harder. % */ % - (void)signal(SIGABRT, SIG_DFL); % - (void)sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL); % - (void)kill(getpid(), SIGABRT); % + act.sa_handler = SIG_DFL; % + act.sa_flags = 0; % + sigfillset(&act.sa_mask); % + (void)_sigaction(SIGABRT, &act, NULL); % + sigdelset(&act.sa_mask, SIGABRT); % + (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); % + (void)raise(SIGABRT); % exit(1); % } One of the URLs pointed to by eadler points out that the threaded case might be less async-signal-safe than the non-threaded case, since threading probably needs locks which may deadlock. So the above __cleanup call is now less safe than when it was added, since there was no threaded case then but there is now. I don't really understand locking in stdio. fflush() locks the file, and some places use sflush_locked(), but __cleanup uses unlocked __sflush(). This uses of __sflush() predates the existence of locking. Perhaps it was left unlocked to avoid deadlock. I think it just ignores locks, and thus is broken even for non-async signal handling, not to mention other uses like non-async calls to exit(), since it races with other threads then. The POSIX list has reports of interesting deadlocks instead of races near exit() when everything uses locks. In the threaded case, even exiting is difficult, since exit() may block forever on locks held by other threads. Apparently it is necessary to make all the other threads terminate cleanly before exiting. Just killing them doesn't work since it might leave locks held. Terminating the other threads cleanly in abort() so that its fclose()ing doesn't block is even harder, but abort() has the advantage() that its fclose()s are optional. It should skip the locked streams. Bruce From owner-freebsd-standards@FreeBSD.ORG Tue Mar 11 21:08:35 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EC09E2E for ; Tue, 11 Mar 2014 21:08:35 +0000 (UTC) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D775205 for ; Tue, 11 Mar 2014 21:08:34 +0000 (UTC) Received: by mail-pb0-f52.google.com with SMTP id rr13so93407pbb.39 for ; Tue, 11 Mar 2014 14:08:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=DjavJDgZr9AZJqFuLNE5hl9FyCKjp05PMjE47ozrID0=; b=Og46Jwe0rNS+66C97MMZgiqItn720wUlDwOGgp2lHVCo/+AxQxEZNE5I4sz8sDYvrE /aUSON4bnZK0Mnm2v3wojcn5BVrrKZrivR6HPZtLcdOcphaNGS7Bo5oFgr2O8XwHjFqg oQObpArpQSOhb0ClEYG2JMtY4uWBptKjZnH1pgrvY6b54FoxJP9OR7OijDFUeVdN3Zr0 hlKphT5zdGKue9qiGML/4wUTQezz3+Zat2MwGvgvQdeUGYHLO8950wD+zBnUmzDOl2Lg 8pv4jSgjtruEtUEcqaGpfnJmNxJSdP/HnPWE++m3lOTAdBN5J4cTyb61RwWJiONUerkr jI5A== X-Gm-Message-State: ALoCoQkUpHE3qujisYMKB2smsagpatO5vuCAu7ED4dj91QP/IlHahJsb9uTf2r1mLt4T4Pop/ezn X-Received: by 10.68.113.68 with SMTP id iw4mr328103pbb.119.1394572114176; Tue, 11 Mar 2014 14:08:34 -0700 (PDT) Received: from [10.64.26.205] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id fk4sm1283245pab.23.2014.03.11.14.08.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Mar 2014 14:08:33 -0700 (PDT) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: Signal 0 on FreeBSD 10 From: Warner Losh In-Reply-To: <20140312071019.R1629@besplex.bde.org> Date: Tue, 11 Mar 2014 15:08:30 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <983E5513-B5E7-4035-957E-CFF3C901129B@bsdimp.com> References: <99EC19A9-E8FE-49F7-9A4A-17D275036E8A@langille.org> <20140311020944.GW1746@glenbarber.us> <21279.7837.935822.615182@hergotha.csail.mit.edu> <20140312054619.Y1320@besplex.bde.org> <20140312071019.R1629@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1874) Cc: standards@freebsd.org, Robert Watson , Dan Langille , Garrett Wollman X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2014 21:08:35 -0000 On Mar 11, 2014, at 2:57 PM, Bruce Evans wrote: > POSIX mistakes here. I=92ve often thought that if I ever make a band, it will be called =93The = POSIX Mistakes=94 Warner From owner-freebsd-standards@FreeBSD.ORG Mon Mar 17 11:06:54 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC7EAADE for ; Mon, 17 Mar 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D921A2A9 for ; Mon, 17 Mar 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2HB6rn2011413 for ; Mon, 17 Mar 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2HB6rTj011411 for freebsd-standards@FreeBSD.org; Mon, 17 Mar 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 17 Mar 2014 11:06:53 GMT Message-Id: <201403171106.s2HB6rTj011411@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2014 11:06:54 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/187378 standards stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 48 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Mar 24 11:06:53 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E80AB189 for ; Mon, 24 Mar 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D46C4186 for ; Mon, 24 Mar 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2OB6qpr013999 for ; Mon, 24 Mar 2014 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2OB6q9X013997 for freebsd-standards@FreeBSD.org; Mon, 24 Mar 2014 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 24 Mar 2014 11:06:52 GMT Message-Id: <201403241106.s2OB6q9X013997@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/187378 standards stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 48 problems total. From owner-freebsd-standards@FreeBSD.ORG Fri Mar 28 22:30:00 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF7ADEED for ; Fri, 28 Mar 2014 22:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 8BDA7D64 for ; Fri, 28 Mar 2014 22:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SMU0Pb029803 for ; Fri, 28 Mar 2014 22:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2SMU0dM029802; Fri, 28 Mar 2014 22:30:00 GMT (envelope-from gnats) Resent-Date: Fri, 28 Mar 2014 22:30:00 GMT Resent-Message-Id: <201403282230.s2SMU0dM029802@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tomohisa Tanaka Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93D82B50 for ; Fri, 28 Mar 2014 22:21:18 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66B62C88 for ; Fri, 28 Mar 2014 22:21:18 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2SMLIwr030827 for ; Fri, 28 Mar 2014 22:21:18 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2SMLIHv030818; Fri, 28 Mar 2014 22:21:18 GMT (envelope-from nobody) Message-Id: <201403282221.s2SMLIHv030818@cgiserv.freebsd.org> Date: Fri, 28 Mar 2014 22:21:18 GMT From: Tomohisa Tanaka To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 22:30:00 -0000 >Number: 188036 >Category: standards >Synopsis: mblen(3) in EUC locales causes crash and segmentation fault. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 28 22:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Tomohisa Tanaka >Release: FreeBSD 9.2-RELEASE-p3 >Organization: >Environment: FreeBSD freebsd9 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0: Sat Jan 11 03:25:02 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Calling function mblen(3) in EUC locales results in crash and segmentation fault. To repeat the problem, both setlocale(3) and uselocale(3) must be called before calling mblen(3). I think it is because the value of _CurrentRuneLocale->__variable in /usr/src/lib/libc/locale/euc.c is always NULL after calling both setlocale(3) and uselocale(3). >How-To-Repeat: % cat main.c #include #include #include #include int main(void) { printf("setlocale: %s\n", setlocale(LC_ALL, "")); locale_t newLocale = newlocale(LC_ALL_MASK, "C", NULL); locale_t oldLocale = uselocale(newLocale); /* ... */ uselocale(oldLocale); printf("%d\n", mblen("a", 1)); return 0; } % gcc -g3 -std=c99 main.c % setenv LC_MESSAGES C % env LANG=zh_CN.eucCN ./a.out setlocale: zh_CN.eucCN/zh_CN.eucCN/zh_CN.eucCN/zh_CN.eucCN/zh_CN.eucCN/C Segmentation fault (core dumped) % env LANG=ko_KR.eucKR ./a.out setlocale: ko_KR.eucKR/ko_KR.eucKR/ko_KR.eucKR/ko_KR.eucKR/ko_KR.eucKR/C Segmentation fault (core dumped) % env LANG=ja_JP.eucJP ./a.out setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C Segmentation fault (core dumped) % env LANG=ja_JP.UTF-8 ./a.out setlocale: ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/C 1 >Fix: diff -ur /usr/src/lib/libc/locale/euc.c locale/euc.c --- /usr/src/lib/libc/locale/euc.c 2013-09-27 10:07:50.000000000 +0900 +++ locale/euc.c 2014-03-29 06:16:10.000000000 +0900 @@ -134,7 +134,8 @@ return (ps == NULL || ((const _EucState *)ps)->want == 0); } -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) +#define CEI \ + ((_EucInfo *)(XLOCALE_CTYPE(__get_locale())->runes->__variable)) #define _SS2 0x008e #define _SS3 0x008f Patch attached with submission follows: diff -ur /usr/src/lib/libc/locale/euc.c locale/euc.c --- /usr/src/lib/libc/locale/euc.c 2013-09-27 10:07:50.000000000 +0900 +++ locale/euc.c 2014-03-29 06:16:10.000000000 +0900 @@ -134,7 +134,8 @@ return (ps == NULL || ((const _EucState *)ps)->want == 0); } -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) +#define CEI \ + ((_EucInfo *)(XLOCALE_CTYPE(__get_locale())->runes->__variable)) #define _SS2 0x008e #define _SS3 0x008f >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Mon Mar 31 09:10:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99207777 for ; Mon, 31 Mar 2014 09:10:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 83DB3EA0 for ; Mon, 31 Mar 2014 09:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V9A1mi019859 for ; Mon, 31 Mar 2014 09:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2V9A1Nt019858; Mon, 31 Mar 2014 09:10:01 GMT (envelope-from gnats) Date: Mon, 31 Mar 2014 09:10:01 GMT Message-Id: <201403310910.s2V9A1Nt019858@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: David Chisnall Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: David Chisnall List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 09:10:01 -0000 The following reply was made to PR standards/188036; it has been noted by GNATS. From: David Chisnall To: Tomohisa Tanaka Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. Date: Mon, 31 Mar 2014 10:03:57 +0100 On 28 Mar 2014, at 22:21, Tomohisa Tanaka = wrote: >=20 >> Number: 188036 >> Category: standards >> Synopsis: mblen(3) in EUC locales causes crash and segmentation = fault. >> Confidential: no >> Severity: non-critical >> Priority: low >> Responsible: freebsd-standards >> State: open >> Quarter: =20 >> Keywords: =20 >> Date-Required: >> Class: sw-bug >> Submitter-Id: current-users >> Arrival-Date: Fri Mar 28 22:30:00 UTC 2014 >> Closed-Date: >> Last-Modified: >> Originator: Tomohisa Tanaka >> Release: FreeBSD 9.2-RELEASE-p3 >> Organization: >> Environment: > FreeBSD freebsd9 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0: Sat Jan 11 = 03:25:02 UTC 2014 = root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >> Description: > Calling function mblen(3) in EUC locales results in crash and > segmentation fault. To repeat the problem, both setlocale(3) and > uselocale(3) must be called before calling mblen(3). >=20 > I think it is because the value of _CurrentRuneLocale->__variable in > /usr/src/lib/libc/locale/euc.c is always NULL after calling both > setlocale(3) and uselocale(3). >=20 >> How-To-Repeat: > % cat main.c > #include > #include > #include > #include >=20 > int > main(void) > { > printf("setlocale: %s\n", setlocale(LC_ALL, "")); >=20 > locale_t newLocale =3D newlocale(LC_ALL_MASK, "C", NULL); > locale_t oldLocale =3D uselocale(newLocale); > /* ... */ > uselocale(oldLocale); >=20 > printf("%d\n", mblen("a", 1)); > return 0; > } > % gcc -g3 -std=3Dc99 main.c > % setenv LC_MESSAGES C > % env LANG=3Dzh_CN.eucCN ./a.out > setlocale: = zh_CN.eucCN/zh_CN.eucCN/zh_CN.eucCN/zh_CN.eucCN/zh_CN.eucCN/C > Segmentation fault (core dumped) > % env LANG=3Dko_KR.eucKR ./a.out > setlocale: = ko_KR.eucKR/ko_KR.eucKR/ko_KR.eucKR/ko_KR.eucKR/ko_KR.eucKR/C > Segmentation fault (core dumped) > % env LANG=3Dja_JP.eucJP ./a.out > setlocale: = ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C > Segmentation fault (core dumped) > % env LANG=3Dja_JP.UTF-8 ./a.out > setlocale: = ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/ja_JP.UTF-8/C > 1 >=20 >> Fix: > diff -ur /usr/src/lib/libc/locale/euc.c locale/euc.c > --- /usr/src/lib/libc/locale/euc.c 2013-09-27 10:07:50.000000000 = +0900 > +++ locale/euc.c 2014-03-29 06:16:10.000000000 +0900 > @@ -134,7 +134,8 @@ > return (ps =3D=3D NULL || ((const _EucState *)ps)->want =3D=3D = 0); > } >=20 > -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) > +#define CEI \ > + ((_EucInfo *)(XLOCALE_CTYPE(__get_locale())->runes->__variable)) >=20 > #define _SS2 0x008e > #define _SS3 0x008f >=20 >=20 >=20 > Patch attached with submission follows: >=20 > diff -ur /usr/src/lib/libc/locale/euc.c locale/euc.c > --- /usr/src/lib/libc/locale/euc.c 2013-09-27 10:07:50.000000000 = +0900 > +++ locale/euc.c 2014-03-29 06:16:10.000000000 +0900 > @@ -134,7 +134,8 @@ > return (ps =3D=3D NULL || ((const _EucState *)ps)->want =3D=3D = 0); > } >=20 > -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) > +#define CEI \ > + ((_EucInfo *)(XLOCALE_CTYPE(__get_locale())->runes->__variable)) >=20 > #define _SS2 0x008e > #define _SS3 0x008f I think the fix should actually be: Index: locale/euc.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 --- locale/euc.c (revision 263226) +++ locale/euc.c (working copy) @@ -134,7 +134,7 @@ return (ps =3D=3D NULL || ((const _EucState *)ps)->want =3D=3D = 0); } =20 -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) +#define CEI ((_EucInfo = *)(__getCurrentRuneLocale()->__variable)) =20 #define _SS2 0x008e #define _SS3 0x008f Please can you test this and let me know if it fixes it for you? David= From owner-freebsd-standards@FreeBSD.ORG Mon Mar 31 10:00:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80F86264 for ; Mon, 31 Mar 2014 10:00:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 6BD92398 for ; Mon, 31 Mar 2014 10:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2VA01qt035235 for ; Mon, 31 Mar 2014 10:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2VA01OB035234; Mon, 31 Mar 2014 10:00:01 GMT (envelope-from gnats) Date: Mon, 31 Mar 2014 10:00:01 GMT Message-Id: <201403311000.s2VA01OB035234@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: David Chisnall Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: David Chisnall List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 10:00:01 -0000 The following reply was made to PR standards/188036; it has been noted by GNATS. From: David Chisnall To: Tomohisa Tanaka Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. Date: Mon, 31 Mar 2014 10:57:01 +0100 On 31 Mar 2014, at 10:03, David Chisnall wrote: > I think the fix should actually be: >=20 > Index: locale/euc.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 > --- locale/euc.c (revision 263226) > +++ locale/euc.c (working copy) > @@ -134,7 +134,7 @@ > return (ps =3D=3D NULL || ((const _EucState *)ps)->want =3D=3D = 0); > } >=20 > -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) > +#define CEI ((_EucInfo = *)(__getCurrentRuneLocale()->__variable)) >=20 > #define _SS2 0x008e > #define _SS3 0x008f >=20 >=20 >=20 > Please can you test this and let me know if it fixes it for you? Actually, I'm not sure how this bug can manifest, unless you've somehow = built libc with the wrong headers. In runtype.h (which is included in = euc.c), we have this: #define _CurrentRuneLocale (__getCurrentRuneLocale()) So these two versions should expand to the same thing. =20 David From owner-freebsd-standards@FreeBSD.ORG Mon Mar 31 11:06:52 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ED7BB77 for ; Mon, 31 Mar 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 EFDD6BAD for ; Mon, 31 Mar 2014 11:06:51 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2VB6pCO058837 for ; Mon, 31 Mar 2014 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2VB6pBF058835 for freebsd-standards@FreeBSD.org; Mon, 31 Mar 2014 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 31 Mar 2014 11:06:51 GMT Message-Id: <201403311106.s2VB6pBF058835@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 11:06:52 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 49 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Mar 31 16:10:03 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 767AADB4 for ; Mon, 31 Mar 2014 16:10:03 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 5F6342B1 for ; Mon, 31 Mar 2014 16:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2VGA3Aa055671 for ; Mon, 31 Mar 2014 16:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2VGA3E1055670; Mon, 31 Mar 2014 16:10:03 GMT (envelope-from gnats) Date: Mon, 31 Mar 2014 16:10:03 GMT Message-Id: <201403311610.s2VGA3E1055670@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Tomohisa Tanaka Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Tomohisa Tanaka List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 16:10:03 -0000 The following reply was made to PR standards/188036; it has been noted by GNATS. From: Tomohisa Tanaka To: David Chisnall Cc: freebsd-gnats-submit@freebsd.org Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. Date: Tue, 1 Apr 2014 01:01:46 +0900 --20cf303f672e1e5ef404f5e92be2 Content-Type: multipart/alternative; boundary=20cf303f672e1e5ef004f5e92be0 --20cf303f672e1e5ef004f5e92be0 Content-Type: text/plain; charset=ISO-8859-1 Thank you for your quick reply. Please can you test this and let me know if it fixes it for you? Yes, but it does not work for me as follows: % gcc -g3 main.c ~/work/freebsd-usr-src/lib/libc/libc.a % gdb ./a.out GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) run Starting program: /usr/home/syl/work/mblen/a.out setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C Program received signal SIGSEGV, Segmentation fault. 0x000000000041823b in _EUC_mbrtowc (pwc=0x0, s=0x4321b2 "a", n=1, ps=0x63f318) at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182 182 want = CEI->count[set = _euc_set(*s)]; (gdb) bt #0 0x000000000041823b in _EUC_mbrtowc (pwc=0x0, s=0x4321b2 "a", n=1, ps=0x63f318) at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182 #1 0x0000000000406def in mblen_l (s=0x4321b2 "a", n=1, locale=0x63f260) at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51 #2 0x0000000000406e95 in mblen (s=0x4321b2 "a", n=1) at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60 #3 0x0000000000406bb6 in main () at main.c:16 (gdb) Actually, I'm not sure how this bug can manifest, unless you've somehow > built libc with the wrong headers. In runtype.h (which is included in > euc.c), we have this: > #define _CurrentRuneLocale (__getCurrentRuneLocale()) > So these two versions should expand to the same thing. (Your fix causes the same thing for me, so you're right.) The libc that I used for How-To-Repeat is not built by me (installed by installer). % setenv LC_MESSAGES C % env LANG=ja_JP.eucJP ./a.out setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C Segmentation fault (core dumped) % ldd ./a.out ./a.out: libc.so.7 => /lib/libc.so.7 (0x80081a000) % env LANG=C ls -l /lib/libc.so.7 -r--r--r-- 1 root wheel 1406888 Sep 27 2013 /lib/libc.so.7 % md5 /lib/libc.so.7 MD5 (/lib/libc.so.7) = d997dd201ec08270e17383223fd2c40a (I verified /lib/libc.so.7 is not changed from http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz) I'm sorry, I had not understood this issue enough to make a patch.I show another sample as follows: % cat main1.c #include #include #include #include #include static void showVariables(void) { printf("_ThreadRuneLocale: %p\n", _ThreadRuneLocale); if (_ThreadRuneLocale != NULL) { printf("_ThreadRuneLocale->__variable: %p\n", _ThreadRuneLocale->__variable); } printf("__getCurrentRuneLocale(): %p\n", __getCurrentRuneLocale()); if (__getCurrentRuneLocale() != NULL) { printf("__getCurrentRuneLocale()->__variable: %p\n", __getCurrentRuneLocale()->__variable); } printf("&_DefaultRuneLocale: %p\n", &_DefaultRuneLocale); printf("&_DefaultRuneLocale->__variable: %p\n", (&_DefaultRuneLocale)->__variable); } int main(void) { printf("setlocale: %s\n", setlocale(LC_ALL, "")); printf("[0]\n"); showVariables(); locale_t newLocale = newlocale(LC_ALL_MASK, "C", NULL); locale_t oldLocale = uselocale(newLocale); /* ... */ printf("[1]\n"); showVariables(); uselocale(oldLocale); printf("[2]\n"); showVariables(); printf("%d\n", mblen("a", 1)); return 0; } % gcc -g3 main1.c % gdb ./a.out GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) run Starting program: /usr/home/syl/work/mblen/a.out setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C [0] _ThreadRuneLocale: 0x0 __getCurrentRuneLocale(): 0x800d0c000 __getCurrentRuneLocale()->__variable: 0x800c07040 &_DefaultRuneLocale: 0x600ee0 &_DefaultRuneLocale->__variable: 0x0 [1] _ThreadRuneLocale: 0x600ee0 _ThreadRuneLocale->__variable: 0x0 __getCurrentRuneLocale(): 0x600ee0 __getCurrentRuneLocale()->__variable: 0x0 &_DefaultRuneLocale: 0x600ee0 &_DefaultRuneLocale->__variable: 0x0 [2] _ThreadRuneLocale: 0x600ee0 _ThreadRuneLocale->__variable: 0x0 __getCurrentRuneLocale(): 0x600ee0 __getCurrentRuneLocale()->__variable: 0x0 &_DefaultRuneLocale: 0x600ee0 &_DefaultRuneLocale->__variable: 0x0 Program received signal SIGSEGV, Segmentation fault. 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7 (gdb) After calling 'uselocale(oldLocale)' [2], _ThreadRuneLocale should not be 0x600ee0.It is strange that the states [1] and [2] are the same. (I hope this helps.) If I can help you in any other way, please let me know. 2014-03-31 18:57 GMT+09:00 David Chisnall : > On 31 Mar 2014, at 10:03, David Chisnall wrote: > > > I think the fix should actually be: > > > > Index: locale/euc.c > > =================================================================== > > --- locale/euc.c (revision 263226) > > +++ locale/euc.c (working copy) > > @@ -134,7 +134,7 @@ > > return (ps == NULL || ((const _EucState *)ps)->want == 0); > > } > > > > -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) > > +#define CEI ((_EucInfo > *)(__getCurrentRuneLocale()->__variable)) > > > > #define _SS2 0x008e > > #define _SS3 0x008f > > > > > > > > Please can you test this and let me know if it fixes it for you? > > Actually, I'm not sure how this bug can manifest, unless you've somehow > built libc with the wrong headers. In runtype.h (which is included in > euc.c), we have this: > > #define _CurrentRuneLocale (__getCurrentRuneLocale()) > > So these two versions should expand to the same thing. > > David > > -- Tomohisa Tanaka Tomohisa.Tanaka@gmail.com --20cf303f672e1e5ef004f5e92be0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you for your quick reply.

= Please can you test this and let me know if it fixes it for you?
Yes, but it does not work for me as follows:
% gcc -g3 main.c ~/work/=
 freebsd-usr-src/lib/libc/libc.a=20
 % gdb ./a.out=20
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you ar=
 e
 welcome to change it and/or distribute copies of it under certain condition=
 s.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" fo=
 r details.
 This GDB was configured as "amd64-marcel-freebsd"...
 (gdb) run
 Starting program: /usr/home/syl/work/mblen/a.out=20
 setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
 
 Program received signal SIGSEGV, Segmentation fault.
 0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2 "a", =
 n=3D1, ps=3D0x63f318)
     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
 182                     want =3D CEI->count[set =3D _euc_set(*s)];
 (gdb) bt
 #0  0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2 "a&quo=
 t;, n=3D1,=20
     ps=3D0x63f318)
     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
 #1  0x0000000000406def in mblen_l (s=3D0x4321b2 "a", n=3D1, local=
 e=3D0x63f260)
     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51
 #2  0x0000000000406e95 in mblen (s=3D0x4321b2 "a", n=3D1)
     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60
 #3  0x0000000000406bb6 in main () at main.c:16
 (gdb) 

Actually, I'm not sure how this bug ca= n manifest, unless you've somehow built libc with the wrong headers. = =A0In runtype.h (which is included in euc.c), we have this:
#define _CurrentRuneLocale (__getCurrentRuneLocale())
So these two versi= ons should expand to the same thing.

(Your = fix causes the same thing for me, so you're right.)
The libc = that I used for How-To-Repeat is not built by me (installed by installer).<= /div>
%=
  setenv LC_MESSAGES C
 % env LANG=3Dja_JP.eucJP ./a.out
 setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
 Segmentation fault (core dumped)
 % ldd ./a.out
 ./a.out:
         libc.so.7 =3D> /lib/libc.so.7 (0x80081a000)
 % env LANG=3DC ls -l /lib/libc.so.7=20
 -r--r--r--  1 root  wheel  1406888 Sep 27  2013 /lib/libc.so.7
 % md5 /lib/libc.so.7
 MD5 (/lib/libc.so.7) =3D d997dd201ec08270e17383223fd2c40a
(I verified /lib/libc.so.7 is not changed from
http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz= ) I'm sorry, I had not understood this issue enough to make a patch. I show another sample as follows:
 % cat main1.c
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
 #include <xlocale.h>
 #include <runetype.h>
 
 static void
 showVariables(void)
 {
   printf("_ThreadRuneLocale: %p\n", _ThreadRuneLocale);
   if (_ThreadRuneLocale !=3D NULL) {
     printf("_ThreadRuneLocale->__variable: %p\n",
            _ThreadRuneLocale->__variable);
   }
   printf("__getCurrentRuneLocale(): %p\n", __getCurrentRuneLocale=
 ());
   if (__getCurrentRuneLocale() !=3D NULL) {
     printf("__getCurrentRuneLocale()->__variable: %p\n",
            __getCurrentRuneLocale()->__variable);
   }
   printf("&_DefaultRuneLocale: %p\n", &_DefaultRuneLocale=
 );
   printf("&_DefaultRuneLocale->__variable: %p\n",
          (&_DefaultRuneLocale)->__variable);
 }
 
 int
 main(void)
 {
   printf("setlocale: %s\n", setlocale(LC_ALL, ""));
 
   printf("[0]\n");
   showVariables();
 
   locale_t newLocale =3D newlocale(LC_ALL_MASK, "C", NULL);
   locale_t oldLocale =3D uselocale(newLocale);
   /* ... */
 
   printf("[1]\n");
   showVariables();
 
   uselocale(oldLocale);
 
   printf("[2]\n");
   showVariables();
 
   printf("%d\n", mblen("a", 1));
   return 0;
 }
 % gcc -g3 main1.c
 % gdb ./a.out
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you ar=
 e
 welcome to change it and/or distribute copies of it under certain condition=
 s.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" fo=
 r details.
 This GDB was configured as "amd64-marcel-freebsd"...
 (gdb) run
 Starting program: /usr/home/syl/work/mblen/a.out=20
 setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
 [0]
 _ThreadRuneLocale: 0x0
 __getCurrentRuneLocale(): 0x800d0c000
 __getCurrentRuneLocale()->__variable: 0x800c07040
 &_DefaultRuneLocale: 0x600ee0
 &_DefaultRuneLocale->__variable: 0x0
 [1]
 _ThreadRuneLocale: 0x600ee0
 _ThreadRuneLocale->__variable: 0x0
 __getCurrentRuneLocale(): 0x600ee0
 __getCurrentRuneLocale()->__variable: 0x0
 &_DefaultRuneLocale: 0x600ee0
 &_DefaultRuneLocale->__variable: 0x0
 [2]
 _ThreadRuneLocale: 0x600ee0
 _ThreadRuneLocale->__variable: 0x0
 __getCurrentRuneLocale(): 0x600ee0
 __getCurrentRuneLocale()->__variable: 0x0
 &_DefaultRuneLocale: 0x600ee0
 &_DefaultRuneLocale->__variable: 0x0
 
 Program received signal SIGSEGV, Segmentation fault.
 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7
 (gdb)  
After calling 'uselocal=
 e(oldLocale)' [2], _ThreadRuneLocale should not be 0x600ee0.
 It is strange that the states [1] and [2] are the sa=
 me. (I hope this helps.)
 If I can help you in any other way, please let =
 me know.


2014-03-31 18:57 GMT+09:00 David Chisnall &l= t;theraven@freebs= d.org>:
On 31 Mar 2014, at 10:03, Da= vid Chisnall <theraven@FreeBSD.org> wrote:

> I think the fix should actually be:
>
> Index: locale/euc.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
> --- locale/euc.c =A0 =A0 =A0(revision 263226)
> +++ locale/euc.c =A0 =A0 =A0(working copy)
> @@ -134,7 +134,7 @@
> =A0 =A0 =A0 return (ps =3D=3D NULL || ((const _EucState *)ps)->want= =3D=3D 0);
> }
>
> -#define =A0 =A0 =A0CEI =A0 =A0 ((_EucInfo *)(_CurrentRuneLocale->_= _variable))
> +#define =A0 =A0 =A0CEI =A0 =A0 ((_EucInfo *)(__getCurrentRuneLocale()= ->__variable))
>
> #define =A0 =A0 =A0 _SS2 =A0 =A00x008e
> #define =A0 =A0 =A0 _SS3 =A0 =A00x008f
>
>
>
> Please can you test this and let me know if it fixes it for you?

Actually, I'm not sure how this bug can manifest, unless you'= ve somehow built libc with the wrong headers. =A0In runtype.h (which is inc= luded in euc.c), we have this:

#define _CurrentRuneLocale (__getCurrentRuneLocale())

So these two versions should expand to the same thing.

David




-- Tomohisa Tanaka
Tomohisa.= Tanaka@gmail.com
--20cf303f672e1e5ef004f5e92be0-- --20cf303f672e1e5ef404f5e92be2 Content-Type: text/plain; charset=US-ASCII; name="report1.txt" Content-Disposition: attachment; filename="report1.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_htfxye6m0 JSBnY2MgLWczIG1haW4uYyB+L3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xpYmMuYQol IGdkYiAuL2Eub3V0CkdOVSBnZGIgNi4xLjEgW0ZyZWVCU0RdCkNvcHlyaWdodCAyMDA0IEZyZWUg U29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgpHREIgaXMgZnJlZSBzb2Z0d2FyZSwgY292ZXJlZCBi eSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB5b3UgYXJlCndlbGNvbWUgdG8g Y2hhbmdlIGl0IGFuZC9vciBkaXN0cmlidXRlIGNvcGllcyBvZiBpdCB1bmRlciBjZXJ0YWluIGNv bmRpdGlvbnMuClR5cGUgInNob3cgY29weWluZyIgdG8gc2VlIHRoZSBjb25kaXRpb25zLgpUaGVy ZSBpcyBhYnNvbHV0ZWx5IG5vIHdhcnJhbnR5IGZvciBHREIuICBUeXBlICJzaG93IHdhcnJhbnR5 IiBmb3IgZGV0YWlscy4KVGhpcyBHREIgd2FzIGNvbmZpZ3VyZWQgYXMgImFtZDY0LW1hcmNlbC1m cmVlYnNkIi4uLgooZ2RiKSBydW4KU3RhcnRpbmcgcHJvZ3JhbTogL3Vzci9ob21lL3N5bC93b3Jr L21ibGVuL2Eub3V0IApzZXRsb2NhbGU6IGphX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL2phX0pQLmV1 Y0pQL2phX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL0MKClByb2dyYW0gcmVjZWl2ZWQgc2lnbmFsIFNJ R1NFR1YsIFNlZ21lbnRhdGlvbiBmYXVsdC4KMHgwMDAwMDAwMDAwNDE4MjNiIGluIF9FVUNfbWJy dG93YyAocHdjPTB4MCwgcz0weDQzMjFiMiAiYSIsIG49MSwgcHM9MHg2M2YzMTgpCiAgICBhdCAv dXNyL2hvbWUvc3lsL3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xvY2FsZS9ldWMuYzox ODIKMTgyICAgICAgICAgICAgICAgICAgICAgd2FudCA9IENFSS0+Y291bnRbc2V0ID0gX2V1Y19z ZXQoKnMpXTsKKGdkYikgCg== --20cf303f672e1e5ef404f5e92be2 Content-Type: text/plain; charset=US-ASCII; name="report2.txt" Content-Disposition: attachment; filename="report2.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_htfxyj7g1 JSBjYXQgbWFpbjEuYwojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5j bHVkZSA8bG9jYWxlLmg+CiNpbmNsdWRlIDx4bG9jYWxlLmg+CiNpbmNsdWRlIDxydW5ldHlwZS5o PgoKc3RhdGljIHZvaWQKc2hvd1ZhcmlhYmxlcyh2b2lkKQp7CiAgcHJpbnRmKCJfVGhyZWFkUnVu ZUxvY2FsZTogJXBcbiIsIF9UaHJlYWRSdW5lTG9jYWxlKTsKICBpZiAoX1RocmVhZFJ1bmVMb2Nh bGUgIT0gTlVMTCkgewogICAgcHJpbnRmKCJfVGhyZWFkUnVuZUxvY2FsZS0+X192YXJpYWJsZTog JXBcbiIsCiAgICAgICAgICAgX1RocmVhZFJ1bmVMb2NhbGUtPl9fdmFyaWFibGUpOwogIH0KICBw cmludGYoIl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTogJXBcbiIsIF9fZ2V0Q3VycmVudFJ1bmVM b2NhbGUoKSk7CiAgaWYgKF9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKSAhPSBOVUxMKSB7CiAgICBw cmludGYoIl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKS0+X192YXJpYWJsZTogJXBcbiIsCiAgICAg ICAgICAgX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlKTsKICB9CiAgcHJpbnRm KCImX0RlZmF1bHRSdW5lTG9jYWxlOiAlcFxuIiwgJl9EZWZhdWx0UnVuZUxvY2FsZSk7CiAgcHJp bnRmKCImX0RlZmF1bHRSdW5lTG9jYWxlLT5fX3ZhcmlhYmxlOiAlcFxuIiwKICAgICAgICAgKCZf RGVmYXVsdFJ1bmVMb2NhbGUpLT5fX3ZhcmlhYmxlKTsKfQoKaW50Cm1haW4odm9pZCkKewogIHBy aW50Zigic2V0bG9jYWxlOiAlc1xuIiwgc2V0bG9jYWxlKExDX0FMTCwgIiIpKTsKCiAgcHJpbnRm KCJbMF1cbiIpOwogIHNob3dWYXJpYWJsZXMoKTsKCiAgbG9jYWxlX3QgbmV3TG9jYWxlID0gbmV3 bG9jYWxlKExDX0FMTF9NQVNLLCAiQyIsIE5VTEwpOwogIGxvY2FsZV90IG9sZExvY2FsZSA9IHVz ZWxvY2FsZShuZXdMb2NhbGUpOwogIC8qIC4uLiAqLwoKICBwcmludGYoIlsxXVxuIik7CiAgc2hv d1ZhcmlhYmxlcygpOwoKICB1c2Vsb2NhbGUob2xkTG9jYWxlKTsKCiAgcHJpbnRmKCJbMl1cbiIp OwogIHNob3dWYXJpYWJsZXMoKTsKCiAgcHJpbnRmKCIlZFxuIiwgbWJsZW4oImEiLCAxKSk7CiAg cmV0dXJuIDA7Cn0KJSBnY2MgLWczIG1haW4xLmMKJSBnZGIgLi9hLm91dApHTlUgZ2RiIDYuMS4x IFtGcmVlQlNEXQpDb3B5cmlnaHQgMjAwNCBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4K R0RCIGlzIGZyZWUgc29mdHdhcmUsIGNvdmVyZWQgYnkgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBM aWNlbnNlLCBhbmQgeW91IGFyZQp3ZWxjb21lIHRvIGNoYW5nZSBpdCBhbmQvb3IgZGlzdHJpYnV0 ZSBjb3BpZXMgb2YgaXQgdW5kZXIgY2VydGFpbiBjb25kaXRpb25zLgpUeXBlICJzaG93IGNvcHlp bmciIHRvIHNlZSB0aGUgY29uZGl0aW9ucy4KVGhlcmUgaXMgYWJzb2x1dGVseSBubyB3YXJyYW50 eSBmb3IgR0RCLiAgVHlwZSAic2hvdyB3YXJyYW50eSIgZm9yIGRldGFpbHMuClRoaXMgR0RCIHdh cyBjb25maWd1cmVkIGFzICJhbWQ2NC1tYXJjZWwtZnJlZWJzZCIuLi4KKGdkYikgcnVuClN0YXJ0 aW5nIHByb2dyYW06IC91c3IvaG9tZS9zeWwvd29yay9tYmxlbi9hLm91dCAKc2V0bG9jYWxlOiBq YV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNK UC9DClswXQpfVGhyZWFkUnVuZUxvY2FsZTogMHgwCl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTog MHg4MDBkMGMwMDAKX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlOiAweDgwMGMw NzA0MAomX0RlZmF1bHRSdW5lTG9jYWxlOiAweDYwMGVlMAomX0RlZmF1bHRSdW5lTG9jYWxlLT5f X3ZhcmlhYmxlOiAweDAKWzFdCl9UaHJlYWRSdW5lTG9jYWxlOiAweDYwMGVlMApfVGhyZWFkUnVu ZUxvY2FsZS0+X192YXJpYWJsZTogMHgwCl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTogMHg2MDBl ZTAKX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlOiAweDAKJl9EZWZhdWx0UnVu ZUxvY2FsZTogMHg2MDBlZTAKJl9EZWZhdWx0UnVuZUxvY2FsZS0+X192YXJpYWJsZTogMHgwClsy XQpfVGhyZWFkUnVuZUxvY2FsZTogMHg2MDBlZTAKX1RocmVhZFJ1bmVMb2NhbGUtPl9fdmFyaWFi bGU6IDB4MApfX2dldEN1cnJlbnRSdW5lTG9jYWxlKCk6IDB4NjAwZWUwCl9fZ2V0Q3VycmVudFJ1 bmVMb2NhbGUoKS0+X192YXJpYWJsZTogMHgwCiZfRGVmYXVsdFJ1bmVMb2NhbGU6IDB4NjAwZWUw CiZfRGVmYXVsdFJ1bmVMb2NhbGUtPl9fdmFyaWFibGU6IDB4MAoKUHJvZ3JhbSByZWNlaXZlZCBz aWduYWwgU0lHU0VHViwgU2VnbWVudGF0aW9uIGZhdWx0LgoweDAwMDAwMDA4MDA5MDg4ODAgaW4g bWJzbnJ0b3djcyAoKSBmcm9tIC9saWIvbGliYy5zby43CihnZGIpIAo= --20cf303f672e1e5ef404f5e92be2-- From owner-freebsd-standards@FreeBSD.ORG Tue Apr 1 15:40:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E52AE6D for ; Tue, 1 Apr 2014 15:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 E5757683 for ; Tue, 1 Apr 2014 15:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s31Fe0Kv022792 for ; Tue, 1 Apr 2014 15:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s31Fe0rD022781; Tue, 1 Apr 2014 15:40:00 GMT (envelope-from gnats) Resent-Date: Tue, 1 Apr 2014 15:40:00 GMT Resent-Message-Id: <201404011540.s31Fe0rD022781@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christian Neukirchen Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAE0D94E for ; Tue, 1 Apr 2014 15:31:31 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7E08393 for ; Tue, 1 Apr 2014 15:31:31 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s31FVVIT008910 for ; Tue, 1 Apr 2014 15:31:31 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s31FVVNR008903; Tue, 1 Apr 2014 15:31:31 GMT (envelope-from nobody) Message-Id: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> Date: Tue, 1 Apr 2014 15:31:31 GMT From: Christian Neukirchen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 15:40:01 -0000 >Number: 188173 >Category: standards >Synopsis: O_NOFOLLOW visibility not POSIX 2008 conforming >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 01 15:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Christian Neukirchen >Release: 10.0-RELEASE >Organization: >Environment: FreeBSD mneme.vuxu.org 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The macro O_NOFOLLOW is not defined when _XOPEN_SOURCE is set, but it should be defined with _XOPEN_SOURCE=700 since X/Open 7 incorporates POSIX 2008, which defines O_NOFOLLOW, cf. http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html >How-To-Repeat: By default, O_NOFOLLOW is defined: % cc -E - < O_NOFOLLOW EOF 0x0100 But with correct _XOPEN_SOURCE, it is not: % cc -D_XOPEN_SOURCE=700 -E - < O_NOFOLLOW EOF O_NOFOLLOW >Fix: Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= 200809 #if __BSD_VISIBLE #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ #endif >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Wed Apr 2 11:11:52 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DB4C610 for ; Wed, 2 Apr 2014 11:11:52 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "theravensnest.org", Issuer "theravensnest.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DC72BF2E for ; Wed, 2 Apr 2014 11:11:48 +0000 (UTC) Received: from [192.168.0.100] (cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.7) with ESMTP id s32BBi9p054943 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 2 Apr 2014 11:11:46 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. From: David Chisnall In-Reply-To: <201403311610.s2VGA3E1055670@freefall.freebsd.org> Date: Wed, 2 Apr 2014 12:11:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <205C5DD1-C26B-4F6A-B640-C78E22D0567B@FreeBSD.org> References: <201403311610.s2VGA3E1055670@freefall.freebsd.org> To: Tomohisa Tanaka X-Mailer: Apple Mail (2.1874) Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 11:11:52 -0000 I think this is an issue when uselocale() is called with -1 as the = argument. setlocale() for an EUC locale works correctly, as does = newlocale()/uselocale(). However, in your test program, you go from an = explicit per-thread locale to a generic one and uselocale is not = correctly clearing the per-thread cache. This should be fixed in r264038, thank you for such a detailed report! = The test case was very helpful in diagnosing and fixing the problem. David On 31 Mar 2014, at 17:10, Tomohisa Tanaka = wrote: > The following reply was made to PR standards/188036; it has been noted = by GNATS. >=20 > From: Tomohisa Tanaka > To: David Chisnall > Cc: freebsd-gnats-submit@freebsd.org > Subject: Re: standards/188036: mblen(3) in EUC locales causes crash = and > segmentation fault. > Date: Tue, 1 Apr 2014 01:01:46 +0900 >=20 > --20cf303f672e1e5ef404f5e92be2 > Content-Type: multipart/alternative; = boundary=3D20cf303f672e1e5ef004f5e92be0 >=20 > --20cf303f672e1e5ef004f5e92be0 > Content-Type: text/plain; charset=3DISO-8859-1 >=20 > Thank you for your quick reply. >=20 > Please can you test this and let me know if it fixes it for you? >=20 >=20 > Yes, but it does not work for me as follows: >=20 > % gcc -g3 main.c ~/work/freebsd-usr-src/lib/libc/libc.a > % gdb ./a.out > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and = you are > welcome to change it and/or distribute copies of it under certain = conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for = details. > This GDB was configured as "amd64-marcel-freebsd"... > (gdb) run > Starting program: /usr/home/syl/work/mblen/a.out > setlocale: = ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C >=20 > Program received signal SIGSEGV, Segmentation fault. > 0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2 "a", n=3D1, = ps=3D0x63f318) > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182 > 182 want =3D CEI->count[set =3D _euc_set(*s)]; > (gdb) bt > #0 0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2 "a", = n=3D1, > ps=3D0x63f318) > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182 > #1 0x0000000000406def in mblen_l (s=3D0x4321b2 "a", n=3D1, = locale=3D0x63f260) > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51 > #2 0x0000000000406e95 in mblen (s=3D0x4321b2 "a", n=3D1) > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60 > #3 0x0000000000406bb6 in main () at main.c:16 > (gdb) >=20 >=20 > Actually, I'm not sure how this bug can manifest, unless you've = somehow >> built libc with the wrong headers. In runtype.h (which is included = in >> euc.c), we have this: >> #define _CurrentRuneLocale (__getCurrentRuneLocale()) >> So these two versions should expand to the same thing. >=20 >=20 > (Your fix causes the same thing for me, so you're right.) > The libc that I used for How-To-Repeat is not built by me (installed = by > installer). >=20 > % setenv LC_MESSAGES C > % env LANG=3Dja_JP.eucJP ./a.out > setlocale: = ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C > Segmentation fault (core dumped) > % ldd ./a.out > ./a.out: > libc.so.7 =3D> /lib/libc.so.7 (0x80081a000) > % env LANG=3DC ls -l /lib/libc.so.7 > -r--r--r-- 1 root wheel 1406888 Sep 27 2013 /lib/libc.so.7 > % md5 /lib/libc.so.7 > MD5 (/lib/libc.so.7) =3D d997dd201ec08270e17383223fd2c40a >=20 > (I verified /lib/libc.so.7 is not changed from > = http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz) > I'm sorry, I had not understood this issue enough to make a patch.I > show another sample as follows: >=20 > % cat main1.c > #include > #include > #include > #include > #include >=20 > static void > showVariables(void) > { > printf("_ThreadRuneLocale: %p\n", _ThreadRuneLocale); > if (_ThreadRuneLocale !=3D NULL) { > printf("_ThreadRuneLocale->__variable: %p\n", > _ThreadRuneLocale->__variable); > } > printf("__getCurrentRuneLocale(): %p\n", __getCurrentRuneLocale()); > if (__getCurrentRuneLocale() !=3D NULL) { > printf("__getCurrentRuneLocale()->__variable: %p\n", > __getCurrentRuneLocale()->__variable); > } > printf("&_DefaultRuneLocale: %p\n", &_DefaultRuneLocale); > printf("&_DefaultRuneLocale->__variable: %p\n", > (&_DefaultRuneLocale)->__variable); > } >=20 > int > main(void) > { > printf("setlocale: %s\n", setlocale(LC_ALL, "")); >=20 > printf("[0]\n"); > showVariables(); >=20 > locale_t newLocale =3D newlocale(LC_ALL_MASK, "C", NULL); > locale_t oldLocale =3D uselocale(newLocale); > /* ... */ >=20 > printf("[1]\n"); > showVariables(); >=20 > uselocale(oldLocale); >=20 > printf("[2]\n"); > showVariables(); >=20 > printf("%d\n", mblen("a", 1)); > return 0; > } > % gcc -g3 main1.c > % gdb ./a.out > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and = you are > welcome to change it and/or distribute copies of it under certain = conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for = details. > This GDB was configured as "amd64-marcel-freebsd"... > (gdb) run > Starting program: /usr/home/syl/work/mblen/a.out > setlocale: = ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C > [0] > _ThreadRuneLocale: 0x0 > __getCurrentRuneLocale(): 0x800d0c000 > __getCurrentRuneLocale()->__variable: 0x800c07040 > &_DefaultRuneLocale: 0x600ee0 > &_DefaultRuneLocale->__variable: 0x0 > [1] > _ThreadRuneLocale: 0x600ee0 > _ThreadRuneLocale->__variable: 0x0 > __getCurrentRuneLocale(): 0x600ee0 > __getCurrentRuneLocale()->__variable: 0x0 > &_DefaultRuneLocale: 0x600ee0 > &_DefaultRuneLocale->__variable: 0x0 > [2] > _ThreadRuneLocale: 0x600ee0 > _ThreadRuneLocale->__variable: 0x0 > __getCurrentRuneLocale(): 0x600ee0 > __getCurrentRuneLocale()->__variable: 0x0 > &_DefaultRuneLocale: 0x600ee0 > &_DefaultRuneLocale->__variable: 0x0 >=20 > Program received signal SIGSEGV, Segmentation fault. > 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7 > (gdb) >=20 > After calling 'uselocale(oldLocale)' [2], _ThreadRuneLocale should not > be 0x600ee0.It is strange that the states [1] and [2] are the same. (I > hope this helps.) >=20 > If I can help you in any other way, please let me know. >=20 >=20 >=20 > 2014-03-31 18:57 GMT+09:00 David Chisnall : >=20 >> On 31 Mar 2014, at 10:03, David Chisnall = wrote: >>=20 >>> I think the fix should actually be: >>>=20 >>> Index: locale/euc.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 >>> --- locale/euc.c (revision 263226) >>> +++ locale/euc.c (working copy) >>> @@ -134,7 +134,7 @@ >>> return (ps =3D=3D NULL || ((const _EucState *)ps)->want =3D=3D = 0); >>> } >>>=20 >>> -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) >>> +#define CEI ((_EucInfo >> *)(__getCurrentRuneLocale()->__variable)) >>>=20 >>> #define _SS2 0x008e >>> #define _SS3 0x008f >>>=20 >>>=20 >>>=20 >>> Please can you test this and let me know if it fixes it for you? >>=20 >> Actually, I'm not sure how this bug can manifest, unless you've = somehow >> built libc with the wrong headers. In runtype.h (which is included = in >> euc.c), we have this: >>=20 >> #define _CurrentRuneLocale (__getCurrentRuneLocale()) >>=20 >> So these two versions should expand to the same thing. >>=20 >> David >>=20 >>=20 >=20 >=20 > --=20 > Tomohisa Tanaka > Tomohisa.Tanaka@gmail.com >=20 > --20cf303f672e1e5ef004f5e92be0 > Content-Type: text/html; charset=3DISO-8859-1 > Content-Transfer-Encoding: quoted-printable >=20 >
Thank you for your quick reply.

=3D3D"gmail_quote" style=3D3D"margin:0px 0px 0px = 0.8ex;border-left-width:1px;bo=3D > = rder-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"= >=3D > Please can you test this and let me know if it fixes it for = you? e> >
Yes, but it does not work for me as follows:
 (0,0,0);word-wrap:break-word;white-space:pre-wrap">% gcc -g3 main.c =
~/work/=3D
> freebsd-usr-src/lib/libc/libc.a=3D20
> % gdb ./a.out=3D20
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and =
you ar=3D
> e
> welcome to change it and/or distribute copies of it under certain =
condition=3D
> s.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show =
warranty" fo=3D
> r details.
> This GDB was configured as "amd64-marcel-freebsd"...
> (gdb) run
> Starting program: /usr/home/syl/work/mblen/a.out=3D20
> setlocale: =
ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
>=20
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000041823b in _EUC_mbrtowc (pwc=3D3D0x0, s=3D3D0x4321b2 =
"a", =3D
> n=3D3D1, ps=3D3D0x63f318)
>     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> 182                     want =3D3D CEI->count[set =3D3D =
_euc_set(*s)];
> (gdb) bt
> #0  0x000000000041823b in _EUC_mbrtowc (pwc=3D3D0x0, s=3D3D0x4321b2 =
"a&quo=3D
> t;, n=3D3D1,=3D20
>     ps=3D3D0x63f318)
>     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> #1  0x0000000000406def in mblen_l (s=3D3D0x4321b2 "a", =
n=3D3D1, local=3D
> e=3D3D0x63f260)
>     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51
> #2  0x0000000000406e95 in mblen (s=3D3D0x4321b2 "a", n=3D3D1)
>     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60
> #3  0x0000000000406bb6 in main () at main.c:16
> (gdb) 

px = 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-le=3D= > ft-style:solid;padding-left:1ex">Actually, I'm not sure how this = bug ca=3D > n manifest, unless you've somehow built libc with the wrong = headers. =3D > =3DA0In runtype.h (which is included in euc.c), we have this:
> #define _CurrentRuneLocale (__getCurrentRuneLocale())
So these two = versi=3D > ons should expand to the same = thing.

(Your =3D > fix causes the same thing for me, so you're right.)
The = libc =3D > that I used for How-To-Repeat is not built by me (installed by = installer).<=3D > /div> >
%=3D=

>  setenv LC_MESSAGES C
> % env LANG=3D3Dja_JP.eucJP ./a.out
> setlocale: =
ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> Segmentation fault (core dumped)
> % ldd ./a.out
> ./a.out:
>         libc.so.7 =3D3D> /lib/libc.so.7 (0x80081a000)
> % env LANG=3D3DC ls -l /lib/libc.so.7=3D20
> -r--r--r--  1 root  wheel  1406888 Sep 27  2013 /lib/libc.so.7
> % md5 /lib/libc.so.7
> MD5 (/lib/libc.so.7) =3D3D d997dd201ec08270e17383223fd2c40a
 =3D3D"word-wrap:break-word"> ormal">(I verified /lib/libc.so.7 is not changed =
from
n style=3D3D"color:rgb(0,0,0);font-family:arial;white-space:pre-wrap"> = =3D3D"http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.t= xz"=3D >> = http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz= =3D > ) > ap"> > I'm sorry, I had not understood this issue enough to make a patch. > ap">I show another sample as follows:
 reak-word">
 pre-wrap">
> % cat main1.c
> #include <stdio.h>
> #include <stdlib.h>
> #include <locale.h>
> #include <xlocale.h>
> #include <runetype.h>
>=20
> static void
> showVariables(void)
> {
>   printf("_ThreadRuneLocale: %p\n", _ThreadRuneLocale);
>   if (_ThreadRuneLocale !=3D3D NULL) {
>     printf("_ThreadRuneLocale->__variable: %p\n",
>            _ThreadRuneLocale->__variable);
>   }
>   printf("__getCurrentRuneLocale(): %p\n", =
__getCurrentRuneLocale=3D
> ());
>   if (__getCurrentRuneLocale() !=3D3D NULL) {
>     printf("__getCurrentRuneLocale()->__variable: %p\n",
>            __getCurrentRuneLocale()->__variable);
>   }
>   printf("&_DefaultRuneLocale: %p\n", =
&_DefaultRuneLocale=3D
> );
>   printf("&_DefaultRuneLocale->__variable: %p\n",
>          (&_DefaultRuneLocale)->__variable);
> }
>=20
> int
> main(void)
> {
>   printf("setlocale: %s\n", setlocale(LC_ALL, =
""));
>=20
>   printf("[0]\n");
>   showVariables();
>=20
>   locale_t newLocale =3D3D newlocale(LC_ALL_MASK, "C", =
NULL);
>   locale_t oldLocale =3D3D uselocale(newLocale);
>   /* ... */
>=20
>   printf("[1]\n");
>   showVariables();
>=20
>   uselocale(oldLocale);
>=20
>   printf("[2]\n");
>   showVariables();
>=20
>   printf("%d\n", mblen("a", 1));
>   return 0;
> }
> % gcc -g3 main1.c
> % gdb ./a.out
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and =
you ar=3D
> e
> welcome to change it and/or distribute copies of it under certain =
condition=3D
> s.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show =
warranty" fo=3D
> r details.
> This GDB was configured as "amd64-marcel-freebsd"...
> (gdb) run
> Starting program: /usr/home/syl/work/mblen/a.out=3D20
> setlocale: =
ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> [0]
> _ThreadRuneLocale: 0x0
> __getCurrentRuneLocale(): 0x800d0c000
> __getCurrentRuneLocale()->__variable: 0x800c07040
> &_DefaultRuneLocale: 0x600ee0
> &_DefaultRuneLocale->__variable: 0x0
> [1]
> _ThreadRuneLocale: 0x600ee0
> _ThreadRuneLocale->__variable: 0x0
> __getCurrentRuneLocale(): 0x600ee0
> __getCurrentRuneLocale()->__variable: 0x0
> &_DefaultRuneLocale: 0x600ee0
> &_DefaultRuneLocale->__variable: 0x0
> [2]
> _ThreadRuneLocale: 0x600ee0
> _ThreadRuneLocale->__variable: 0x0
> __getCurrentRuneLocale(): 0x600ee0
> __getCurrentRuneLocale()->__variable: 0x0
> &_DefaultRuneLocale: 0x600ee0
> &_DefaultRuneLocale->__variable: 0x0
>=20
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7
> (gdb)  
 ap:break-word">
 ce:pre-wrap;color:rgb(0,0,0);font-family:arial">After calling =
'uselocal=3D
> e(oldLocale)' [2], _ThreadRuneLocale  pre-wrap;color:rgb(0,0,0);font-family:arial">should not be 0x600ee0.
>  "white-space:pre-wrap">It is strange that the states [1] and [2] are =
the sa=3D
> me. (I hope this helps.)
 break-word">
>  \00ff2d\00ff33 \00ff30 =
\0030b4\0030b7\0030c3\0030af',sans-serif;font-si=3D
> ze:13px;white-space:normal">If I can help you in any other way, please =
let =3D
> me know.
>
 ">


gmail_quote">2014-03-31 18:57 GMT+09:00 David Chisnall &l=3D > t;theraven@freebs=3D > d.org>:
>
x #ccc solid;padding-left:1ex">
On 31 Mar 2014, at = 10:03, Da=3D > vid Chisnall <theraven@FreeBSD.org> wrote:
>
> > I think the fix should actually be:
> >
> > Index: locale/euc.c
> > = =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3= D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D > = =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3= D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D= 3D=3D3D=3D3D=3D3D=3D3D
> > --- locale/euc.c =3DA0 =3DA0 =3DA0(revision 263226)
> > +++ locale/euc.c =3DA0 =3DA0 =3DA0(working copy)
> > @@ -134,7 +134,7 @@
> > =3DA0 =3DA0 =3DA0 return (ps =3D3D=3D3D NULL || ((const _EucState = *)ps)->want=3D > =3D3D=3D3D 0);
> > }
> >
> > -#define =3DA0 =3DA0 =3DA0CEI =3DA0 =3DA0 ((_EucInfo = *)(_CurrentRuneLocale->_=3D > _variable))
> > +#define =3DA0 =3DA0 =3DA0CEI =3DA0 =3DA0 ((_EucInfo = *)(__getCurrentRuneLocale()=3D > ->__variable))
> >
> > #define =3DA0 =3DA0 =3DA0 _SS2 =3DA0 =3DA00x008e
> > #define =3DA0 =3DA0 =3DA0 _SS3 =3DA0 =3DA00x008f
> >
> >
> >
> > Please can you test this and let me know if it fixes it for = you?
>
>
Actually, I'm not sure how this bug can manifest, unless = you'=3D > ve somehow built libc with the wrong headers. =3DA0In runtype.h (which = is inc=3D > luded in euc.c), we have this:
>
> #define _CurrentRuneLocale (__getCurrentRuneLocale())
>
> So these two versions should expand to the same thing.
>
> David
>
>



-- r>Tomohisa Tanaka
Tomohisa.=3D > Tanaka@gmail.com >
>=20 > --20cf303f672e1e5ef004f5e92be0-- > --20cf303f672e1e5ef404f5e92be2 > Content-Type: text/plain; charset=3DUS-ASCII; name=3D"report1.txt" > Content-Disposition: attachment; filename=3D"report1.txt" > Content-Transfer-Encoding: base64 > X-Attachment-Id: f_htfxye6m0 >=20 > = JSBnY2MgLWczIG1haW4uYyB+L3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xpYmMuYQ= ol > = IGdkYiAuL2Eub3V0CkdOVSBnZGIgNi4xLjEgW0ZyZWVCU0RdCkNvcHlyaWdodCAyMDA0IEZyZW= Ug > = U29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgpHREIgaXMgZnJlZSBzb2Z0d2FyZSwgY292ZXJlZC= Bi > = eSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB5b3UgYXJlCndlbGNvbWUgdG= 8g > = Y2hhbmdlIGl0IGFuZC9vciBkaXN0cmlidXRlIGNvcGllcyBvZiBpdCB1bmRlciBjZXJ0YWluIG= Nv > = bmRpdGlvbnMuClR5cGUgInNob3cgY29weWluZyIgdG8gc2VlIHRoZSBjb25kaXRpb25zLgpUaG= Vy > = ZSBpcyBhYnNvbHV0ZWx5IG5vIHdhcnJhbnR5IGZvciBHREIuICBUeXBlICJzaG93IHdhcnJhbn= R5 > = IiBmb3IgZGV0YWlscy4KVGhpcyBHREIgd2FzIGNvbmZpZ3VyZWQgYXMgImFtZDY0LW1hcmNlbC= 1m > = cmVlYnNkIi4uLgooZ2RiKSBydW4KU3RhcnRpbmcgcHJvZ3JhbTogL3Vzci9ob21lL3N5bC93b3= Jr > = L21ibGVuL2Eub3V0IApzZXRsb2NhbGU6IGphX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL2phX0pQLm= V1 > = Y0pQL2phX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL0MKClByb2dyYW0gcmVjZWl2ZWQgc2lnbmFsIF= NJ > = R1NFR1YsIFNlZ21lbnRhdGlvbiBmYXVsdC4KMHgwMDAwMDAwMDAwNDE4MjNiIGluIF9FVUNfbW= Jy > = dG93YyAocHdjPTB4MCwgcz0weDQzMjFiMiAiYSIsIG49MSwgcHM9MHg2M2YzMTgpCiAgICBhdC= Av > = dXNyL2hvbWUvc3lsL3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xvY2FsZS9ldWMuYz= ox > = ODIKMTgyICAgICAgICAgICAgICAgICAgICAgd2FudCA9IENFSS0+Y291bnRbc2V0ID0gX2V1Y1= 9z > ZXQoKnMpXTsKKGdkYikgCg=3D=3D > --20cf303f672e1e5ef404f5e92be2 > Content-Type: text/plain; charset=3DUS-ASCII; name=3D"report2.txt" > Content-Disposition: attachment; filename=3D"report2.txt" > Content-Transfer-Encoding: base64 > X-Attachment-Id: f_htfxyj7g1 >=20 > = JSBjYXQgbWFpbjEuYwojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW= 5j > = bHVkZSA8bG9jYWxlLmg+CiNpbmNsdWRlIDx4bG9jYWxlLmg+CiNpbmNsdWRlIDxydW5ldHlwZS= 5o > = PgoKc3RhdGljIHZvaWQKc2hvd1ZhcmlhYmxlcyh2b2lkKQp7CiAgcHJpbnRmKCJfVGhyZWFkUn= Vu > = ZUxvY2FsZTogJXBcbiIsIF9UaHJlYWRSdW5lTG9jYWxlKTsKICBpZiAoX1RocmVhZFJ1bmVMb2= Nh > = bGUgIT0gTlVMTCkgewogICAgcHJpbnRmKCJfVGhyZWFkUnVuZUxvY2FsZS0+X192YXJpYWJsZT= og > = JXBcbiIsCiAgICAgICAgICAgX1RocmVhZFJ1bmVMb2NhbGUtPl9fdmFyaWFibGUpOwogIH0KIC= Bw > = cmludGYoIl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTogJXBcbiIsIF9fZ2V0Q3VycmVudFJ1bm= VM > = b2NhbGUoKSk7CiAgaWYgKF9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKSAhPSBOVUxMKSB7CiAgIC= Bw > = cmludGYoIl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKS0+X192YXJpYWJsZTogJXBcbiIsCiAgIC= Ag > = ICAgICAgX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlKTsKICB9CiAgcHJpbn= Rm > = KCImX0RlZmF1bHRSdW5lTG9jYWxlOiAlcFxuIiwgJl9EZWZhdWx0UnVuZUxvY2FsZSk7CiAgcH= Jp > = bnRmKCImX0RlZmF1bHRSdW5lTG9jYWxlLT5fX3ZhcmlhYmxlOiAlcFxuIiwKICAgICAgICAgKC= Zf > = RGVmYXVsdFJ1bmVMb2NhbGUpLT5fX3ZhcmlhYmxlKTsKfQoKaW50Cm1haW4odm9pZCkKewogIH= By > = aW50Zigic2V0bG9jYWxlOiAlc1xuIiwgc2V0bG9jYWxlKExDX0FMTCwgIiIpKTsKCiAgcHJpbn= Rm > = KCJbMF1cbiIpOwogIHNob3dWYXJpYWJsZXMoKTsKCiAgbG9jYWxlX3QgbmV3TG9jYWxlID0gbm= V3 > = bG9jYWxlKExDX0FMTF9NQVNLLCAiQyIsIE5VTEwpOwogIGxvY2FsZV90IG9sZExvY2FsZSA9IH= Vz > = ZWxvY2FsZShuZXdMb2NhbGUpOwogIC8qIC4uLiAqLwoKICBwcmludGYoIlsxXVxuIik7CiAgc2= hv > = d1ZhcmlhYmxlcygpOwoKICB1c2Vsb2NhbGUob2xkTG9jYWxlKTsKCiAgcHJpbnRmKCJbMl1cbi= Ip > = OwogIHNob3dWYXJpYWJsZXMoKTsKCiAgcHJpbnRmKCIlZFxuIiwgbWJsZW4oImEiLCAxKSk7Ci= Ag > = cmV0dXJuIDA7Cn0KJSBnY2MgLWczIG1haW4xLmMKJSBnZGIgLi9hLm91dApHTlUgZ2RiIDYuMS= 4x > = IFtGcmVlQlNEXQpDb3B5cmlnaHQgMjAwNCBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy= 4K > = R0RCIGlzIGZyZWUgc29mdHdhcmUsIGNvdmVyZWQgYnkgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYy= BM > = aWNlbnNlLCBhbmQgeW91IGFyZQp3ZWxjb21lIHRvIGNoYW5nZSBpdCBhbmQvb3IgZGlzdHJpYn= V0 > = ZSBjb3BpZXMgb2YgaXQgdW5kZXIgY2VydGFpbiBjb25kaXRpb25zLgpUeXBlICJzaG93IGNvcH= lp > = bmciIHRvIHNlZSB0aGUgY29uZGl0aW9ucy4KVGhlcmUgaXMgYWJzb2x1dGVseSBubyB3YXJyYW= 50 > = eSBmb3IgR0RCLiAgVHlwZSAic2hvdyB3YXJyYW50eSIgZm9yIGRldGFpbHMuClRoaXMgR0RCIH= dh > = cyBjb25maWd1cmVkIGFzICJhbWQ2NC1tYXJjZWwtZnJlZWJzZCIuLi4KKGdkYikgcnVuClN0YX= J0 > = aW5nIHByb2dyYW06IC91c3IvaG9tZS9zeWwvd29yay9tYmxlbi9hLm91dCAKc2V0bG9jYWxlOi= Bq > = YV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldW= NK > = UC9DClswXQpfVGhyZWFkUnVuZUxvY2FsZTogMHgwCl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKT= og > = MHg4MDBkMGMwMDAKX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlOiAweDgwMG= Mw > = NzA0MAomX0RlZmF1bHRSdW5lTG9jYWxlOiAweDYwMGVlMAomX0RlZmF1bHRSdW5lTG9jYWxlLT= 5f > = X3ZhcmlhYmxlOiAweDAKWzFdCl9UaHJlYWRSdW5lTG9jYWxlOiAweDYwMGVlMApfVGhyZWFkUn= Vu > = ZUxvY2FsZS0+X192YXJpYWJsZTogMHgwCl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTogMHg2MD= Bl > = ZTAKX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlOiAweDAKJl9EZWZhdWx0Un= Vu > = ZUxvY2FsZTogMHg2MDBlZTAKJl9EZWZhdWx0UnVuZUxvY2FsZS0+X192YXJpYWJsZTogMHgwCl= sy > = XQpfVGhyZWFkUnVuZUxvY2FsZTogMHg2MDBlZTAKX1RocmVhZFJ1bmVMb2NhbGUtPl9fdmFyaW= Fi > = bGU6IDB4MApfX2dldEN1cnJlbnRSdW5lTG9jYWxlKCk6IDB4NjAwZWUwCl9fZ2V0Q3VycmVudF= J1 > = bmVMb2NhbGUoKS0+X192YXJpYWJsZTogMHgwCiZfRGVmYXVsdFJ1bmVMb2NhbGU6IDB4NjAwZW= Uw > = CiZfRGVmYXVsdFJ1bmVMb2NhbGUtPl9fdmFyaWFibGU6IDB4MAoKUHJvZ3JhbSByZWNlaXZlZC= Bz > = aWduYWwgU0lHU0VHViwgU2VnbWVudGF0aW9uIGZhdWx0LgoweDAwMDAwMDA4MDA5MDg4ODAgaW= 4g > bWJzbnJ0b3djcyAoKSBmcm9tIC9saWIvbGliYy5zby43CihnZGIpIAo=3D > --20cf303f672e1e5ef404f5e92be2-- > _______________________________________________ > freebsd-standards@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-standards > To unsubscribe, send any mail to = "freebsd-standards-unsubscribe@freebsd.org" From owner-freebsd-standards@FreeBSD.ORG Wed Apr 2 18:38:15 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10A42BC9; Wed, 2 Apr 2014 18:38:15 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 D6BDB971; Wed, 2 Apr 2014 18:38:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s32IcE1j033249; Wed, 2 Apr 2014 18:38:14 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s32IcEuY033248; Wed, 2 Apr 2014 18:38:14 GMT (envelope-from linimon) Date: Wed, 2 Apr 2014 18:38:14 GMT Message-Id: <201404021838.s32IcEuY033248@freefall.freebsd.org> To: dfilter@FreeBSD.ORG, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/188197: Re: standards/188036: commit references a PR X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 18:38:15 -0000 Old Synopsis: Re: standard/188036: commit references a PR New Synopsis: Re: standards/188036: commit references a PR State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Wed Apr 2 18:37:32 UTC 2014 State-Changed-Why: Misfiled followup to standards/188036; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Wed Apr 2 18:37:32 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=188197 From owner-freebsd-standards@FreeBSD.ORG Thu Apr 3 02:28:41 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F3B6FC5; Thu, 3 Apr 2014 02:28:41 +0000 (UTC) Received: from mail-yh0-x22f.google.com (mail-yh0-x22f.google.com [IPv6:2607:f8b0:4002:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2B969F0; Thu, 3 Apr 2014 02:28:40 +0000 (UTC) Received: by mail-yh0-f47.google.com with SMTP id 29so1094917yhl.20 for ; Wed, 02 Apr 2014 19:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kJ+w0uxDhTeTqPfEZNXjS3pb9DWA64UxrHZ+tAgQCL4=; b=MinuwwQWYlWTWdXfuqSzR/HF70uw0PlzTbf2pbtz8bZFTxbVARGmwyzDtIbPCeDRv7 HjAavSFfkF1t+njegHyLloxKqda6v0YG2u6eQU3t9L7pdK7KVoe3pEoYus4Wbk7BGqQ9 VmPYqSkyAmZzqoLe/6hjx7MfeGbEkMtDaAtxdM1gdAAITDvn8biqw3JKAZ2WEHN8fzNN /ZVaeJZ4zektvn3TCK5rfvMBJo8LroNUoet/Mf7TXdBIXceta4D4JSLQsbrvlBGdmPbr IvZd5JjjYJXdTB7PfduMYEuf4A+paZ6lm/WSo4fhqp2r8PnqPZ2Qy+pbpAMEu8X3OdRD A7DA== MIME-Version: 1.0 X-Received: by 10.236.39.72 with SMTP id c48mr5165948yhb.89.1396492120063; Wed, 02 Apr 2014 19:28:40 -0700 (PDT) Received: by 10.170.197.22 with HTTP; Wed, 2 Apr 2014 19:28:39 -0700 (PDT) In-Reply-To: <205C5DD1-C26B-4F6A-B640-C78E22D0567B@FreeBSD.org> References: <201403311610.s2VGA3E1055670@freefall.freebsd.org> <205C5DD1-C26B-4F6A-B640-C78E22D0567B@FreeBSD.org> Date: Thu, 3 Apr 2014 11:28:39 +0900 Message-ID: Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and segmentation fault. From: Tomohisa Tanaka To: David Chisnall Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 02:28:41 -0000 I tried r264038 and it works for me. Thank you very much for your quick response. Tomohisa 2014-04-02 20:11 GMT+09:00 David Chisnall : > I think this is an issue when uselocale() is called with -1 as the > argument. setlocale() for an EUC locale works correctly, as does > newlocale()/uselocale(). However, in your test program, you go from an > explicit per-thread locale to a generic one and uselocale is not correctly > clearing the per-thread cache. > > This should be fixed in r264038, thank you for such a detailed report! > The test case was very helpful in diagnosing and fixing the problem. > > David > > On 31 Mar 2014, at 17:10, Tomohisa Tanaka > wrote: > > > The following reply was made to PR standards/188036; it has been noted > by GNATS. > > > > From: Tomohisa Tanaka > > To: David Chisnall > > Cc: freebsd-gnats-submit@freebsd.org > > Subject: Re: standards/188036: mblen(3) in EUC locales causes crash and > > segmentation fault. > > Date: Tue, 1 Apr 2014 01:01:46 +0900 > > > > --20cf303f672e1e5ef404f5e92be2 > > Content-Type: multipart/alternative; > boundary=20cf303f672e1e5ef004f5e92be0 > > > > --20cf303f672e1e5ef004f5e92be0 > > Content-Type: text/plain; charset=ISO-8859-1 > > > > Thank you for your quick reply. > > > > Please can you test this and let me know if it fixes it for you? > > > > > > Yes, but it does not work for me as follows: > > > > % gcc -g3 main.c ~/work/freebsd-usr-src/lib/libc/libc.a > > % gdb ./a.out > > GNU gdb 6.1.1 [FreeBSD] > > Copyright 2004 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you > are > > welcome to change it and/or distribute copies of it under certain > conditions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for > details. > > This GDB was configured as "amd64-marcel-freebsd"... > > (gdb) run > > Starting program: /usr/home/syl/work/mblen/a.out > > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x000000000041823b in _EUC_mbrtowc (pwc=0x0, s=0x4321b2 "a", n=1, > ps=0x63f318) > > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182 > > 182 want = CEI->count[set = _euc_set(*s)]; > > (gdb) bt > > #0 0x000000000041823b in _EUC_mbrtowc (pwc=0x0, s=0x4321b2 "a", n=1, > > ps=0x63f318) > > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182 > > #1 0x0000000000406def in mblen_l (s=0x4321b2 "a", n=1, locale=0x63f260) > > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51 > > #2 0x0000000000406e95 in mblen (s=0x4321b2 "a", n=1) > > at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60 > > #3 0x0000000000406bb6 in main () at main.c:16 > > (gdb) > > > > > > Actually, I'm not sure how this bug can manifest, unless you've somehow > >> built libc with the wrong headers. In runtype.h (which is included in > >> euc.c), we have this: > >> #define _CurrentRuneLocale (__getCurrentRuneLocale()) > >> So these two versions should expand to the same thing. > > > > > > (Your fix causes the same thing for me, so you're right.) > > The libc that I used for How-To-Repeat is not built by me (installed by > > installer). > > > > % setenv LC_MESSAGES C > > % env LANG=ja_JP.eucJP ./a.out > > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C > > Segmentation fault (core dumped) > > % ldd ./a.out > > ./a.out: > > libc.so.7 => /lib/libc.so.7 (0x80081a000) > > % env LANG=C ls -l /lib/libc.so.7 > > -r--r--r-- 1 root wheel 1406888 Sep 27 2013 /lib/libc.so.7 > > % md5 /lib/libc.so.7 > > MD5 (/lib/libc.so.7) = d997dd201ec08270e17383223fd2c40a > > > > (I verified /lib/libc.so.7 is not changed from > > http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz) > > I'm sorry, I had not understood this issue enough to make a patch.I > > show another sample as follows: > > > > % cat main1.c > > #include > > #include > > #include > > #include > > #include > > > > static void > > showVariables(void) > > { > > printf("_ThreadRuneLocale: %p\n", _ThreadRuneLocale); > > if (_ThreadRuneLocale != NULL) { > > printf("_ThreadRuneLocale->__variable: %p\n", > > _ThreadRuneLocale->__variable); > > } > > printf("__getCurrentRuneLocale(): %p\n", __getCurrentRuneLocale()); > > if (__getCurrentRuneLocale() != NULL) { > > printf("__getCurrentRuneLocale()->__variable: %p\n", > > __getCurrentRuneLocale()->__variable); > > } > > printf("&_DefaultRuneLocale: %p\n", &_DefaultRuneLocale); > > printf("&_DefaultRuneLocale->__variable: %p\n", > > (&_DefaultRuneLocale)->__variable); > > } > > > > int > > main(void) > > { > > printf("setlocale: %s\n", setlocale(LC_ALL, "")); > > > > printf("[0]\n"); > > showVariables(); > > > > locale_t newLocale = newlocale(LC_ALL_MASK, "C", NULL); > > locale_t oldLocale = uselocale(newLocale); > > /* ... */ > > > > printf("[1]\n"); > > showVariables(); > > > > uselocale(oldLocale); > > > > printf("[2]\n"); > > showVariables(); > > > > printf("%d\n", mblen("a", 1)); > > return 0; > > } > > % gcc -g3 main1.c > > % gdb ./a.out > > GNU gdb 6.1.1 [FreeBSD] > > Copyright 2004 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you > are > > welcome to change it and/or distribute copies of it under certain > conditions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for > details. > > This GDB was configured as "amd64-marcel-freebsd"... > > (gdb) run > > Starting program: /usr/home/syl/work/mblen/a.out > > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C > > [0] > > _ThreadRuneLocale: 0x0 > > __getCurrentRuneLocale(): 0x800d0c000 > > __getCurrentRuneLocale()->__variable: 0x800c07040 > > &_DefaultRuneLocale: 0x600ee0 > > &_DefaultRuneLocale->__variable: 0x0 > > [1] > > _ThreadRuneLocale: 0x600ee0 > > _ThreadRuneLocale->__variable: 0x0 > > __getCurrentRuneLocale(): 0x600ee0 > > __getCurrentRuneLocale()->__variable: 0x0 > > &_DefaultRuneLocale: 0x600ee0 > > &_DefaultRuneLocale->__variable: 0x0 > > [2] > > _ThreadRuneLocale: 0x600ee0 > > _ThreadRuneLocale->__variable: 0x0 > > __getCurrentRuneLocale(): 0x600ee0 > > __getCurrentRuneLocale()->__variable: 0x0 > > &_DefaultRuneLocale: 0x600ee0 > > &_DefaultRuneLocale->__variable: 0x0 > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7 > > (gdb) > > > > After calling 'uselocale(oldLocale)' [2], _ThreadRuneLocale should not > > be 0x600ee0.It is strange that the states [1] and [2] are the same. (I > > hope this helps.) > > > > If I can help you in any other way, please let me know. > > > > > > > > 2014-03-31 18:57 GMT+09:00 David Chisnall : > > > >> On 31 Mar 2014, at 10:03, David Chisnall wrote: > >> > >>> I think the fix should actually be: > >>> > >>> Index: locale/euc.c > >>> =================================================================== > >>> --- locale/euc.c (revision 263226) > >>> +++ locale/euc.c (working copy) > >>> @@ -134,7 +134,7 @@ > >>> return (ps == NULL || ((const _EucState *)ps)->want == 0); > >>> } > >>> > >>> -#define CEI ((_EucInfo *)(_CurrentRuneLocale->__variable)) > >>> +#define CEI ((_EucInfo > >> *)(__getCurrentRuneLocale()->__variable)) > >>> > >>> #define _SS2 0x008e > >>> #define _SS3 0x008f > >>> > >>> > >>> > >>> Please can you test this and let me know if it fixes it for you? > >> > >> Actually, I'm not sure how this bug can manifest, unless you've somehow > >> built libc with the wrong headers. In runtype.h (which is included in > >> euc.c), we have this: > >> > >> #define _CurrentRuneLocale (__getCurrentRuneLocale()) > >> > >> So these two versions should expand to the same thing. > >> > >> David > >> > >> > > > > > > -- > > Tomohisa Tanaka > > Tomohisa.Tanaka@gmail.com > > > > --20cf303f672e1e5ef004f5e92be0 > > Content-Type: text/html; charset=ISO-8859-1 > > Content-Transfer-Encoding: quoted-printable > > > >
Thank you for your quick reply.

class= > > =3D"gmail_quote" style=3D"margin:0px 0px 0px > 0.8ex;border-left-width:1px;bo= > > > rder-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">= > > Please can you test this and let me know if it fixes it for > you? > e> > >
Yes, but it does not work for me as follows:
 style=3D"color:rgb=
> > (0,0,0);word-wrap:break-word;white-space:pre-wrap">% gcc -g3 main.c
> ~/work/=
> > freebsd-usr-src/lib/libc/libc.a=20
> > % gdb ./a.out=20
> > GNU gdb 6.1.1 [FreeBSD]
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> ar=
> > e
> > welcome to change it and/or distribute copies of it under certain
> condition=
> > s.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty"
> fo=
> > r details.
> > This GDB was configured as "amd64-marcel-freebsd"...
> > (gdb) run
> > Starting program: /usr/home/syl/work/mblen/a.out=20
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2
> "a", =
> > n=3D1, ps=3D0x63f318)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> > 182                     want =3D CEI->count[set =3D _euc_set(*s)];
> > (gdb) bt
> > #0  0x000000000041823b in _EUC_mbrtowc (pwc=3D0x0, s=3D0x4321b2
> "a&quo=
> > t;, n=3D1,=20
> >     ps=3D0x63f318)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/euc.c:182
> > #1  0x0000000000406def in mblen_l (s=3D0x4321b2 "a", n=3D1,
> local=
> > e=3D0x63f260)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:51
> > #2  0x0000000000406e95 in mblen (s=3D0x4321b2 "a", n=3D1)
> >     at /usr/home/syl/work/freebsd-usr-src/lib/libc/locale/mblen.c:60
> > #3  0x0000000000406bb6 in main () at main.c:16
> > (gdb) 

0px 0= > > px > 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-le= > > ft-style:solid;padding-left:1ex">Actually, I'm not sure how this bug > ca= > > n manifest, unless you've somehow built libc with the wrong headers. > = > > =A0In runtype.h (which is included in euc.c), we have this:
> > #define _CurrentRuneLocale (__getCurrentRuneLocale())
So these two > versi= > > ons should expand to the same > thing.

(Your = > > fix causes the same thing for me, so you're right.)
The > libc = > > that I used for How-To-Repeat is not built by me (installed by > installer).<= > > /div> > >
 style=3D"color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">%=
> >  setenv LC_MESSAGES C
> > % env LANG=3Dja_JP.eucJP ./a.out
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> > Segmentation fault (core dumped)
> > % ldd ./a.out
> > ./a.out:
> >         libc.so.7 =3D> /lib/libc.so.7 (0x80081a000)
> > % env LANG=3DC ls -l /lib/libc.so.7=20
> > -r--r--r--  1 root  wheel  1406888 Sep 27  2013 /lib/libc.so.7
> > % md5 /lib/libc.so.7
> > MD5 (/lib/libc.so.7) =3D d997dd201ec08270e17383223fd2c40a
 style=
> > =3D"word-wrap:break-word"> style=3D"white-space:n=
> > ormal">(I verified /lib/libc.so.7 is not changed
> from
> n style=3D"color:rgb(0,0,0);font-family:arial;white-space:pre-wrap"> href= > > =3D" > http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz"= > >> http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.2-RELEASE/base.txz > = > > ) > > style=3D"color:rgb(0,0,0);font-family:arial;white-space:pre-wr= > > ap"> > > I'm sorry, I had not understood this issue enough to make a patch. > > style=3D"color:rgb(0,0,0);font-family:arial;white-space:pre-wr= > > ap">I show another sample as follows:
 style=3D"word-wrap:b=
> > reak-word">
 style=3D"color:rgb(0,0,0);word-wrap:break-word;white-space:=
> > pre-wrap">
> > % cat main1.c
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <locale.h>
> > #include <xlocale.h>
> > #include <runetype.h>
> >
> > static void
> > showVariables(void)
> > {
> >   printf("_ThreadRuneLocale: %p\n", _ThreadRuneLocale);
> >   if (_ThreadRuneLocale !=3D NULL) {
> >     printf("_ThreadRuneLocale->__variable: %p\n",
> >            _ThreadRuneLocale->__variable);
> >   }
> >   printf("__getCurrentRuneLocale(): %p\n",
> __getCurrentRuneLocale=
> > ());
> >   if (__getCurrentRuneLocale() !=3D NULL) {
> >     printf("__getCurrentRuneLocale()->__variable: %p\n",
> >            __getCurrentRuneLocale()->__variable);
> >   }
> >   printf("&_DefaultRuneLocale: %p\n",
> &_DefaultRuneLocale=
> > );
> >   printf("&_DefaultRuneLocale->__variable: %p\n",
> >          (&_DefaultRuneLocale)->__variable);
> > }
> >
> > int
> > main(void)
> > {
> >   printf("setlocale: %s\n", setlocale(LC_ALL, ""));
> >
> >   printf("[0]\n");
> >   showVariables();
> >
> >   locale_t newLocale =3D newlocale(LC_ALL_MASK, "C", NULL);
> >   locale_t oldLocale =3D uselocale(newLocale);
> >   /* ... */
> >
> >   printf("[1]\n");
> >   showVariables();
> >
> >   uselocale(oldLocale);
> >
> >   printf("[2]\n");
> >   showVariables();
> >
> >   printf("%d\n", mblen("a", 1));
> >   return 0;
> > }
> > % gcc -g3 main1.c
> > % gdb ./a.out
> > GNU gdb 6.1.1 [FreeBSD]
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> ar=
> > e
> > welcome to change it and/or distribute copies of it under certain
> condition=
> > s.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty"
> fo=
> > r details.
> > This GDB was configured as "amd64-marcel-freebsd"...
> > (gdb) run
> > Starting program: /usr/home/syl/work/mblen/a.out=20
> > setlocale: ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/ja_JP.eucJP/C
> > [0]
> > _ThreadRuneLocale: 0x0
> > __getCurrentRuneLocale(): 0x800d0c000
> > __getCurrentRuneLocale()->__variable: 0x800c07040
> > &_DefaultRuneLocale: 0x600ee0
> > &_DefaultRuneLocale->__variable: 0x0
> > [1]
> > _ThreadRuneLocale: 0x600ee0
> > _ThreadRuneLocale->__variable: 0x0
> > __getCurrentRuneLocale(): 0x600ee0
> > __getCurrentRuneLocale()->__variable: 0x0
> > &_DefaultRuneLocale: 0x600ee0
> > &_DefaultRuneLocale->__variable: 0x0
> > [2]
> > _ThreadRuneLocale: 0x600ee0
> > _ThreadRuneLocale->__variable: 0x0
> > __getCurrentRuneLocale(): 0x600ee0
> > __getCurrentRuneLocale()->__variable: 0x0
> > &_DefaultRuneLocale: 0x600ee0
> > &_DefaultRuneLocale->__variable: 0x0
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x0000000800908880 in mbsnrtowcs () from /lib/libc.so.7
> > (gdb)  
 style=3D"word-wr=
> > ap:break-word">
 style=3D"white-spa=
> > ce:pre-wrap;color:rgb(0,0,0);font-family:arial">After calling
> 'uselocal=
> > e(oldLocale)' [2], _ThreadRuneLocale  style=3D"white-space:=
> > pre-wrap;color:rgb(0,0,0);font-family:arial">should not be 0x600ee0.
> >  style=3D=
> > "white-space:pre-wrap">It is strange that the states [1] and [2] are the
> sa=
> > me. (I hope this helps.)
 style=3D"word-wrap:=
> > break-word">
> >  New','=
> > \00ff2d\00ff33 \00ff30
> \0030b4\0030b7\0030c3\0030af',sans-serif;font-si=
> > ze:13px;white-space:normal">If I can help you in any other way, please
> let =
> > me know.
> >
 style=3D"color:rgb(34,34,34);white-space:pre-wrap;word-wrap:break-word=
> > ">


class=3D"= > > gmail_quote">2014-03-31 18:57 GMT+09:00 David Chisnall dir=3D"ltr">&l= > > t; target=3D"_blank">theraven@freebs= > > d.org>:
> >
.8ex;border-left:1p= > > x #ccc solid;padding-left:1ex">
On 31 Mar 2014, at 10:03, > Da= > > vid Chisnall <theraven@FreeBSD.org> wrote:
> >
> > > I think the fix should actually be:
> > >
> > > Index: locale/euc.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
> > > --- locale/euc.c =A0 =A0 =A0(revision 263226)
> > > +++ locale/euc.c =A0 =A0 =A0(working copy)
> > > @@ -134,7 +134,7 @@
> > > =A0 =A0 =A0 return (ps =3D=3D NULL || ((const _EucState > *)ps)->want= > > =3D=3D 0);
> > > }
> > >
> > > -#define =A0 =A0 =A0CEI =A0 =A0 ((_EucInfo > *)(_CurrentRuneLocale->_= > > _variable))
> > > +#define =A0 =A0 =A0CEI =A0 =A0 ((_EucInfo > *)(__getCurrentRuneLocale()= > > ->__variable))
> > >
> > > #define =A0 =A0 =A0 _SS2 =A0 =A00x008e
> > > #define =A0 =A0 =A0 _SS3 =A0 =A00x008f
> > >
> > >
> > >
> > > Please can you test this and let me know if it fixes it for you?
> >
> >
Actually, I'm not sure how this bug can manifest, unless > you'= > > ve somehow built libc with the wrong headers. =A0In runtype.h (which is > inc= > > luded in euc.c), we have this:
> >
> > #define _CurrentRuneLocale (__getCurrentRuneLocale())
> >
> > So these two versions should expand to the same thing.
> >
> > David
> >
> >



-- > > r>Tomohisa Tanaka
">Tomohisa.= > > Tanaka@gmail.com > >
> > > > --20cf303f672e1e5ef004f5e92be0-- > > --20cf303f672e1e5ef404f5e92be2 > > Content-Type: text/plain; charset=US-ASCII; name="report1.txt" > > Content-Disposition: attachment; filename="report1.txt" > > Content-Transfer-Encoding: base64 > > X-Attachment-Id: f_htfxye6m0 > > > > > JSBnY2MgLWczIG1haW4uYyB+L3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xpYmMuYQol > > > IGdkYiAuL2Eub3V0CkdOVSBnZGIgNi4xLjEgW0ZyZWVCU0RdCkNvcHlyaWdodCAyMDA0IEZyZWUg > > > U29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgpHREIgaXMgZnJlZSBzb2Z0d2FyZSwgY292ZXJlZCBi > > > eSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UsIGFuZCB5b3UgYXJlCndlbGNvbWUgdG8g > > > Y2hhbmdlIGl0IGFuZC9vciBkaXN0cmlidXRlIGNvcGllcyBvZiBpdCB1bmRlciBjZXJ0YWluIGNv > > > bmRpdGlvbnMuClR5cGUgInNob3cgY29weWluZyIgdG8gc2VlIHRoZSBjb25kaXRpb25zLgpUaGVy > > > ZSBpcyBhYnNvbHV0ZWx5IG5vIHdhcnJhbnR5IGZvciBHREIuICBUeXBlICJzaG93IHdhcnJhbnR5 > > > IiBmb3IgZGV0YWlscy4KVGhpcyBHREIgd2FzIGNvbmZpZ3VyZWQgYXMgImFtZDY0LW1hcmNlbC1m > > > cmVlYnNkIi4uLgooZ2RiKSBydW4KU3RhcnRpbmcgcHJvZ3JhbTogL3Vzci9ob21lL3N5bC93b3Jr > > > L21ibGVuL2Eub3V0IApzZXRsb2NhbGU6IGphX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL2phX0pQLmV1 > > > Y0pQL2phX0pQLmV1Y0pQL2phX0pQLmV1Y0pQL0MKClByb2dyYW0gcmVjZWl2ZWQgc2lnbmFsIFNJ > > > R1NFR1YsIFNlZ21lbnRhdGlvbiBmYXVsdC4KMHgwMDAwMDAwMDAwNDE4MjNiIGluIF9FVUNfbWJy > > > dG93YyAocHdjPTB4MCwgcz0weDQzMjFiMiAiYSIsIG49MSwgcHM9MHg2M2YzMTgpCiAgICBhdCAv > > > dXNyL2hvbWUvc3lsL3dvcmsvZnJlZWJzZC11c3Itc3JjL2xpYi9saWJjL2xvY2FsZS9ldWMuYzox > > > ODIKMTgyICAgICAgICAgICAgICAgICAgICAgd2FudCA9IENFSS0+Y291bnRbc2V0ID0gX2V1Y19z > > ZXQoKnMpXTsKKGdkYikgCg== > > --20cf303f672e1e5ef404f5e92be2 > > Content-Type: text/plain; charset=US-ASCII; name="report2.txt" > > Content-Disposition: attachment; filename="report2.txt" > > Content-Transfer-Encoding: base64 > > X-Attachment-Id: f_htfxyj7g1 > > > > > JSBjYXQgbWFpbjEuYwojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5j > > > bHVkZSA8bG9jYWxlLmg+CiNpbmNsdWRlIDx4bG9jYWxlLmg+CiNpbmNsdWRlIDxydW5ldHlwZS5o > > > PgoKc3RhdGljIHZvaWQKc2hvd1ZhcmlhYmxlcyh2b2lkKQp7CiAgcHJpbnRmKCJfVGhyZWFkUnVu > > > ZUxvY2FsZTogJXBcbiIsIF9UaHJlYWRSdW5lTG9jYWxlKTsKICBpZiAoX1RocmVhZFJ1bmVMb2Nh > > > bGUgIT0gTlVMTCkgewogICAgcHJpbnRmKCJfVGhyZWFkUnVuZUxvY2FsZS0+X192YXJpYWJsZTog > > > JXBcbiIsCiAgICAgICAgICAgX1RocmVhZFJ1bmVMb2NhbGUtPl9fdmFyaWFibGUpOwogIH0KICBw > > > cmludGYoIl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTogJXBcbiIsIF9fZ2V0Q3VycmVudFJ1bmVM > > > b2NhbGUoKSk7CiAgaWYgKF9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKSAhPSBOVUxMKSB7CiAgICBw > > > cmludGYoIl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKS0+X192YXJpYWJsZTogJXBcbiIsCiAgICAg > > > ICAgICAgX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlKTsKICB9CiAgcHJpbnRm > > > KCImX0RlZmF1bHRSdW5lTG9jYWxlOiAlcFxuIiwgJl9EZWZhdWx0UnVuZUxvY2FsZSk7CiAgcHJp > > > bnRmKCImX0RlZmF1bHRSdW5lTG9jYWxlLT5fX3ZhcmlhYmxlOiAlcFxuIiwKICAgICAgICAgKCZf > > > RGVmYXVsdFJ1bmVMb2NhbGUpLT5fX3ZhcmlhYmxlKTsKfQoKaW50Cm1haW4odm9pZCkKewogIHBy > > > aW50Zigic2V0bG9jYWxlOiAlc1xuIiwgc2V0bG9jYWxlKExDX0FMTCwgIiIpKTsKCiAgcHJpbnRm > > > KCJbMF1cbiIpOwogIHNob3dWYXJpYWJsZXMoKTsKCiAgbG9jYWxlX3QgbmV3TG9jYWxlID0gbmV3 > > > bG9jYWxlKExDX0FMTF9NQVNLLCAiQyIsIE5VTEwpOwogIGxvY2FsZV90IG9sZExvY2FsZSA9IHVz > > > ZWxvY2FsZShuZXdMb2NhbGUpOwogIC8qIC4uLiAqLwoKICBwcmludGYoIlsxXVxuIik7CiAgc2hv > > > d1ZhcmlhYmxlcygpOwoKICB1c2Vsb2NhbGUob2xkTG9jYWxlKTsKCiAgcHJpbnRmKCJbMl1cbiIp > > > OwogIHNob3dWYXJpYWJsZXMoKTsKCiAgcHJpbnRmKCIlZFxuIiwgbWJsZW4oImEiLCAxKSk7CiAg > > > cmV0dXJuIDA7Cn0KJSBnY2MgLWczIG1haW4xLmMKJSBnZGIgLi9hLm91dApHTlUgZ2RiIDYuMS4x > > > IFtGcmVlQlNEXQpDb3B5cmlnaHQgMjAwNCBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4K > > > R0RCIGlzIGZyZWUgc29mdHdhcmUsIGNvdmVyZWQgYnkgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBM > > > aWNlbnNlLCBhbmQgeW91IGFyZQp3ZWxjb21lIHRvIGNoYW5nZSBpdCBhbmQvb3IgZGlzdHJpYnV0 > > > ZSBjb3BpZXMgb2YgaXQgdW5kZXIgY2VydGFpbiBjb25kaXRpb25zLgpUeXBlICJzaG93IGNvcHlp > > > bmciIHRvIHNlZSB0aGUgY29uZGl0aW9ucy4KVGhlcmUgaXMgYWJzb2x1dGVseSBubyB3YXJyYW50 > > > eSBmb3IgR0RCLiAgVHlwZSAic2hvdyB3YXJyYW50eSIgZm9yIGRldGFpbHMuClRoaXMgR0RCIHdh > > > cyBjb25maWd1cmVkIGFzICJhbWQ2NC1tYXJjZWwtZnJlZWJzZCIuLi4KKGdkYikgcnVuClN0YXJ0 > > > aW5nIHByb2dyYW06IC91c3IvaG9tZS9zeWwvd29yay9tYmxlbi9hLm91dCAKc2V0bG9jYWxlOiBq > > > YV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNKUC9qYV9KUC5ldWNK > > > UC9DClswXQpfVGhyZWFkUnVuZUxvY2FsZTogMHgwCl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTog > > > MHg4MDBkMGMwMDAKX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlOiAweDgwMGMw > > > NzA0MAomX0RlZmF1bHRSdW5lTG9jYWxlOiAweDYwMGVlMAomX0RlZmF1bHRSdW5lTG9jYWxlLT5f > > > X3ZhcmlhYmxlOiAweDAKWzFdCl9UaHJlYWRSdW5lTG9jYWxlOiAweDYwMGVlMApfVGhyZWFkUnVu > > > ZUxvY2FsZS0+X192YXJpYWJsZTogMHgwCl9fZ2V0Q3VycmVudFJ1bmVMb2NhbGUoKTogMHg2MDBl > > > ZTAKX19nZXRDdXJyZW50UnVuZUxvY2FsZSgpLT5fX3ZhcmlhYmxlOiAweDAKJl9EZWZhdWx0UnVu > > > ZUxvY2FsZTogMHg2MDBlZTAKJl9EZWZhdWx0UnVuZUxvY2FsZS0+X192YXJpYWJsZTogMHgwClsy > > > XQpfVGhyZWFkUnVuZUxvY2FsZTogMHg2MDBlZTAKX1RocmVhZFJ1bmVMb2NhbGUtPl9fdmFyaWFi > > > bGU6IDB4MApfX2dldEN1cnJlbnRSdW5lTG9jYWxlKCk6IDB4NjAwZWUwCl9fZ2V0Q3VycmVudFJ1 > > > bmVMb2NhbGUoKS0+X192YXJpYWJsZTogMHgwCiZfRGVmYXVsdFJ1bmVMb2NhbGU6IDB4NjAwZWUw > > > CiZfRGVmYXVsdFJ1bmVMb2NhbGUtPl9fdmFyaWFibGU6IDB4MAoKUHJvZ3JhbSByZWNlaXZlZCBz > > > aWduYWwgU0lHU0VHViwgU2VnbWVudGF0aW9uIGZhdWx0LgoweDAwMDAwMDA4MDA5MDg4ODAgaW4g > > bWJzbnJ0b3djcyAoKSBmcm9tIC9saWIvbGliYy5zby43CihnZGIpIAo= > > --20cf303f672e1e5ef404f5e92be2-- > > _______________________________________________ > > freebsd-standards@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-standards > > To unsubscribe, send any mail to " > freebsd-standards-unsubscribe@freebsd.org" > > -- Tomohisa Tanaka Tomohisa.Tanaka@gmail.com From owner-freebsd-standards@FreeBSD.ORG Sat Apr 5 20:16:17 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45E25658; Sat, 5 Apr 2014 20:16:17 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB1539CC; Sat, 5 Apr 2014 20:16:16 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.8/8.14.8) with ESMTP id s35KG7Ub015242; Sat, 5 Apr 2014 23:16:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s35KG7Ub015242 Received: (from kostik@localhost) by tom.home (8.14.8/8.14.8/Submit) id s35KG7pf015241; Sat, 5 Apr 2014 23:16:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 5 Apr 2014 23:16:07 +0300 From: Konstantin Belousov To: Christian Neukirchen Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Message-ID: <20140405201607.GL21331@kib.kiev.ua> References: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cLlE6j+44ygFdGhU" Content-Disposition: inline In-Reply-To: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: standards@freebsd.org, freebsd-gnats-submit@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:16:17 -0000 --cLlE6j+44ygFdGhU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: > >Fix: > Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= =3D 200809 >=20 > #if __BSD_VISIBLE > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > #endif >=20 Thank you for noting this. Still, I want to formally request your confirmation that the following patch works for you. I only have 1003.1, 2013 access right now. diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index 3461f8b..2691449 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -96,7 +96,7 @@ typedef __pid_t pid_t; #define O_FSYNC 0x0080 /* synchronous writes */ #endif #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >=3D 200809 #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ #endif #define O_CREAT 0x0200 /* create if nonexistent */ --cLlE6j+44ygFdGhU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTQGSGAAoJEJDCuSvBvK1BxxUQAJf9dfRzfibeNurPwjV5roDy 6btTsW+hgaAYwhOFnTDaRLcwdW0Z+R3zFZKB0T6j+VtAe2y4ekOWZYwRwoIkgLsq WzD2LFIgPT+lccZxNI+G45GHKAYREP8tte1fH6iQwoUYjw6qw1kU6pCvFmRatsUf zTO3bdqsBd8AD1m/8heHfcWnI1y+jh8o8m1vgIz9XToYczm8l9kEgcXZNS9n7fU5 wJ6vzJcPPpT+/DdpLWld6CFqM+ERE7KLOMN+WJOigGWeMTMACpvseGfiGngB1AsC wIVxYoftZBixVC3dfmt0mDFC1ljcY6JwSk7eYnqH1Z1o8YeaxKxE9V3ZiyKjBmxL wAb7H+l019or0FqqBL4a+l+Lye1rkmFbcGFl6wuionb+WCafsBQHLcnZVEB4Dgrt iEdanWEKYRRoHBzNjU7/s/s6DRp3Co5aCvsT3BPZtZnlpkRSbtcTYIaQ3QKh+i9s 5K/fqUhfLJmK/J+WCmZyeT8uforuxAj89eMUicDGU34a3klxIPKJel5sQGLYcwaW pQ2OdOlVHmhhLLt/P7k360xisytFuONakf5P6JCz5etQNi2zCuWf5g1gov/ZXFN7 UFVPAriUUGXYKs8BRxQjKCYsH0XjbDGvwv4KPBO/tNpIUcZMoj6VTdAd4OKn8fQs sR7ZcTDjeWX/eHCp6iDn =zV9O -----END PGP SIGNATURE----- --cLlE6j+44ygFdGhU-- From owner-freebsd-standards@FreeBSD.ORG Sat Apr 5 20:20:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7823269B for ; Sat, 5 Apr 2014 20:20:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 4CE409DF for ; Sat, 5 Apr 2014 20:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s35KK1NG031039 for ; Sat, 5 Apr 2014 20:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s35KK1eP031038; Sat, 5 Apr 2014 20:20:01 GMT (envelope-from gnats) Date: Sat, 5 Apr 2014 20:20:01 GMT Message-Id: <201404052020.s35KK1eP031038@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Konstantin Belousov Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Konstantin Belousov List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:20:01 -0000 The following reply was made to PR standards/188173; it has been noted by GNATS. From: Konstantin Belousov To: Christian Neukirchen Cc: freebsd-gnats-submit@FreeBSD.org, standards@freebsd.org Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Date: Sat, 5 Apr 2014 23:16:07 +0300 --cLlE6j+44ygFdGhU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: > >Fix: > Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= =3D 200809 >=20 > #if __BSD_VISIBLE > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > #endif >=20 Thank you for noting this. Still, I want to formally request your confirmation that the following patch works for you. I only have 1003.1, 2013 access right now. diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index 3461f8b..2691449 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -96,7 +96,7 @@ typedef __pid_t pid_t; #define O_FSYNC 0x0080 /* synchronous writes */ #endif #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >=3D 200809 #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ #endif #define O_CREAT 0x0200 /* create if nonexistent */ --cLlE6j+44ygFdGhU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTQGSGAAoJEJDCuSvBvK1BxxUQAJf9dfRzfibeNurPwjV5roDy 6btTsW+hgaAYwhOFnTDaRLcwdW0Z+R3zFZKB0T6j+VtAe2y4ekOWZYwRwoIkgLsq WzD2LFIgPT+lccZxNI+G45GHKAYREP8tte1fH6iQwoUYjw6qw1kU6pCvFmRatsUf zTO3bdqsBd8AD1m/8heHfcWnI1y+jh8o8m1vgIz9XToYczm8l9kEgcXZNS9n7fU5 wJ6vzJcPPpT+/DdpLWld6CFqM+ERE7KLOMN+WJOigGWeMTMACpvseGfiGngB1AsC wIVxYoftZBixVC3dfmt0mDFC1ljcY6JwSk7eYnqH1Z1o8YeaxKxE9V3ZiyKjBmxL wAb7H+l019or0FqqBL4a+l+Lye1rkmFbcGFl6wuionb+WCafsBQHLcnZVEB4Dgrt iEdanWEKYRRoHBzNjU7/s/s6DRp3Co5aCvsT3BPZtZnlpkRSbtcTYIaQ3QKh+i9s 5K/fqUhfLJmK/J+WCmZyeT8uforuxAj89eMUicDGU34a3klxIPKJel5sQGLYcwaW pQ2OdOlVHmhhLLt/P7k360xisytFuONakf5P6JCz5etQNi2zCuWf5g1gov/ZXFN7 UFVPAriUUGXYKs8BRxQjKCYsH0XjbDGvwv4KPBO/tNpIUcZMoj6VTdAd4OKn8fQs sR7ZcTDjeWX/eHCp6iDn =zV9O -----END PGP SIGNATURE----- --cLlE6j+44ygFdGhU-- From owner-freebsd-standards@FreeBSD.ORG Sat Apr 5 20:47:50 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0A2BD6D; Sat, 5 Apr 2014 20:47:50 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3005CC1E; Sat, 5 Apr 2014 20:47:50 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 62BA63592D9; Sat, 5 Apr 2014 22:47:48 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 39ABF28497; Sat, 5 Apr 2014 22:47:48 +0200 (CEST) Date: Sat, 5 Apr 2014 22:47:48 +0200 From: Jilles Tjoelker To: Konstantin Belousov Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Message-ID: <20140405204748.GA20798@stack.nl> References: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> <20140405201607.GL21331@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140405201607.GL21331@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: standards@freebsd.org, freebsd-gnats-submit@FreeBSD.org, Christian Neukirchen X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:47:50 -0000 On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: > On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: > > >Fix: > > Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= 200809 > > > > #if __BSD_VISIBLE > > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > > #endif > > > Thank you for noting this. Still, I want to formally request your > confirmation that the following patch works for you. I only have 1003.1, > 2013 access right now. > diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h > index 3461f8b..2691449 100644 > --- a/sys/sys/fcntl.h > +++ b/sys/sys/fcntl.h > @@ -96,7 +96,7 @@ typedef __pid_t pid_t; > #define O_FSYNC 0x0080 /* synchronous writes */ > #endif > #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > #endif > #define O_CREAT 0x0200 /* create if nonexistent */ This looks good, but I went ahead and made the other new POSIX.1-2008 things visible as well and removed redundant __BSD_VISIBLE condition parts: Index: sys/sys/fcntl.h =================================================================== --- sys/sys/fcntl.h (revision 263842) +++ sys/sys/fcntl.h (working copy) @@ -96,7 +96,7 @@ typedef __pid_t pid_t; #define O_FSYNC 0x0080 /* synchronous writes */ #endif #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ #endif #define O_CREAT 0x0200 /* create if nonexistent */ @@ -115,7 +115,7 @@ typedef __pid_t pid_t; #endif /* Defined by POSIX Extended API Set Part 2 */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 #define O_DIRECTORY 0x00020000 /* Fail if not directory */ #define O_EXEC 0x00040000 /* Open for execute only */ #endif @@ -184,7 +184,7 @@ typedef __pid_t pid_t; #endif /* Defined by POSIX Extended API Set Part 2 */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 /* * Magic value that specify the use of the current working directory * to determine the target of relative file paths in the openat() and @@ -211,7 +211,7 @@ typedef __pid_t pid_t; #define F_SETFD 2 /* set file descriptor flags */ #define F_GETFL 3 /* get file status flags */ #define F_SETFL 4 /* set file status flags */ -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 #define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ #define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ #endif @@ -229,7 +229,7 @@ typedef __pid_t pid_t; #define F_READAHEAD 15 /* read ahead */ #define F_RDAHEAD 16 /* Darwin compatible read ahead */ #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 #define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ #endif #if __BSD_VISIBLE @@ -310,10 +310,10 @@ int fcntl(int, int, ...); #if __BSD_VISIBLE int flock(int, int); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 int openat(int, const char *, int, ...); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 +#if __POSIX_VISIBLE >= 200112 int posix_fadvise(int, off_t, off_t, int); int posix_fallocate(int, off_t, off_t); #endif For testing, I compiled (using -std=c99) and ran the following: #define _POSIX_C_SOURCE 200809 #include int main(int argc, char **argv) { if (argc != 2) return 2; int fd = open(argv[1], O_RDONLY | O_NOFOLLOW); if (fd == -1) return 1; return 0; } and likewise with #define _XOPEN_SOURCE 700 instead of #define _POSIX_C_SOURCE 200809. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Sat Apr 5 20:50:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76D24DA7 for ; Sat, 5 Apr 2014 20:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 64051C28 for ; Sat, 5 Apr 2014 20:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s35Ko1TR039623 for ; Sat, 5 Apr 2014 20:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s35Ko1WL039622; Sat, 5 Apr 2014 20:50:01 GMT (envelope-from gnats) Date: Sat, 5 Apr 2014 20:50:01 GMT Message-Id: <201404052050.s35Ko1WL039622@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Jilles Tjoelker Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Jilles Tjoelker List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 20:50:01 -0000 The following reply was made to PR standards/188173; it has been noted by GNATS. From: Jilles Tjoelker To: Konstantin Belousov Cc: Christian Neukirchen , standards@freebsd.org, freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Date: Sat, 5 Apr 2014 22:47:48 +0200 On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: > On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: > > >Fix: > > Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= 200809 > > > > #if __BSD_VISIBLE > > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > > #endif > > > Thank you for noting this. Still, I want to formally request your > confirmation that the following patch works for you. I only have 1003.1, > 2013 access right now. > diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h > index 3461f8b..2691449 100644 > --- a/sys/sys/fcntl.h > +++ b/sys/sys/fcntl.h > @@ -96,7 +96,7 @@ typedef __pid_t pid_t; > #define O_FSYNC 0x0080 /* synchronous writes */ > #endif > #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > #endif > #define O_CREAT 0x0200 /* create if nonexistent */ This looks good, but I went ahead and made the other new POSIX.1-2008 things visible as well and removed redundant __BSD_VISIBLE condition parts: Index: sys/sys/fcntl.h =================================================================== --- sys/sys/fcntl.h (revision 263842) +++ sys/sys/fcntl.h (working copy) @@ -96,7 +96,7 @@ typedef __pid_t pid_t; #define O_FSYNC 0x0080 /* synchronous writes */ #endif #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ #endif #define O_CREAT 0x0200 /* create if nonexistent */ @@ -115,7 +115,7 @@ typedef __pid_t pid_t; #endif /* Defined by POSIX Extended API Set Part 2 */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 #define O_DIRECTORY 0x00020000 /* Fail if not directory */ #define O_EXEC 0x00040000 /* Open for execute only */ #endif @@ -184,7 +184,7 @@ typedef __pid_t pid_t; #endif /* Defined by POSIX Extended API Set Part 2 */ -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 /* * Magic value that specify the use of the current working directory * to determine the target of relative file paths in the openat() and @@ -211,7 +211,7 @@ typedef __pid_t pid_t; #define F_SETFD 2 /* set file descriptor flags */ #define F_GETFL 3 /* get file status flags */ #define F_SETFL 4 /* set file status flags */ -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 #define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ #define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ #endif @@ -229,7 +229,7 @@ typedef __pid_t pid_t; #define F_READAHEAD 15 /* read ahead */ #define F_RDAHEAD 16 /* Darwin compatible read ahead */ #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 #define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ #endif #if __BSD_VISIBLE @@ -310,10 +310,10 @@ int fcntl(int, int, ...); #if __BSD_VISIBLE int flock(int, int); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 int openat(int, const char *, int, ...); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 +#if __POSIX_VISIBLE >= 200112 int posix_fadvise(int, off_t, off_t, int); int posix_fallocate(int, off_t, off_t); #endif For testing, I compiled (using -std=c99) and ran the following: #define _POSIX_C_SOURCE 200809 #include int main(int argc, char **argv) { if (argc != 2) return 2; int fd = open(argv[1], O_RDONLY | O_NOFOLLOW); if (fd == -1) return 1; return 0; } and likewise with #define _XOPEN_SOURCE 700 instead of #define _POSIX_C_SOURCE 200809. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Sat Apr 5 22:08:14 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27DFEDFF; Sat, 5 Apr 2014 22:08:14 +0000 (UTC) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9067C218; Sat, 5 Apr 2014 22:08:13 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id t61so5076581wes.17 for ; Sat, 05 Apr 2014 15:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7L7RYqat6S9FZOrivsh2OCdOCNCfpToUOF5m97My0dU=; b=ZEZxIO7RLcuTmboCcTbkEmQxlCKqLWia9RiPWCkAwfLSjn9VUf7FGgU0PCNqA342u4 dGqr8V6WTrHzkMSVlZOpw6krlrPGmAix3ncyzFOFegp/FAoI32x4HZ5Yob439W330aXX 3gRdn+Sla71KE8CS3N0F49s2Ky3KJRl+JJt37jkSjg+A2fZG12bU3UW5DTlVI7BPxnQW G7juKTErCHt60dORQfs59UWF7gqu4PgA/UwN2zEgKbBYyuaRBgQgHBUjzdl97Pm1eepJ iIalug4wf+nex9jgLoiMUyMbcnJAkJVQ8kiUMaazacg5Md16Ty9nPfrqxZZz/uMIoLmg edzA== MIME-Version: 1.0 X-Received: by 10.195.13.76 with SMTP id ew12mr6145888wjd.80.1396735691805; Sat, 05 Apr 2014 15:08:11 -0700 (PDT) Received: by 10.217.140.73 with HTTP; Sat, 5 Apr 2014 15:08:11 -0700 (PDT) In-Reply-To: <20140405204748.GA20798@stack.nl> References: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> <20140405201607.GL21331@kib.kiev.ua> <20140405204748.GA20798@stack.nl> Date: Sun, 6 Apr 2014 02:08:11 +0400 Message-ID: Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming From: Sergey Kandaurov To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Cc: standards@freebsd.org, freebsd-gnats-submit@freebsd.org, Christian Neukirchen X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 22:08:14 -0000 On 6 April 2014 00:47, Jilles Tjoelker wrote: > On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: >> On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: >> > >Fix: >> > Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= 200809 >> > >> > #if __BSD_VISIBLE >> > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> > #endif >> > > >> Thank you for noting this. Still, I want to formally request your >> confirmation that the following patch works for you. I only have 1003.1, >> 2013 access right now. > >> diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h >> index 3461f8b..2691449 100644 >> --- a/sys/sys/fcntl.h >> +++ b/sys/sys/fcntl.h >> @@ -96,7 +96,7 @@ typedef __pid_t pid_t; >> #define O_FSYNC 0x0080 /* synchronous writes */ >> #endif >> #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ >> -#if __BSD_VISIBLE >> +#if __POSIX_VISIBLE >= 200809 >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> #endif >> #define O_CREAT 0x0200 /* create if nonexistent */ > > This looks good, but I went ahead and made the other new POSIX.1-2008 > things visible as well and removed redundant __BSD_VISIBLE condition > parts: It looks good to me, and I have had a subset of this change locally. > > Index: sys/sys/fcntl.h > =================================================================== > --- sys/sys/fcntl.h (revision 263842) > +++ sys/sys/fcntl.h (working copy) > @@ -96,7 +96,7 @@ typedef __pid_t pid_t; > #define O_FSYNC 0x0080 /* synchronous writes */ > #endif > #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > #endif > #define O_CREAT 0x0200 /* create if nonexistent */ > @@ -115,7 +115,7 @@ typedef __pid_t pid_t; > #endif > > /* Defined by POSIX Extended API Set Part 2 */ I'd also remove this line as well. It looks useless now. > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > #define O_DIRECTORY 0x00020000 /* Fail if not directory */ > #define O_EXEC 0x00040000 /* Open for execute only */ > #endif > @@ -184,7 +184,7 @@ typedef __pid_t pid_t; > #endif > > /* Defined by POSIX Extended API Set Part 2 */ See above. > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > /* > * Magic value that specify the use of the current working directory > * to determine the target of relative file paths in the openat() and [...] -- wbr, pluknet From owner-freebsd-standards@FreeBSD.ORG Sat Apr 5 22:10:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCD1DF33 for ; Sat, 5 Apr 2014 22:10:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 954F222C for ; Sat, 5 Apr 2014 22:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s35MA155063839 for ; Sat, 5 Apr 2014 22:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s35MA1Zn063838; Sat, 5 Apr 2014 22:10:01 GMT (envelope-from gnats) Date: Sat, 5 Apr 2014 22:10:01 GMT Message-Id: <201404052210.s35MA1Zn063838@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Sergey Kandaurov Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Sergey Kandaurov List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 22:10:01 -0000 The following reply was made to PR standards/188173; it has been noted by GNATS. From: Sergey Kandaurov To: Jilles Tjoelker Cc: Konstantin Belousov , standards@freebsd.org, freebsd-gnats-submit@freebsd.org, Christian Neukirchen Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Date: Sun, 6 Apr 2014 02:08:11 +0400 On 6 April 2014 00:47, Jilles Tjoelker wrote: > On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: >> On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: >> > >Fix: >> > Adjust the condition in /usr/include/sys/fcntl.h to use _POSIX_C_SOURCE >= 200809 >> > >> > #if __BSD_VISIBLE >> > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> > #endif >> > > >> Thank you for noting this. Still, I want to formally request your >> confirmation that the following patch works for you. I only have 1003.1, >> 2013 access right now. > >> diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h >> index 3461f8b..2691449 100644 >> --- a/sys/sys/fcntl.h >> +++ b/sys/sys/fcntl.h >> @@ -96,7 +96,7 @@ typedef __pid_t pid_t; >> #define O_FSYNC 0x0080 /* synchronous writes */ >> #endif >> #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ >> -#if __BSD_VISIBLE >> +#if __POSIX_VISIBLE >= 200809 >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> #endif >> #define O_CREAT 0x0200 /* create if nonexistent */ > > This looks good, but I went ahead and made the other new POSIX.1-2008 > things visible as well and removed redundant __BSD_VISIBLE condition > parts: It looks good to me, and I have had a subset of this change locally. > > Index: sys/sys/fcntl.h > =================================================================== > --- sys/sys/fcntl.h (revision 263842) > +++ sys/sys/fcntl.h (working copy) > @@ -96,7 +96,7 @@ typedef __pid_t pid_t; > #define O_FSYNC 0x0080 /* synchronous writes */ > #endif > #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > #endif > #define O_CREAT 0x0200 /* create if nonexistent */ > @@ -115,7 +115,7 @@ typedef __pid_t pid_t; > #endif > > /* Defined by POSIX Extended API Set Part 2 */ I'd also remove this line as well. It looks useless now. > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > #define O_DIRECTORY 0x00020000 /* Fail if not directory */ > #define O_EXEC 0x00040000 /* Open for execute only */ > #endif > @@ -184,7 +184,7 @@ typedef __pid_t pid_t; > #endif > > /* Defined by POSIX Extended API Set Part 2 */ See above. > -#if __BSD_VISIBLE > +#if __POSIX_VISIBLE >= 200809 > /* > * Magic value that specify the use of the current working directory > * to determine the target of relative file paths in the openat() and [...] -- wbr, pluknet From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 07:30:24 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C28C2A98; Sun, 6 Apr 2014 07:30:24 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1ADFE4; Sun, 6 Apr 2014 07:30:23 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id C7ED8D4231A; Sun, 6 Apr 2014 17:30:12 +1000 (EST) Date: Sun, 6 Apr 2014 17:30:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming In-Reply-To: <20140405204748.GA20798@stack.nl> Message-ID: <20140406165123.J4942@besplex.bde.org> References: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> <20140405201607.GL21331@kib.kiev.ua> <20140405204748.GA20798@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PqKqMW83 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=8oMEhYicC9IA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=gqrvK-MX832tRjD4KbwA:9 a=CjuIK1q_8ugA:10 Cc: standards@freebsd.org, freebsd-gnats-submit@freebsd.org, Christian Neukirchen X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 07:30:24 -0000 On Sat, 5 Apr 2014, Jilles Tjoelker wrote: > On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: > >> diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h >> index 3461f8b..2691449 100644 >> --- a/sys/sys/fcntl.h >> +++ b/sys/sys/fcntl.h >> @@ -96,7 +96,7 @@ typedef __pid_t pid_t; >> #define O_FSYNC 0x0080 /* synchronous writes */ >> #endif >> #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ >> -#if __BSD_VISIBLE >> +#if __POSIX_VISIBLE >= 200809 >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> #endif >> #define O_CREAT 0x0200 /* create if nonexistent */ > > This looks good, but I went ahead and made the other new POSIX.1-2008 > things visible as well and removed redundant __BSD_VISIBLE condition > parts: That __BSD_VISIBLE is redundant is a bit confusing. Perhaps add or expand a comment about this. > Index: sys/sys/fcntl.h > =================================================================== > --- sys/sys/fcntl.h (revision 263842) > +++ sys/sys/fcntl.h (working copy) > ... > @@ -211,7 +211,7 @@ typedef __pid_t pid_t; > #define F_SETFD 2 /* set file descriptor flags */ > #define F_GETFL 3 /* get file status flags */ > #define F_SETFL 4 /* set file status flags */ > -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > #define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ > #define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ > #endif __XSI_VISIBLE seems to be the only condition that is sometimes needed in ifdefs together with __POSIX_VISIBLE. Many or most of the XSI ifdefs are out of date, with lots of XSI stuff having been moved into POSIX but the ifdefs not being updated. Fixing this would probably give many more relatively complicated ifdefs like the above. The BSD vs POSIX redundancy is also in: % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 Old XSI ifdefs in new FreeBSD code seem to be nonsense. % signal.h:#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 Perhaps complicated enough to be correct. % stat.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 The above is from grepping for VISIBLE and selecting lines with || and removing lines without BSD_VISIBLE. Many more lines have XSI || POSIX, but not in enough files to give much chance that these are complete. Sampling of errors and complications outside of : ./dirent.h:#if __BSD_VISIBLE || __XSI_VISIBLE Seems to be redundant. I think BSD implies the latest version of XSI. So this should use just XSI. ./langinfo.h:#if __BSD_VISIBLE || __XSI_VISIBLE <= 500 Need both here since 500 is not the latest XSI. Assuming 500 is correct. ./netdb.h:#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 200112) BSD together with POSIX is necessary when the POSIX test is reversed. ./setjmp.h:#if __BSD_VISIBLE || __XSI_VISIBLE >= 600 Another complicated test. Symbols are rarely removed, so such tests are rare. % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE <= 199506 Note: reversed test. % ./stdio.h:#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 Note: reversed test. The previous reversed test may be broken, since it is missing a check for '> 0'. Elsewhere, the test for '> 0' is obfuscated by writing it as a boolean check for != 0 with implicit 0. % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 % ./stdio.h:#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 % ./string.h:#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) Redundancies are most dense in these 2 popular headers. The tests (mainly the redundant parts) are also obfuscated by writing them in random orders (mostly BSD first in stdio.h and BSD last in string.h). All of the randomly ordered redundancies in stdio.h and string.h are new with the 2008 or 2012 versions of POSIX. One in fcntl.h was old with the 2001 version of POSIX. Bruce From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 07:40:02 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 982F6AE7 for ; Sun, 6 Apr 2014 07:40:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 7A3CDFC for ; Sun, 6 Apr 2014 07:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s367e1SY078774 for ; Sun, 6 Apr 2014 07:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s367e1q1078773; Sun, 6 Apr 2014 07:40:01 GMT (envelope-from gnats) Date: Sun, 6 Apr 2014 07:40:01 GMT Message-Id: <201404060740.s367e1q1078773@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Bruce Evans Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Bruce Evans List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 07:40:02 -0000 The following reply was made to PR standards/188173; it has been noted by GNATS. From: Bruce Evans To: Jilles Tjoelker Cc: Konstantin Belousov , standards@freebsd.org, freebsd-gnats-submit@freebsd.org, Christian Neukirchen Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Date: Sun, 6 Apr 2014 17:30:11 +1000 (EST) On Sat, 5 Apr 2014, Jilles Tjoelker wrote: > On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: > >> diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h >> index 3461f8b..2691449 100644 >> --- a/sys/sys/fcntl.h >> +++ b/sys/sys/fcntl.h >> @@ -96,7 +96,7 @@ typedef __pid_t pid_t; >> #define O_FSYNC 0x0080 /* synchronous writes */ >> #endif >> #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ >> -#if __BSD_VISIBLE >> +#if __POSIX_VISIBLE >= 200809 >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> #endif >> #define O_CREAT 0x0200 /* create if nonexistent */ > > This looks good, but I went ahead and made the other new POSIX.1-2008 > things visible as well and removed redundant __BSD_VISIBLE condition > parts: That __BSD_VISIBLE is redundant is a bit confusing. Perhaps add or expand a comment about this. > Index: sys/sys/fcntl.h > =================================================================== > --- sys/sys/fcntl.h (revision 263842) > +++ sys/sys/fcntl.h (working copy) > ... > @@ -211,7 +211,7 @@ typedef __pid_t pid_t; > #define F_SETFD 2 /* set file descriptor flags */ > #define F_GETFL 3 /* get file status flags */ > #define F_SETFL 4 /* set file status flags */ > -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > #define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ > #define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ > #endif __XSI_VISIBLE seems to be the only condition that is sometimes needed in ifdefs together with __POSIX_VISIBLE. Many or most of the XSI ifdefs are out of date, with lots of XSI stuff having been moved into POSIX but the ifdefs not being updated. Fixing this would probably give many more relatively complicated ifdefs like the above. The BSD vs POSIX redundancy is also in: % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 Old XSI ifdefs in new FreeBSD code seem to be nonsense. % signal.h:#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 Perhaps complicated enough to be correct. % stat.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 The above is from grepping for VISIBLE and selecting lines with || and removing lines without BSD_VISIBLE. Many more lines have XSI || POSIX, but not in enough files to give much chance that these are complete. Sampling of errors and complications outside of : ./dirent.h:#if __BSD_VISIBLE || __XSI_VISIBLE Seems to be redundant. I think BSD implies the latest version of XSI. So this should use just XSI. ./langinfo.h:#if __BSD_VISIBLE || __XSI_VISIBLE <= 500 Need both here since 500 is not the latest XSI. Assuming 500 is correct. ./netdb.h:#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 200112) BSD together with POSIX is necessary when the POSIX test is reversed. ./setjmp.h:#if __BSD_VISIBLE || __XSI_VISIBLE >= 600 Another complicated test. Symbols are rarely removed, so such tests are rare. % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE <= 199506 Note: reversed test. % ./stdio.h:#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 Note: reversed test. The previous reversed test may be broken, since it is missing a check for '> 0'. Elsewhere, the test for '> 0' is obfuscated by writing it as a boolean check for != 0 with implicit 0. % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 % ./stdio.h:#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE % ./string.h:#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 % ./string.h:#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) Redundancies are most dense in these 2 popular headers. The tests (mainly the redundant parts) are also obfuscated by writing them in random orders (mostly BSD first in stdio.h and BSD last in string.h). All of the randomly ordered redundancies in stdio.h and string.h are new with the 2008 or 2012 versions of POSIX. One in fcntl.h was old with the 2001 version of POSIX. Bruce From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 14:11:54 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCA1CA83; Sun, 6 Apr 2014 14:11:54 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BBF41B1; Sun, 6 Apr 2014 14:11:54 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id z2so3676736wiv.0 for ; Sun, 06 Apr 2014 07:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=oMflMJd8xHWixC6dfHjVG6Ep2lvH5iZKCLdWQ7huU84=; b=nTVzgCg++AQaALBwinBkLC+DAqvfvaLqDvoxqxc5+fGjYH07VE6bxENwNsTPK/yimk AIbDmhgVpgbN3u+ZHD2Vt8RVu6/VPSxTbbkYiVIlRgFVvYF/vVsyoBLDdSm+rOxkjHsv I+M0u3XusS9Ftiaduvq/NF9jMai0n5Z/StcRTrYIjDyKXCUIFrYgjupcwQSUiNmHOU5Q baZjecCIN5wyrFRdDiLv1OZoqWZI8MJL2czd/S5H+Q68USBROFLP8ZjMtRTICqhJK9Jc rumZ/ye7rDuOefdEa242GEQfMaqcKYeWMQemvugHMfnOfLRjDNGSav1phYrv9HSr7vz/ syzg== X-Received: by 10.180.78.225 with SMTP id e1mr10612390wix.17.1396793512345; Sun, 06 Apr 2014 07:11:52 -0700 (PDT) Received: from juno.localdomain (dhcp-138-246-84-247.dynamic.eduroam.mwn.de. [138.246.84.247]) by mx.google.com with ESMTPSA id g3sm34719589eet.35.2014.04.06.07.11.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Apr 2014 07:11:51 -0700 (PDT) Received: by juno.localdomain (Postfix, from userid 1000) id 8A7668EB71; Sun, 6 Apr 2014 16:11:51 +0200 (CEST) From: Christian Neukirchen To: Konstantin Belousov Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming References: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> <20140405201607.GL21331@kib.kiev.ua> Date: Sun, 06 Apr 2014 16:11:51 +0200 In-Reply-To: <20140405201607.GL21331@kib.kiev.ua> (Konstantin Belousov's message of "Sat, 5 Apr 2014 23:16:07 +0300") Message-ID: <87ioqm1ra0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Cc: standards@freebsd.org, freebsd-gnats-submit@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 14:11:54 -0000 Konstantin Belousov writes: > On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: >> >Fix: >> Adjust the condition in /usr/include/sys/fcntl.h to use >> _POSIX_C_SOURCE >= 200809 >> >> #if __BSD_VISIBLE >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> #endif >> > > Thank you for noting this. Still, I want to formally request your > confirmation that the following patch works for you. I only have 1003.1, > 2013 access right now. Yes, this fixes the O_NOFOLLOW problem. -- Christian Neukirchen http://chneukirchen.org From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 14:20:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FD7CBC0 for ; Sun, 6 Apr 2014 14:20:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 2AED61D3 for ; Sun, 6 Apr 2014 14:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s36EK0Tx008131 for ; Sun, 6 Apr 2014 14:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s36EK0lJ008130; Sun, 6 Apr 2014 14:20:00 GMT (envelope-from gnats) Date: Sun, 6 Apr 2014 14:20:00 GMT Message-Id: <201404061420.s36EK0lJ008130@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Christian Neukirchen Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Christian Neukirchen List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 14:20:01 -0000 The following reply was made to PR standards/188173; it has been noted by GNATS. From: Christian Neukirchen To: Konstantin Belousov Cc: freebsd-gnats-submit@FreeBSD.org, standards@freebsd.org Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Date: Sun, 06 Apr 2014 16:11:51 +0200 Konstantin Belousov writes: > On Tue, Apr 01, 2014 at 03:31:31PM +0000, Christian Neukirchen wrote: >> >Fix: >> Adjust the condition in /usr/include/sys/fcntl.h to use >> _POSIX_C_SOURCE >= 200809 >> >> #if __BSD_VISIBLE >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ >> #endif >> > > Thank you for noting this. Still, I want to formally request your > confirmation that the following patch works for you. I only have 1003.1, > 2013 access right now. Yes, this fixes the O_NOFOLLOW problem. -- Christian Neukirchen http://chneukirchen.org From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 14:40:00 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B810315C for ; Sun, 6 Apr 2014 14:40:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 9571331F for ; Sun, 6 Apr 2014 14:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s36Ee0bD014047 for ; Sun, 6 Apr 2014 14:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s36Ee0St014046; Sun, 6 Apr 2014 14:40:00 GMT (envelope-from gnats) Resent-Date: Sun, 6 Apr 2014 14:40:00 GMT Resent-Message-Id: <201404061440.s36Ee0St014046@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christian Neukirchen Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBECC10C for ; Sun, 6 Apr 2014 14:30:37 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8F17285 for ; Sun, 6 Apr 2014 14:30:37 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s36EUbRd092036 for ; Sun, 6 Apr 2014 14:30:37 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s36EUbFE092028; Sun, 6 Apr 2014 14:30:37 GMT (envelope-from nobody) Message-Id: <201404061430.s36EUbFE092028@cgiserv.freebsd.org> Date: Sun, 6 Apr 2014 14:30:37 GMT From: Christian Neukirchen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/188316: Visibility of ntohl etc. and POSIX 2008 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 14:40:00 -0000 >Number: 188316 >Category: standards >Synopsis: Visibility of ntohl etc. and POSIX 2008 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 06 14:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Christian Neukirchen >Release: 10.0-RELEASE >Organization: >Environment: FreeBSD mneme.vuxu.org 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: According to POSIX 2008, the functions ntohl etc. are defined in (http://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html), which works because they are defined unconditionally there. However, just including should also define them (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html): > The htonl(), htons(), ntohl(), and ntohs() functions shall be available > as described in . Inclusion of the header may > also make visible all symbols from . But ntohl etc are inside a "#if !defined(_KERNEL) && __BSD_VISIBLE" in , violating the "shall be" requirement above. >How-To-Repeat: echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - (all good) echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - :2:12: warning: implicit declaration of function 'htonl' is invalid in C99 [-Wimplicit-function-declaration] int main(){htonl(1);} ^ 1 warning generated. >Fix: Guard the definition with __POSIX_VISIBLE >= 200112. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 17:43:57 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F4CD1F8; Sun, 6 Apr 2014 17:43:57 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 317CA74D; Sun, 6 Apr 2014 17:43:56 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 90FDD42421F; Mon, 7 Apr 2014 03:43:47 +1000 (EST) Date: Mon, 7 Apr 2014 03:43:44 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Christian Neukirchen Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 In-Reply-To: <201404061430.s36EUbFE092028@cgiserv.freebsd.org> Message-ID: <20140407024203.M6470@besplex.bde.org> References: <201404061430.s36EUbFE092028@cgiserv.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=U6SrU4bu c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=xzXVF2VtB1oA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=uZvujYp8AAAA:8 a=kLQtRtzyPeRkiQONIdsA:9 a=CjuIK1q_8ugA:10 a=50LJwXkts08A:10 a=nFfl2XBgbq4A:10 Cc: freebsd-gnats-submit@freebsd.org, freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 17:43:57 -0000 On Sun, 6 Apr 2014, Christian Neukirchen wrote: >> Description: > According to POSIX 2008, the functions ntohl etc. are defined in (http://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html), which works because they are defined unconditionally there. > > However, just including should also define them (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html): > >> The htonl(), htons(), ntohl(), and ntohs() functions shall be available >> as described in . Inclusion of the header may >> also make visible all symbols from . POSIX.1-2001 also says this. > But ntohl etc are inside a "#if !defined(_KERNEL) && __BSD_VISIBLE" in , violating the "shall be" requirement above. The requirement was somehow missed before. Probably due to its bad wording. The bad wording "shall be available" is only used for namespaces twice in POSIX.1-2001-draft7 (for {h_errno} in and for {ntoh*} in . The normal wording is "shall be defined as described in "). >> How-To-Repeat: > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > (all good) > > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > :2:12: warning: implicit declaration of function 'htonl' is invalid in C99 [-Wimplicit-function-declaration] > int main(){htonl(1);} > ^ > 1 warning generated. > >> Fix: > Guard the definition with __POSIX_VISIBLE >= 200112. This is wrong too, and is inconsistent with where there the symbols are defined unconditionally (if this wouldn't be redundant). The correctness of this depends on the symbols being in a header that doesn't exist in versions of POSIX that don't have the symbols. I think it is indeed correct, because POSIX started specifying both the symbols and the headers in 2001. Howver, the unconditional declarations may be wrong for XSI, and aren't really right for BSD. In 4.4BSD, they were declared unconditionally in via nested pollution from , and were only declared in the POSIX headers as a side effect of these headers being broken unless the application included . Similarly in FreeBSD-1 (and Net/2?). Applications written for this polluted API are no longer supported. However, the documented API (byteorder.3) was that these functions are declared in . It is now that these functions are declared in the 2 POSIX headers. In the kernel, the ntoh* family is still declared in , but this is misdocumented in byteorder.9 which says that these functions are declared in . actually declares almost all official endianness-related functions except these. and presumably all the functions of it are not documented in any application man page. mips still has bogus ntoh* functions in libc in asm. Bruce From owner-freebsd-standards@FreeBSD.ORG Sun Apr 6 17:50:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9060F72F for ; Sun, 6 Apr 2014 17:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 6F5FC99C for ; Sun, 6 Apr 2014 17:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s36Ho1ie072040 for ; Sun, 6 Apr 2014 17:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s36Ho1ux072038; Sun, 6 Apr 2014 17:50:01 GMT (envelope-from gnats) Date: Sun, 6 Apr 2014 17:50:01 GMT Message-Id: <201404061750.s36Ho1ux072038@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Bruce Evans Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Bruce Evans List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 17:50:01 -0000 The following reply was made to PR standards/188316; it has been noted by GNATS. From: Bruce Evans To: Christian Neukirchen Cc: freebsd-gnats-submit@freebsd.org, freebsd-standards@freebsd.org Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 Date: Mon, 7 Apr 2014 03:43:44 +1000 (EST) On Sun, 6 Apr 2014, Christian Neukirchen wrote: >> Description: > According to POSIX 2008, the functions ntohl etc. are defined in (http://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html), which works because they are defined unconditionally there. > > However, just including should also define them (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html): > >> The htonl(), htons(), ntohl(), and ntohs() functions shall be available >> as described in . Inclusion of the header may >> also make visible all symbols from . POSIX.1-2001 also says this. > But ntohl etc are inside a "#if !defined(_KERNEL) && __BSD_VISIBLE" in , violating the "shall be" requirement above. The requirement was somehow missed before. Probably due to its bad wording. The bad wording "shall be available" is only used for namespaces twice in POSIX.1-2001-draft7 (for {h_errno} in and for {ntoh*} in . The normal wording is "shall be defined as described in "). >> How-To-Repeat: > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > (all good) > > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > :2:12: warning: implicit declaration of function 'htonl' is invalid in C99 [-Wimplicit-function-declaration] > int main(){htonl(1);} > ^ > 1 warning generated. > >> Fix: > Guard the definition with __POSIX_VISIBLE >= 200112. This is wrong too, and is inconsistent with where there the symbols are defined unconditionally (if this wouldn't be redundant). The correctness of this depends on the symbols being in a header that doesn't exist in versions of POSIX that don't have the symbols. I think it is indeed correct, because POSIX started specifying both the symbols and the headers in 2001. Howver, the unconditional declarations may be wrong for XSI, and aren't really right for BSD. In 4.4BSD, they were declared unconditionally in via nested pollution from , and were only declared in the POSIX headers as a side effect of these headers being broken unless the application included . Similarly in FreeBSD-1 (and Net/2?). Applications written for this polluted API are no longer supported. However, the documented API (byteorder.3) was that these functions are declared in . It is now that these functions are declared in the 2 POSIX headers. In the kernel, the ntoh* family is still declared in , but this is misdocumented in byteorder.9 which says that these functions are declared in . actually declares almost all official endianness-related functions except these. and presumably all the functions of it are not documented in any application man page. mips still has bogus ntoh* functions in libc in asm. Bruce From owner-freebsd-standards@FreeBSD.ORG Mon Apr 7 11:06:52 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17BD5BDF for ; Mon, 7 Apr 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 049E5C10 for ; Mon, 7 Apr 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s37B6pfN071211 for ; Mon, 7 Apr 2014 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s37B6pjp071209 for freebsd-standards@FreeBSD.org; Mon, 7 Apr 2014 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Apr 2014 11:06:51 GMT Message-Id: <201404071106.s37B6pjp071209@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 11:06:52 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/188316 standards Visibility of ntohl etc. and POSIX 2008 o stand/188173 standards O_NOFOLLOW visibility not POSIX 2008 conforming o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 51 problems total. From owner-freebsd-standards@FreeBSD.ORG Sun Apr 13 22:07:33 2014 Return-Path: Delivered-To: standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6CAAC58; Sun, 13 Apr 2014 22:07:32 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E11F1AB1; Sun, 13 Apr 2014 22:07:32 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id DB1B5B80E1; Mon, 14 Apr 2014 00:07:30 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id BC86C28497; Mon, 14 Apr 2014 00:07:30 +0200 (CEST) Date: Mon, 14 Apr 2014 00:07:30 +0200 From: Jilles Tjoelker To: Bruce Evans Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Message-ID: <20140413220730.GA61434@stack.nl> References: <201404011531.s31FVVNR008903@cgiserv.freebsd.org> <20140405201607.GL21331@kib.kiev.ua> <20140405204748.GA20798@stack.nl> <20140406165123.J4942@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140406165123.J4942@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: standards@freebsd.org, freebsd-gnats-submit@freebsd.org, Christian Neukirchen X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:07:33 -0000 On Sun, Apr 06, 2014 at 05:30:11PM +1000, Bruce Evans wrote: > On Sat, 5 Apr 2014, Jilles Tjoelker wrote: > > On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: > >> diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h > >> index 3461f8b..2691449 100644 > >> --- a/sys/sys/fcntl.h > >> +++ b/sys/sys/fcntl.h > >> @@ -96,7 +96,7 @@ typedef __pid_t pid_t; > >> #define O_FSYNC 0x0080 /* synchronous writes */ > >> #endif > >> #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ > >> -#if __BSD_VISIBLE > >> +#if __POSIX_VISIBLE >= 200809 > >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > >> #endif > >> #define O_CREAT 0x0200 /* create if nonexistent */ > > This looks good, but I went ahead and made the other new POSIX.1-2008 > > things visible as well and removed redundant __BSD_VISIBLE condition > > parts: > That __BSD_VISIBLE is redundant is a bit confusing. Perhaps add or > expand a comment about this. The comment about that is in : ] #else /* Default environment: show everything. ] */ ] #define __POSIX_VISIBLE 200809 ] #define __XSI_VISIBLE 700 ] #define __BSD_VISIBLE 1 ] #define __ISO_C_VISIBLE 2011 ] #endif By doing it this way, most #ifs are simplified. > > Index: sys/sys/fcntl.h > > =================================================================== > > --- sys/sys/fcntl.h (revision 263842) > > +++ sys/sys/fcntl.h (working copy) > > ... > > @@ -211,7 +211,7 @@ typedef __pid_t pid_t; > > #define F_SETFD 2 /* set file descriptor flags */ > > #define F_GETFL 3 /* get file status flags */ > > #define F_SETFL 4 /* set file status flags */ > > -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > > +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > > #define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ > > #define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ > > #endif > __XSI_VISIBLE seems to be the only condition that is sometimes needed in > ifdefs together with __POSIX_VISIBLE. Yes. > Many or most of the XSI ifdefs are out of date, with lots of XSI stuff > having been moved into POSIX but the ifdefs not being updated. Fixing > this would probably give many more relatively complicated ifdefs like > the above. > The BSD vs POSIX redundancy is also in: > % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > Old XSI ifdefs in new FreeBSD code seem to be nonsense. It does not make sense to use visibility macros if the application has to #include something not defined by that standard anyway. > % signal.h:#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 > Perhaps complicated enough to be correct. Yes. > % stat.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 > The above is from grepping for VISIBLE and selecting lines with || and > removing lines without BSD_VISIBLE. Many more lines have XSI || POSIX, but > not in enough files to give much chance that these are complete. > Sampling of errors and complications outside of : > ./dirent.h:#if __BSD_VISIBLE || __XSI_VISIBLE > Seems to be redundant. I think BSD implies the latest version of XSI. > So this should use just XSI. Yes. > ./langinfo.h:#if __BSD_VISIBLE || __XSI_VISIBLE <= 500 > Need both here since 500 is not the latest XSI. Assuming 500 is correct. Hmm, that also includes __XSI_VISIBLE == 0, which is incorrect. It should probably be: #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE <= 500) > ./netdb.h:#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 200112) > BSD together with POSIX is necessary when the POSIX test is reversed. Yes. > ./setjmp.h:#if __BSD_VISIBLE || __XSI_VISIBLE >= 600 > Another complicated test. Symbols are rarely removed, so such tests are rare. The __BSD_VISIBLE || part can go away here. > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE These could be simplified. > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE <= 199506 > Note: reversed test. This should be: #if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) since C11 (for example) does not define L_cuserid and friends. > % ./stdio.h:#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 > Note: reversed test. The previous reversed test may be broken, since > it is missing a check for '> 0'. Elsewhere, the test for '> 0' is > obfuscated by writing it as a boolean check for != 0 with implicit 0. > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 > % ./stdio.h:#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ > % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 > % ./string.h:#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) > Redundancies are most dense in these 2 popular headers. The tests > (mainly the redundant parts) are also obfuscated by writing them in > random orders (mostly BSD first in stdio.h and BSD last in string.h). > All of the randomly ordered redundancies in stdio.h and string.h are > new with the 2008 or 2012 versions of POSIX. One in fcntl.h was old > with the 2001 version of POSIX. Yes, messy... Some stuff can be simplified here. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Sun Apr 13 22:10:03 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 691A2D0F for ; Sun, 13 Apr 2014 22:10:03 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 492F51ACE for ; Sun, 13 Apr 2014 22:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMA3Wa037770 for ; Sun, 13 Apr 2014 22:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3DMA3we037769; Sun, 13 Apr 2014 22:10:03 GMT (envelope-from gnats) Date: Sun, 13 Apr 2014 22:10:03 GMT Message-Id: <201404132210.s3DMA3we037769@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Jilles Tjoelker Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Jilles Tjoelker List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 22:10:03 -0000 The following reply was made to PR standards/188173; it has been noted by GNATS. From: Jilles Tjoelker To: Bruce Evans Cc: standards@freebsd.org, freebsd-gnats-submit@freebsd.org, Christian Neukirchen Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming Date: Mon, 14 Apr 2014 00:07:30 +0200 On Sun, Apr 06, 2014 at 05:30:11PM +1000, Bruce Evans wrote: > On Sat, 5 Apr 2014, Jilles Tjoelker wrote: > > On Sat, Apr 05, 2014 at 11:16:07PM +0300, Konstantin Belousov wrote: > >> diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h > >> index 3461f8b..2691449 100644 > >> --- a/sys/sys/fcntl.h > >> +++ b/sys/sys/fcntl.h > >> @@ -96,7 +96,7 @@ typedef __pid_t pid_t; > >> #define O_FSYNC 0x0080 /* synchronous writes */ > >> #endif > >> #define O_SYNC 0x0080 /* POSIX synonym for O_FSYNC */ > >> -#if __BSD_VISIBLE > >> +#if __POSIX_VISIBLE >= 200809 > >> #define O_NOFOLLOW 0x0100 /* don't follow symlinks */ > >> #endif > >> #define O_CREAT 0x0200 /* create if nonexistent */ > > This looks good, but I went ahead and made the other new POSIX.1-2008 > > things visible as well and removed redundant __BSD_VISIBLE condition > > parts: > That __BSD_VISIBLE is redundant is a bit confusing. Perhaps add or > expand a comment about this. The comment about that is in : ] #else /* Default environment: show everything. ] */ ] #define __POSIX_VISIBLE 200809 ] #define __XSI_VISIBLE 700 ] #define __BSD_VISIBLE 1 ] #define __ISO_C_VISIBLE 2011 ] #endif By doing it this way, most #ifs are simplified. > > Index: sys/sys/fcntl.h > > =================================================================== > > --- sys/sys/fcntl.h (revision 263842) > > +++ sys/sys/fcntl.h (working copy) > > ... > > @@ -211,7 +211,7 @@ typedef __pid_t pid_t; > > #define F_SETFD 2 /* set file descriptor flags */ > > #define F_GETFL 3 /* get file status flags */ > > #define F_SETFL 4 /* set file status flags */ > > -#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > > +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > > #define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */ > > #define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */ > > #endif > __XSI_VISIBLE seems to be the only condition that is sometimes needed in > ifdefs together with __POSIX_VISIBLE. Yes. > Many or most of the XSI ifdefs are out of date, with lots of XSI stuff > having been moved into POSIX but the ifdefs not being updated. Fixing > this would probably give many more relatively complicated ifdefs like > the above. > The BSD vs POSIX redundancy is also in: > % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > % capability.h:#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 > Old XSI ifdefs in new FreeBSD code seem to be nonsense. It does not make sense to use visibility macros if the application has to #include something not defined by that standard anyway. > % signal.h:#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 > Perhaps complicated enough to be correct. Yes. > % stat.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 > The above is from grepping for VISIBLE and selecting lines with || and > removing lines without BSD_VISIBLE. Many more lines have XSI || POSIX, but > not in enough files to give much chance that these are complete. > Sampling of errors and complications outside of : > ./dirent.h:#if __BSD_VISIBLE || __XSI_VISIBLE > Seems to be redundant. I think BSD implies the latest version of XSI. > So this should use just XSI. Yes. > ./langinfo.h:#if __BSD_VISIBLE || __XSI_VISIBLE <= 500 > Need both here since 500 is not the latest XSI. Assuming 500 is correct. Hmm, that also includes __XSI_VISIBLE == 0, which is incorrect. It should probably be: #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE <= 500) > ./netdb.h:#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 200112) > BSD together with POSIX is necessary when the POSIX test is reversed. Yes. > ./setjmp.h:#if __BSD_VISIBLE || __XSI_VISIBLE >= 600 > Another complicated test. Symbols are rarely removed, so such tests are rare. The __BSD_VISIBLE || part can go away here. > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE These could be simplified. > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE <= 199506 > Note: reversed test. This should be: #if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) since C11 (for example) does not define L_cuserid and friends. > % ./stdio.h:#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 > Note: reversed test. The previous reversed test may be broken, since > it is missing a check for '> 0'. Elsewhere, the test for '> 0' is > obfuscated by writing it as a boolean check for != 0 with implicit 0. > % ./stdio.h:#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 > % ./stdio.h:#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ > % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE > % ./string.h:#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 > % ./string.h:#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) > Redundancies are most dense in these 2 popular headers. The tests > (mainly the redundant parts) are also obfuscated by writing them in > random orders (mostly BSD first in stdio.h and BSD last in string.h). > All of the randomly ordered redundancies in stdio.h and string.h are > new with the 2008 or 2012 versions of POSIX. One in fcntl.h was old > with the 2001 version of POSIX. Yes, messy... Some stuff can be simplified here. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Mon Apr 14 11:06:52 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3413179 for ; Mon, 14 Apr 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 A00B61672 for ; Mon, 14 Apr 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3EB6qxQ026023 for ; Mon, 14 Apr 2014 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3EB6qDF026021 for freebsd-standards@FreeBSD.org; Mon, 14 Apr 2014 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Apr 2014 11:06:52 GMT Message-Id: <201404141106.s3EB6qDF026021@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 11:06:52 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/188316 standards Visibility of ntohl etc. and POSIX 2008 o stand/188173 standards O_NOFOLLOW visibility not POSIX 2008 conforming o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards stdlib.h doesn't define W* macros (e.g. WEXITSTATUS) o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards Bug in the libcxxrt version in FreeBSD 10.0: _ZTIDn no o stand/184694 standards gssapi.h does not define GSS_C_PRF_KEY_{FULL,PARTIAL} o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 51 problems total. From owner-freebsd-standards@FreeBSD.ORG Thu Apr 17 22:27:06 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEF2675A; Thu, 17 Apr 2014 22:27:06 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 A3A011A2C; Thu, 17 Apr 2014 22:27:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HMR6GA033949; Thu, 17 Apr 2014 22:27:06 GMT (envelope-from jilles@freefall.freebsd.org) Received: (from jilles@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3HMR67G033948; Thu, 17 Apr 2014 22:27:06 GMT (envelope-from jilles) Date: Thu, 17 Apr 2014 22:27:06 GMT Message-Id: <201404172227.s3HMR67G033948@freefall.freebsd.org> To: chneukirchen@gmail.com, jilles@FreeBSD.org, freebsd-standards@FreeBSD.org, jilles@FreeBSD.org From: jilles@FreeBSD.org Subject: Re: standards/188173: O_NOFOLLOW visibility not POSIX 2008 conforming X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 22:27:06 -0000 Synopsis: O_NOFOLLOW visibility not POSIX 2008 conforming State-Changed-From-To: open->patched State-Changed-By: jilles State-Changed-When: Thu Apr 17 22:25:44 UTC 2014 State-Changed-Why: Fixed in 11-current (SVN r264628). Responsible-Changed-From-To: freebsd-standards->jilles Responsible-Changed-By: jilles Responsible-Changed-When: Thu Apr 17 22:25:44 UTC 2014 Responsible-Changed-Why: I committed the change. http://www.freebsd.org/cgi/query-pr.cgi?pr=188173 From owner-freebsd-standards@FreeBSD.ORG Fri Apr 18 01:40:32 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D22571E; Fri, 18 Apr 2014 01:40:32 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 F32851BE1; Fri, 18 Apr 2014 01:40:31 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3I1eV8p000794; Fri, 18 Apr 2014 01:40:31 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3I1eVNm000792; Fri, 18 Apr 2014 01:40:31 GMT (envelope-from linimon) Date: Fri, 18 Apr 2014 01:40:31 GMT Message-Id: <201404180140.s3I1eVNm000792@freefall.freebsd.org> To: dfilter@FreeBSD.ORG, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/188740: Re: standards/188173: commit references a PR X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 01:40:32 -0000 Old Synopsis: Re: standard/188173: commit references a PR New Synopsis: Re: standards/188173: commit references a PR State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Fri Apr 18 01:39:40 UTC 2014 State-Changed-Why: Misfiled followup to standards/188173; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Fri Apr 18 01:39:40 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=188740 From owner-freebsd-standards@FreeBSD.ORG Sun Apr 20 22:22:39 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA4E8D02; Sun, 20 Apr 2014 22:22:39 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 8ECDD1A8C; Sun, 20 Apr 2014 22:22:39 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KMMdNm012279; Sun, 20 Apr 2014 22:22:39 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3KMMdWU012278; Sun, 20 Apr 2014 22:22:39 GMT (envelope-from linimon) Date: Sun, 20 Apr 2014 22:22:39 GMT Message-Id: <201404202222.s3KMMdWU012278@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/164049: [patch] getconf(1) returns bad value for ULLONG_MAX X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 22:22:39 -0000 Synopsis: [patch] getconf(1) returns bad value for ULLONG_MAX Responsible-Changed-From-To: freebsd-bugs->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Sun Apr 20 22:22:26 UTC 2014 Responsible-Changed-Why: Canonicalize assignment. http://www.freebsd.org/cgi/query-pr.cgi?pr=164049 From owner-freebsd-standards@FreeBSD.ORG Sun Apr 20 22:23:08 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF372D76; Sun, 20 Apr 2014 22:23:08 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 843511A96; Sun, 20 Apr 2014 22:23:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KMN8oi012330; Sun, 20 Apr 2014 22:23:08 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3KMN8CA012329; Sun, 20 Apr 2014 22:23:08 GMT (envelope-from linimon) Date: Sun, 20 Apr 2014 22:23:08 GMT Message-Id: <201404202223.s3KMN8CA012329@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/78537: times(2) not functioning per the Posix spec X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 22:23:08 -0000 Synopsis: times(2) not functioning per the Posix spec Responsible-Changed-From-To: freebsd-bugs->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Sun Apr 20 22:22:55 UTC 2014 Responsible-Changed-Why: Canonicalize assignment. http://www.freebsd.org/cgi/query-pr.cgi?pr=78537 From owner-freebsd-standards@FreeBSD.ORG Sun Apr 20 22:23:42 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60767DE6; Sun, 20 Apr 2014 22:23:42 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 357BF1A9D; Sun, 20 Apr 2014 22:23:42 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KMNgkW012384; Sun, 20 Apr 2014 22:23:42 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3KMNgDW012383; Sun, 20 Apr 2014 22:23:42 GMT (envelope-from linimon) Date: Sun, 20 Apr 2014 22:23:42 GMT Message-Id: <201404202223.s3KMNgDW012383@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/57911: fnmatch ("[[:alpha:]]", "x", FNM_PATHNAME) returns FNM_NOMATCH X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 22:23:42 -0000 Synopsis: fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_NOMATCH Responsible-Changed-From-To: freebsd-bugs->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Sun Apr 20 22:23:27 UTC 2014 Responsible-Changed-Why: Canonicalize assignment. http://www.freebsd.org/cgi/query-pr.cgi?pr=57911 From owner-freebsd-standards@FreeBSD.ORG Sun Apr 20 22:24:34 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A54BE5D; Sun, 20 Apr 2014 22:24:34 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 E3F641AA6; Sun, 20 Apr 2014 22:24:33 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3KMOXI4012470; Sun, 20 Apr 2014 22:24:33 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3KMOXYO012469; Sun, 20 Apr 2014 22:24:33 GMT (envelope-from linimon) Date: Sun, 20 Apr 2014 22:24:33 GMT Message-Id: <201404202224.s3KMOXYO012469@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/164793: [libc] write(2) system call violates POSIX standard X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 22:24:34 -0000 Old Synopsis: 'write' system call violates POSIX standard New Synopsis: [libc] write(2) system call violates POSIX standard Responsible-Changed-From-To: freebsd-bugs->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Sun Apr 20 22:23:53 UTC 2014 Responsible-Changed-Why: Canonicalize assignment. http://www.freebsd.org/cgi/query-pr.cgi?pr=164793 From owner-freebsd-standards@FreeBSD.ORG Mon Apr 21 11:06:54 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4048014E for ; Mon, 21 Apr 2014 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 2CC871973 for ; Mon, 21 Apr 2014 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LB6sJ3085856 for ; Mon, 21 Apr 2014 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3LB6rbr085854 for freebsd-standards@FreeBSD.org; Mon, 21 Apr 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 21 Apr 2014 11:06:53 GMT Message-Id: <201404211106.s3LB6rbr085854@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 11:06:54 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/188316 standards [headers] Visibility of ntohl etc. and POSIX 2008 o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards [headers] stdlib.h doesn't define W* macros (e.g. WEXI o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards [libcxxrt] Bug in the libcxxrt version in FreeBSD 10.0 o stand/184694 standards [headers] gssapi.h does not define GSS_C_PRF_KEY_{FULL o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164793 standards [libc] write(2) system call violates POSIX standard p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/164049 standards [patch] getconf(1) returns bad value for ULLONG_MAX o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/78537 standards times(2) not functioning per the Posix spec o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/57911 standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_ o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 54 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Apr 21 18:53:22 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAD0A564 for ; Mon, 21 Apr 2014 18:53:22 +0000 (UTC) Received: from nm4.bullet.mail.bf1.yahoo.com (nm4.bullet.mail.bf1.yahoo.com [98.139.212.163]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F64F1978 for ; Mon, 21 Apr 2014 18:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1398106395; bh=FdyOsfWxYlTkvK/wCxTEQNZfygsp/w4udjCyUnUJawE=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=mwJiV6TW9Q8V5HPCe9LMyjRKAfdRdyCNWXdyYBYU7zR2omSmfjAfu69AKipg2DL+cyFdGpUQnCNIUMgCuVkYPVvEQL/zo1ZDKIYL8TccDOJvkN1f1tvuPa48iml3DT991atW3wjY3ZXLYtUh85gFzi5DkzBu+/BqYBeai5ulLRJFw6OQBd2yXAY7PD0occbXe8cHmXNkoZc/Rs+3s4SJF2AZBflEv+MSq3KJ9l6fQFjc/MpR8Ls7+xL4XQ8VaKnbbCdBe5kK+JvNYEEku8MLde90VyubPOXqBbo4iXZM8GIl9ASvf/+bIGf7C9aZ2eb6UIUtrgpuhVHKo9lf8T445A== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=YbEyaC5gl250eJATiMzQQ468nyC0kt4fZQWW34NIyHiy+aYiQiBtMNQrwjv+CfpkY575vKkFhn6D2It2+zcWBQMYZa+mWQFS4Hngal0+cB9Y1hZjBUE08NyLjhmVz1C6lih/LPSzMQbEeXNqeE6KGbXTZeBuHukIPXx4ai3r/pAnBtkNCQgM4YZTGeBkbmiXUF32SUunOMO3pCJNUm4iQ8lzhbv338CLdekLUV9sBP2QmPeLauRVoIPdNV3RgOyFbstXniwhM4HWSrj3NHCHUfSRPcUmPU3n7ubWPaTT/nPkX8WruF3P0A/awo8ROU0IIWXTbti2OAxvNJ1KYPs/7g==; Received: from [66.196.81.170] by nm4.bullet.mail.bf1.yahoo.com with NNFMP; 21 Apr 2014 18:53:15 -0000 Received: from [68.142.230.75] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 21 Apr 2014 18:53:15 -0000 Received: from [127.0.0.1] by smtp232.mail.bf1.yahoo.com with NNFMP; 21 Apr 2014 18:53:15 -0000 X-Yahoo-Newman-Id: 999953.33043.bm@smtp232.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 9jYbGeYVM1mlNw7CQUqSGcp.vj2SRqNxWD8sECJv_xpfQvm AzJcv_OlO.JSISVtEzRGDmB.QU1WHYaUOAvI9Tzw6bLHolpAKX_5uORaC4RJ .ci52LyzdD9SY2Nqf_glk0DIj0qFhUrW2IQ8IAJpF2gELEtWavuH.aQP6S1j LWGyZHD9PAg3uXrELAy8QD9NUJWlL03XY6RPoCFcf4wrlrcK7aFEZnLrtAZu EwPVMSDA6PthoxMKEaEv7NA0Y5oPyowFxTK3ab4H1ai5jLlD8H_dXzQLcgPU kXzQ8uycJKza0lb__Go_Xb2Na1xA0sDfZrlHC5XeuDu4E9w4h4K1tYGab_MI 4sVAu5j.wH8a8LGmEqPX7_PeV_Yf1cyqoG7FVqPe2V81uIR2_ol3U7sq2nFd RGL5DUDY53k1yDcyTTgz2aueGq0kq_ag.vo8beafGBW_6IwANmT5Tv6AnZrH jed7w1vcWwtUP9e0V0EF4ZRhaeJ3xC9XDfchjjXcISCic22qgXLBahOsjILL Y2MgzmcCi3T8kncshDKwbVM0NIGYQmtq7VKrkYau0DWcbv0fVXy7T4zIx3XG 3Qf2Tk1r.JX8bbt3yCTleNe2yXudwwlbY74vytKG8ZmC3Ia8- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp232.mail.bf1.yahoo.com with SMTP; 21 Apr 2014 18:53:14 +0000 UTC Message-ID: <53556919.4010305@freebsd.org> Date: Mon, 21 Apr 2014 13:53:13 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: freebsd-standards@FreeBSD.org Subject: regex(3): support for \< and \> word delimiters Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 18:53:22 -0000 Hello; Is there any related standard (or in absence strong feelings) about having \< and \> delimiters in regex expressions? I have an old PR bin/153257 which actually comes from illumos: https://www.illumos.org/issues/516 I don't use them but maybe it would help people moving their scripts from Solaris. Regards, Pedro. From owner-freebsd-standards@FreeBSD.ORG Tue Apr 22 02:30:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A30DE0F for ; Tue, 22 Apr 2014 02:30:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 3739A14BE for ; Tue, 22 Apr 2014 02:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3M2U1eG092372 for ; Tue, 22 Apr 2014 02:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3M2U1XX092371; Tue, 22 Apr 2014 02:30:01 GMT (envelope-from gnats) Date: Tue, 22 Apr 2014 02:30:01 GMT Message-Id: <201404220230.s3M2U1XX092371@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Mark Linimon Subject: Re: standards/164793: [libc] write(2) system call violates POSIX standard X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Mark Linimon List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 02:30:01 -0000 The following reply was made to PR standards/164793; it has been noted by GNATS. From: Mark Linimon To: bug-followup@FreeBSD.org Cc: Subject: Re: standards/164793: [libc] write(2) system call violates POSIX standard Date: Mon, 21 Apr 2014 21:21:14 -0500 ----- Forwarded message from Bruce Evans ----- Date: Mon, 21 Apr 2014 16:24:52 +1000 (EST) From: Bruce Evans To: linimon@freebsd.org Subject: Re: standards/164793: [libc] write(2) system call violates POSIX standard On Sun, 20 Apr 2014 linimon@freebsd.org wrote: > Old Synopsis: 'write' system call violates POSIX standard > New Synopsis: [libc] write(2) system call violates POSIX standard Should be '[kern]'. I see I wrote too much in the followup. The PR is mostly about RLIMIT_FSIZE not working, and this also affects ftruncate() and truncate(), and is is probably fs-dependent with zfs and fusefs possibly not having it, so write(2) is not very descriptive either. > Responsible-Changed-From-To: freebsd-bugs->freebsd-standards This is correct. Bruce ----- End forwarded message ----- From owner-freebsd-standards@FreeBSD.ORG Mon Apr 28 11:06:54 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C70E256F for ; Mon, 28 Apr 2014 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 B39561AB3 for ; Mon, 28 Apr 2014 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SB6spn086280 for ; Mon, 28 Apr 2014 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3SB6seB086278 for freebsd-standards@FreeBSD.org; Mon, 28 Apr 2014 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Apr 2014 11:06:54 GMT Message-Id: <201404281106.s3SB6seB086278@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 11:06:54 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/188316 standards [headers] Visibility of ntohl etc. and POSIX 2008 o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards [headers] stdlib.h doesn't define W* macros (e.g. WEXI o stand/186028 standards incorrect return values for posix_fallocate() o stand/185663 standards [libcxxrt] Bug in the libcxxrt version in FreeBSD 10.0 o stand/184694 standards [headers] gssapi.h does not define GSS_C_PRF_KEY_{FULL o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164793 standards [kern] RLIMIT_FSIZE does not work, affecting ftruncate p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/164049 standards [patch] getconf(1) returns bad value for ULLONG_MAX o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/78537 standards times(2) not functioning per the Posix spec o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/57911 standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_ o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 54 problems total. From owner-freebsd-standards@FreeBSD.ORG Sun May 4 04:58:31 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64CC1777; Sun, 4 May 2014 04:58:31 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 3A6151C61; Sun, 4 May 2014 04:58:31 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s444wVaV084378; Sun, 4 May 2014 04:58:31 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s444wUln084377; Sun, 4 May 2014 04:58:30 GMT (envelope-from linimon) Date: Sun, 4 May 2014 04:58:30 GMT Message-Id: <201405040458.s444wUln084377@freefall.freebsd.org> To: gpr@mail.ru, linimon@FreeBSD.org, freebsd-standards@FreeBSD.org, kib@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/186028: [libc] incorrect return values for posix_fallocate(2) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 04:58:31 -0000 Old Synopsis: incorrect return values for posix_fallocate() New Synopsis: [libc] incorrect return values for posix_fallocate(2) State-Changed-From-To: open->patched State-Changed-By: linimon State-Changed-When: Sun May 4 04:57:14 UTC 2014 State-Changed-Why: over to committer for possible MFC. Responsible-Changed-From-To: freebsd-standards->kib Responsible-Changed-By: linimon Responsible-Changed-When: Sun May 4 04:57:14 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=186028 From owner-freebsd-standards@FreeBSD.ORG Sun May 4 11:20:00 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C483DD14 for ; Sun, 4 May 2014 11:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 872B819DC for ; Sun, 4 May 2014 11:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s44BK0rT049674 for ; Sun, 4 May 2014 11:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s44BK0UO049673; Sun, 4 May 2014 11:20:00 GMT (envelope-from gnats) Resent-Date: Sun, 4 May 2014 11:20:00 GMT Resent-Message-Id: <201405041120.s44BK0UO049673@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Joris Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8D82CE3 for ; Sun, 4 May 2014 11:15:24 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B595319C6 for ; Sun, 4 May 2014 11:15:24 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s44BFNZ9023685 for ; Sun, 4 May 2014 11:15:23 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s44BFN71023670; Sun, 4 May 2014 11:15:23 GMT (envelope-from nobody) Message-Id: <201405041115.s44BFN71023670@cgiserv.freebsd.org> Date: Sun, 4 May 2014 11:15:23 GMT From: Joris To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 11:20:00 -0000 >Number: 189353 >Category: standards >Synopsis: POSIX sem_unlink does not actually unlink the semaphore in the process context >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 04 11:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Joris >Release: freebsd 10 >Organization: >Environment: >Description: When a posix sempahore is open, it is cached in the process address space. A call to sem_unlink does not invalidate the caching, and trying to reopen the semaphore with O_EXCL after calling sem_unlink fails with EEXIST. >How-To-Repeat: Here is a test case : #include #include #include #include #include #include int main(int argc, char *argv[]) { sem_t *sem1, *sem2; int error; sem1 = sem_open("/test-sem1", O_CREAT | O_EXCL, S_IRWXU, 1); if (sem1 == SEM_FAILED) err(1,"Cannot create test /test-sem1 semaphore"); error = sem_unlink("/test-sem1"); if (error) err(1, "Cannot unlink semaphore /test-sem1"); sem2 = sem_open("/test-sem1", O_CREAT | O_EXCL, S_IRWXU, 2); if (sem2 == SEM_FAILED) err(1, "Cannot re-create semaphore /test-sem1"); error = sem_unlink("/test-sem1"); if (error) err(1, "Cannot unlink semaphore /test-sem1"); return(0); } >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Sun May 4 12:40:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A40B9A8 for ; Sun, 4 May 2014 12:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 473EF10F2 for ; Sun, 4 May 2014 12:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s44Ce1ma077507 for ; Sun, 4 May 2014 12:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s44Ce0he077506; Sun, 4 May 2014 12:40:01 GMT (envelope-from gnats) Date: Sun, 4 May 2014 12:40:01 GMT Message-Id: <201405041240.s44Ce0he077506@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Konstantin Belousov Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Konstantin Belousov List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 12:40:01 -0000 The following reply was made to PR standards/189353; it has been noted by GNATS. From: Konstantin Belousov To: Joris Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context Date: Sun, 4 May 2014 15:37:43 +0300 --X+8siUETKMkW99st Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 04, 2014 at 11:15:23AM +0000, Joris wrote: >=20 > >Number: 189353 > >Category: standards > >Synopsis: POSIX sem_unlink does not actually unlink the semaphore = in the process context > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-standards > >State: open > >Quarter: =20 > >Keywords: =20 > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun May 04 11:20:00 UTC 2014 > >Closed-Date: > >Last-Modified: > >Originator: Joris > >Release: freebsd 10 > >Organization: > >Environment: > >Description: > When a posix sempahore is open, it is cached in the process address space= =2E A call to sem_unlink does not invalidate the caching, and trying to reo= pen the semaphore with O_EXCL after calling sem_unlink fails with EEXIST. > >How-To-Repeat: > Here is a test case : >=20 > #include > #include > #include > #include > #include >=20 > #include >=20 >=20 > int > main(int argc, char *argv[]) > { > sem_t *sem1, *sem2; > int error; >=20 > sem1 =3D sem_open("/test-sem1", O_CREAT | O_EXCL, S_IRWXU, 1); > if (sem1 =3D=3D SEM_FAILED) > err(1,"Cannot create test /test-sem1 semaphore"); >=20 > error =3D sem_unlink("/test-sem1"); >=20 > if (error) > err(1, "Cannot unlink semaphore /test-sem1"); >=20 >=20 > sem2 =3D sem_open("/test-sem1", O_CREAT | O_EXCL, S_IRWXU, 2); >=20 > if (sem2 =3D=3D SEM_FAILED) > err(1, "Cannot re-create semaphore /test-sem1"); >=20 > error =3D sem_unlink("/test-sem1"); >=20 > if (error) > err(1, "Cannot unlink semaphore /test-sem1"); >=20 > return(0); > } Yes, I think you are right. Please try the following patch, which worked for me, but I only lightly tested it. diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c index 9a2ab27..8e4a91d 100644 --- a/lib/libc/gen/sem_new.c +++ b/lib/libc/gen/sem_new.c @@ -161,7 +161,7 @@ _sem_open(const char *name, int flags, ...) =20 _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { - if (strcmp(name, ni->name) =3D=3D 0) { + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) { if ((flags & (O_CREAT|O_EXCL)) =3D=3D (O_CREAT|O_EXCL)) { _pthread_mutex_unlock(&sem_llock); errno =3D EEXIST; @@ -287,20 +287,32 @@ _sem_close(sem_t *sem) int _sem_unlink(const char *name) { + struct sem_nameinfo *ni; char path[PATH_MAX]; + int error; =20 if (name[0] !=3D '/') { errno =3D ENOENT; return -1; } name++; - strcpy(path, SEM_PREFIX); if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { errno =3D ENAMETOOLONG; return (-1); } - return unlink(path); + + _pthread_once(&once, sem_module_init); + _pthread_mutex_lock(&sem_llock); + LIST_FOREACH(ni, &sem_list, next) { + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) { + ni->name =3D NULL; + break; + } + } + error =3D unlink(path); + _pthread_mutex_unlock(&sem_llock); + return (error); } =20 int --X+8siUETKMkW99st Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTZjSWAAoJEJDCuSvBvK1B8i0P/2MxJ9aHmhC1hsx1ktljC9mw lvb4xHSsy1JpYIRU2tafKTQyRglO9Md1jpKTTjkUbL1sakifvqZzFZv5vbJ7uEDe ST5rqLoydfrayBrMlj/2vV9pX5QV1vc40N3kjGDpwuT+Wkxbsg5bFU87b34HrxvQ jg4RDkRt7IVbv9dLGT1AUxePBoPtc+ZUF3A+UgqH7G5LZ3JA3umM35Sp9oWjv4Ot mR16WyonZ798Qk9Xcj8OGqD8DXJqamgZAlqoMbXYD8hcamqD35Ge4SRHVAb+cySV 25wgXvkB3LpGzfLLRC0EGwAjE3ZwuCAplAXPjCVfLh8wU8XZxZSNla8deUAo+xKS 7Wz4Fdhj/j6JURMvnbLc9pFyIIUTrIPWh/ZydloUjJh5k+oSHtXaVyvxxtoxxMIR Cuh6JzYwMupcMT0Pf/PKRMXGdo72KlJ5WuPkvNSotIl3jaOwJN0CsJslvD0qZr71 AxD5H6h8YDCdXdeYy3zzMI9yau+R7M84nH8cTG8xodLax26DZddRRxCZST4biLTA 8rj6tic4/xlpoEH2g54QBEW6qwm1CmtSEDlnQplJ4obLvinON69IZ8/QYLhwHhdA yQ0qiiNTtNjRWGBPGglT94fsyy4Wh0gOxLod0JegcqkasCnD0qdKnPcVySH79YyD DYFeUb3f+LZgezOI3h5N =wOWb -----END PGP SIGNATURE----- --X+8siUETKMkW99st-- From owner-freebsd-standards@FreeBSD.ORG Sun May 4 12:50:03 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41F11B1F for ; Sun, 4 May 2014 12:50:03 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 2EBB01195 for ; Sun, 4 May 2014 12:50:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s44Co33F080872 for ; Sun, 4 May 2014 12:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s44Co3s1080871; Sun, 4 May 2014 12:50:03 GMT (envelope-from gnats) Date: Sun, 4 May 2014 12:50:03 GMT Message-Id: <201405041250.s44Co3s1080871@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Joris Giovannangeli Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Joris Giovannangeli List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 12:50:03 -0000 The following reply was made to PR standards/189353; it has been noted by GNATS. From: Joris Giovannangeli To: Konstantin Belousov Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context Date: Sun, 04 May 2014 14:46:43 +0200 This is a multi-part message in MIME format. --------------010206030707030503040002 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've found this issue while implementing semaphores for dragonflyBSD, and at first i came with the same solution than yours. But it won't work when you do the same in two processes : unlink will only remove the caching on the process calling unlink, not all of them. See attached test case. It looks like glibc is using inodes numbers and dev number for that, which, while not being strictly correct (inodes can be reused), seems to work fine on linux. For dragonfly, i'm currently trying to keep filedescriptors opened in the nameinfo structure. This adds quite a bit of overhead, but this way you can check link count with fstat during a sem_open to see if the semaphore file still exist, and return the cached mapping only if st_nlink > 0. This solution at least should be strictly correct, but the inode solution could be fine in practice. Regards, joris --------------010206030707030503040002 Content-Type: text/x-csrc; name="sem_test.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sem_test.c" #include #include #include #include #include #include #include #include #include int main() { pid_t pid; sem_t *sem1, *sem2; int error, saved_errno, status; int v1, v2; int pd[2]; char er[1]; char ok[1]; char buf[1]; size_t size; *er = 'X'; *ok = 'O'; if (pipe(pd) == -1) err(1, "Cannot create sync pipe"); sem1 = sem_open("/test-sem", O_CREAT | O_EXCL, S_IRWXU, 1); if (sem1 == SEM_FAILED) err(1,"Cannot create test /test-sem semaphore"); char c = getchar(); pid = fork(); if ( pid == -1) err(1, "Unable to fork test process"); if (pid == 0) { close(pd[0]); error = sem_unlink("/test-sem"); if (error) { perror("Cannot unlink semaphore /test-sem"); goto error; } sem2 = sem_open("/test-sem", O_CREAT | O_EXCL, S_IRWXU, 2); if (sem2 == SEM_FAILED) { perror("Cannot re-create semaphore /test-sem"); goto error; } write(pd[1], ok, 1); error = wait(&status); if (error && errno == EINTR) goto error; return(status); error: write(pd[1], er, 1); close(pd[1]); error = wait(&status); if (error && errno == EINTR) goto error; errx(1, "TEST UNRESOLVED"); return(1); } else { close(pd[1]); size = read(pd[0], buf, 1); if (size != 1) err(2, "process 2 cannot wait for process 1"); if (*buf == *er) errx(2, "Test error"); else { sem2 = sem_open("/test-sem", 0); if (sem2 == SEM_FAILED) err(2, "process 2 failed reopeing semaphore"); // sem_unlink("/test-sem"); sem_getvalue(sem1, &v1); sem_getvalue(sem2, &v2); printf("v1 = %d and v2 = %d\n", v1, v2); if (v1 == v2) { errx(2, "*** TEST FAILED. NOT POSIX ***"); } else { errx(0, "*** TEST SUCCESS. POSIX CONFORMANT ***"); } } } } --------------010206030707030503040002-- From owner-freebsd-standards@FreeBSD.ORG Sun May 4 12:50:02 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50E17B1E for ; Sun, 4 May 2014 12:50:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 320F41194 for ; Sun, 4 May 2014 12:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s44Co27V080864 for ; Sun, 4 May 2014 12:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s44Co15R080863; Sun, 4 May 2014 12:50:01 GMT (envelope-from gnats) Date: Sun, 4 May 2014 12:50:01 GMT Message-Id: <201405041250.s44Co15R080863@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Joris Giovannangeli Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Joris Giovannangeli List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 12:50:02 -0000 The following reply was made to PR standards/189353; it has been noted by GNATS. From: Joris Giovannangeli To: Konstantin Belousov Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context Date: Sun, 04 May 2014 14:46:23 +0200 This is a multi-part message in MIME format. --------------030807090400060606050102 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 04/05/2014 14:37, Konstantin Belousov wrote: > diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c index > 9a2ab27..8e4a91d 100644 --- a/lib/libc/gen/sem_new.c +++ > b/lib/libc/gen/sem_new.c @@ -161,7 +161,7 @@ _sem_open(const char > *name, int flags, ...) > > _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) > { - if (strcmp(name, ni->name) == 0) { + if (ni->name != NULL && > strcmp(name, ni->name) == 0) { if ((flags & (O_CREAT|O_EXCL)) == > (O_CREAT|O_EXCL)) { _pthread_mutex_unlock(&sem_llock); errno = > EEXIST; @@ -287,20 +287,32 @@ _sem_close(sem_t *sem) int > _sem_unlink(const char *name) { + struct sem_nameinfo *ni; char > path[PATH_MAX]; + int error; > > if (name[0] != '/') { errno = ENOENT; return -1; } name++; - > strcpy(path, SEM_PREFIX); if (strlcat(path, name, sizeof(path)) >= > sizeof(path)) { errno = ENAMETOOLONG; return (-1); } - return > unlink(path); + + _pthread_once(&once, sem_module_init); + > _pthread_mutex_lock(&sem_llock); + LIST_FOREACH(ni, &sem_list, > next) { + if (ni->name != NULL && strcmp(name, ni->name) == 0) { + > ni->name = NULL; + break; + } + } + error = unlink(path); + > _pthread_mutex_unlock(&sem_llock); + return (error); } > > int > I've found this issue while implementing semaphores for dragonflyBSD, and at first i came with the same solution than yours. But it won't work when you do the same in two processes : unlink will only remove the caching on the process calling unlink, not all of them. See attached test case. It looks like glibc is using inodes numbers and dev number for that, which, while not being strictly correct (inodes can be reused), seems to work fine on linux. For dragonfly, i'm currently trying to keep filedescriptors opened in the nameinfo structure. This adds quite a bit of overhead, but this way you can check link count with fstat during a sem_open to see if the semaphore file still exist, and return the cached mapping only if st_nlink > 0. This solution at least should be strictly correct, but the inode solution could be fine in practice. Regards, joris --------------030807090400060606050102 Content-Type: text/x-csrc; name="sem_test.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sem_test.c" #include #include #include #include #include #include #include #include #include int main() { pid_t pid; sem_t *sem1, *sem2; int error, saved_errno, status; int v1, v2; int pd[2]; char er[1]; char ok[1]; char buf[1]; size_t size; *er = 'X'; *ok = 'O'; if (pipe(pd) == -1) err(1, "Cannot create sync pipe"); sem1 = sem_open("/test-sem", O_CREAT | O_EXCL, S_IRWXU, 1); if (sem1 == SEM_FAILED) err(1,"Cannot create test /test-sem semaphore"); char c = getchar(); pid = fork(); if ( pid == -1) err(1, "Unable to fork test process"); if (pid == 0) { close(pd[0]); error = sem_unlink("/test-sem"); if (error) { perror("Cannot unlink semaphore /test-sem"); goto error; } sem2 = sem_open("/test-sem", O_CREAT | O_EXCL, S_IRWXU, 2); if (sem2 == SEM_FAILED) { perror("Cannot re-create semaphore /test-sem"); goto error; } write(pd[1], ok, 1); error = wait(&status); if (error && errno == EINTR) goto error; return(status); error: write(pd[1], er, 1); close(pd[1]); error = wait(&status); if (error && errno == EINTR) goto error; errx(1, "TEST UNRESOLVED"); return(1); } else { close(pd[1]); size = read(pd[0], buf, 1); if (size != 1) err(2, "process 2 cannot wait for process 1"); if (*buf == *er) errx(2, "Test error"); else { sem2 = sem_open("/test-sem", 0); if (sem2 == SEM_FAILED) err(2, "process 2 failed reopeing semaphore"); // sem_unlink("/test-sem"); sem_getvalue(sem1, &v1); sem_getvalue(sem2, &v2); printf("v1 = %d and v2 = %d\n", v1, v2); if (v1 == v2) { errx(2, "*** TEST FAILED. NOT POSIX ***"); } else { errx(0, "*** TEST SUCCESS. POSIX CONFORMANT ***"); } } } } --------------030807090400060606050102-- From owner-freebsd-standards@FreeBSD.ORG Sun May 4 18:30:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F3C8700 for ; Sun, 4 May 2014 18:30:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 504D012B2 for ; Sun, 4 May 2014 18:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s44IU1iO097828 for ; Sun, 4 May 2014 18:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s44IU1cI097827; Sun, 4 May 2014 18:30:01 GMT (envelope-from gnats) Date: Sun, 4 May 2014 18:30:01 GMT Message-Id: <201405041830.s44IU1cI097827@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Konstantin Belousov Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Konstantin Belousov List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 18:30:01 -0000 The following reply was made to PR standards/189353; it has been noted by GNATS. From: Konstantin Belousov To: Joris Giovannangeli Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context Date: Sun, 4 May 2014 21:23:56 +0300 --h22Fi9ANawrtbNPX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 04, 2014 at 02:46:23PM +0200, Joris Giovannangeli wrote: > On 04/05/2014 14:37, Konstantin Belousov wrote: >=20 > > diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c index > > 9a2ab27..8e4a91d 100644 --- a/lib/libc/gen/sem_new.c +++ > > b/lib/libc/gen/sem_new.c @@ -161,7 +161,7 @@ _sem_open(const char > > *name, int flags, ...) > >=20 > > _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) > > { - if (strcmp(name, ni->name) =3D=3D 0) { + if (ni->name !=3D NULL && > > strcmp(name, ni->name) =3D=3D 0) { if ((flags & (O_CREAT|O_EXCL)) =3D=3D > > (O_CREAT|O_EXCL)) { _pthread_mutex_unlock(&sem_llock); errno =3D > > EEXIST; @@ -287,20 +287,32 @@ _sem_close(sem_t *sem) int=20 > > _sem_unlink(const char *name) { + struct sem_nameinfo *ni; char > > path[PATH_MAX]; + int error; > >=20 > > if (name[0] !=3D '/') { errno =3D ENOENT; return -1; } name++; -=20 > > strcpy(path, SEM_PREFIX); if (strlcat(path, name, sizeof(path)) >=3D > > sizeof(path)) { errno =3D ENAMETOOLONG; return (-1); } - return > > unlink(path); + + _pthread_once(&once, sem_module_init); + > > _pthread_mutex_lock(&sem_llock); + LIST_FOREACH(ni, &sem_list, > > next) { + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) {= + > > ni->name =3D NULL; + break; + } + } + error =3D unlink(path); + > > _pthread_mutex_unlock(&sem_llock); + return (error); } > >=20 > > int > >=20 >=20 > I've found this issue while implementing semaphores for dragonflyBSD, > and at first i came with the same solution than yours. But it won't > work when you do the same in two processes : unlink will only remove > the caching on the process calling unlink, not all of them. See > attached test case. Why didn't you provided both tests in the first report ? >=20 > It looks like glibc is using inodes numbers and dev number for that, > which, while not being strictly correct (inodes can be reused), seems > to work fine on linux. Inode number + generation provides the same practical guarantee as the file descriptor. You cannot have two inodes with the same (inum, gen) simultaneously, generation would need some years to wrap. >=20 > For dragonfly, i'm currently trying to keep filedescriptors opened in > the nameinfo structure. This adds quite a bit of overhead, but this > way you can check link count with fstat during a sem_open to see if > the semaphore file still exist, and return the cached mapping only if > st_nlink > 0. Yes, keeping filedescriptors for the semaphores is too heavy-weight. If keeping fd, we could just use fifos to implement the functionality, I think. >=20 > This solution at least should be strictly correct, but the inode > solution could be fine in practice. Do you have any further tests ? The patch below passes yours' two and tools/regression/posixsem2. I tried to be modest with open(2) syscalls, reusing the fd in sem_open(). This also should prevent a race. diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c index 9a2ab27..ed58de3 100644 --- a/lib/libc/gen/sem_new.c +++ b/lib/libc/gen/sem_new.c @@ -66,6 +66,9 @@ __weak_reference(_sem_wait, sem_wait); struct sem_nameinfo { int open_count; char *name; + dev_t dev; + ino_t ino; + uint32_t gen; sem_t *sem; LIST_ENTRY(sem_nameinfo) next; }; @@ -151,37 +154,50 @@ _sem_open(const char *name, int flags, ...) return (SEM_FAILED); } name++; - + strcpy(path, SEM_PREFIX); + if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { + errno =3D ENAMETOOLONG; + return (SEM_FAILED); + } if (flags & ~(O_CREAT|O_EXCL)) { errno =3D EINVAL; return (SEM_FAILED); } - + if ((flags & O_CREAT) !=3D 0) { + va_start(ap, flags); + mode =3D va_arg(ap, int); + value =3D va_arg(ap, int); + va_end(ap); + } + fd =3D -1; _pthread_once(&once, sem_module_init); =20 _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { - if (strcmp(name, ni->name) =3D=3D 0) { + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) { + fd =3D _open(path, flags | O_RDWR | O_CLOEXEC | + O_EXLOCK, mode); + if (fd =3D=3D -1 || _fstat(fd, &sb) =3D=3D -1) + goto error; + if (ni->dev !=3D sb.st_dev || + ni->ino !=3D sb.st_ino || + ni->gen !=3D sb.st_gen) { + ni->name =3D NULL; + ni =3D NULL; + break; + } if ((flags & (O_CREAT|O_EXCL)) =3D=3D (O_CREAT|O_EXCL)) { - _pthread_mutex_unlock(&sem_llock); - errno =3D EEXIST; - return (SEM_FAILED); + goto error; } else { ni->open_count++; sem =3D ni->sem; _pthread_mutex_unlock(&sem_llock); + _close(fd); return (sem); } } } =20 - if (flags & O_CREAT) { - va_start(ap, flags); - mode =3D va_arg(ap, int); - value =3D va_arg(ap, int); - va_end(ap); - } - len =3D sizeof(*ni) + strlen(name) + 1; ni =3D (struct sem_nameinfo *)malloc(len); if (ni =3D=3D NULL) { @@ -192,17 +208,13 @@ _sem_open(const char *name, int flags, ...) ni->name =3D (char *)(ni+1); strcpy(ni->name, name); =20 - strcpy(path, SEM_PREFIX); - if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { - errno =3D ENAMETOOLONG; - goto error; + if (fd =3D=3D -1) { + fd =3D _open(path, flags | O_RDWR | O_CLOEXEC | O_EXLOCK, mode); + if (fd =3D=3D -1) + goto error; + if (_fstat(fd, &sb) =3D=3D -1) + goto error; } - - fd =3D _open(path, flags|O_RDWR|O_CLOEXEC|O_EXLOCK, mode); - if (fd =3D=3D -1) - goto error; - if (_fstat(fd, &sb)) - goto error; if (sb.st_size < sizeof(sem_t)) { sem_t tmp; =20 @@ -228,6 +240,9 @@ _sem_open(const char *name, int flags, ...) } ni->open_count =3D 1; ni->sem =3D sem; + ni->dev =3D sb.st_dev; + ni->ino =3D sb.st_ino; + ni->gen =3D sb.st_gen; LIST_INSERT_HEAD(&sem_list, ni, next); _close(fd); _pthread_mutex_unlock(&sem_llock); @@ -287,20 +302,32 @@ _sem_close(sem_t *sem) int _sem_unlink(const char *name) { + struct sem_nameinfo *ni; char path[PATH_MAX]; + int error; =20 if (name[0] !=3D '/') { errno =3D ENOENT; return -1; } name++; - strcpy(path, SEM_PREFIX); if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { errno =3D ENAMETOOLONG; return (-1); } - return unlink(path); + + _pthread_once(&once, sem_module_init); + _pthread_mutex_lock(&sem_llock); + LIST_FOREACH(ni, &sem_list, next) { + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) { + ni->name =3D NULL; + break; + } + } + error =3D unlink(path); + _pthread_mutex_unlock(&sem_llock); + return (error); } =20 int --h22Fi9ANawrtbNPX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTZoW8AAoJEJDCuSvBvK1BilYQAJlijmMXvxNhADYUMx+xsPJf OYiNqlp+1u+fdluJIb+CsSntAAucO2bXPwIkE4wUFmJ7f2XABvfnASRrUeOYuvjT TQkQLb4bY1773a4KDxIapLs3EowJYi9MOxuo8lAjh/6veuplVI5OlGyVnSLDR54v FLue4+IvBnP7sp1B1OTKJ8sQEs+ePVA6lwZG8TtTUrNt1KUVkwJ37ztJvWlE9rtx pb+gdCMSiMWNpMinIqWeejAX4wjoQu6401t4wmQCoW7xi1Ia/IGujLamWDgRgcB+ Cl6LJNZIXRMPM5mKl+TRBAbvTvUFI0/i/WmMR/Q1OyokU3cPynwecBUk8n+cmPKg +dOfsfCSMgl5YFevMCea5J8Kd5OhxCPjPlJxhg4nF7k+7uGrUZ4MQvsp8MOzrJWz 4AoDzMtw30vXQyJuR9KnYG0YjBbpi7fHuk7bK0VvuxQj2KGsTuqsgG43p8PTRvsz +drvGuYmSt2CxiALlX6pHR3ku2/IuaAoKdtR87MLXxNwS9HqmfXhryKYsyz1p8bh XxMUi33Ga3fnaL6OTi1nq7dJA/MEM6w1gnBDAiL0QuFiCIX7EktH/xldYz7BAJ4r ln1GLkNBJzBS85AKcnbJrOo5uloqFfg6+xSQrBdbKWqmyKy+VXrn7w7Mlhtg6X+/ /byUWeJfgSvnV2hX6p2Q =fwim -----END PGP SIGNATURE----- --h22Fi9ANawrtbNPX-- From owner-freebsd-standards@FreeBSD.ORG Sun May 4 18:40:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAE7C805 for ; Sun, 4 May 2014 18:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 B78121354 for ; Sun, 4 May 2014 18:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s44Ie0ue000926 for ; Sun, 4 May 2014 18:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s44Ie0wA000925; Sun, 4 May 2014 18:40:00 GMT (envelope-from gnats) Date: Sun, 4 May 2014 18:40:00 GMT Message-Id: <201405041840.s44Ie0wA000925@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Joris Giovannangeli Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Joris Giovannangeli List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 18:40:01 -0000 The following reply was made to PR standards/189353; it has been noted by GNATS. From: Joris Giovannangeli To: Konstantin Belousov Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context Date: Sun, 04 May 2014 20:30:33 +0200 > Why didn't you provided both tests in the first report ? Because i wrote the second one after... > Do you have any further tests ? The patch below passes yours' two > and tools/regression/posixsem2. I tried to be modest with open(2) > syscalls, reusing the fd in sem_open(). This also should prevent > a race. This looks fine. I don't have any other tests, but you can use the posix test suite which has coverage for this API. From owner-freebsd-standards@FreeBSD.ORG Mon May 5 02:08:10 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1187EFB7 for ; Mon, 5 May 2014 02:08:10 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [131.155.140.104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 95A1B19F8 for ; Mon, 5 May 2014 02:08:08 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id A50363592FB; Mon, 5 May 2014 00:17:36 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 7349428497; Mon, 5 May 2014 00:17:36 +0200 (CEST) Date: Mon, 5 May 2014 00:17:36 +0200 From: Jilles Tjoelker To: Konstantin Belousov Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context Message-ID: <20140504221736.GA65318@stack.nl> References: <201405041830.s44IU1cI097827@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201405041830.s44IU1cI097827@freefall.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 02:08:10 -0000 On Sun, May 04, 2014 at 06:30:01PM +0000, Konstantin Belousov wrote: > The following reply was made to PR standards/189353; it has been noted > by GNATS. > From: Konstantin Belousov > To: Joris Giovannangeli > Cc: freebsd-gnats-submit@FreeBSD.org > Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the > semaphore in the process context > Date: Sun, 4 May 2014 21:23:56 +0300 > > It looks like glibc is using inodes numbers and dev number for that, > > which, while not being strictly correct (inodes can be reused), seems > > to work fine on linux. > Inode number + generation provides the same practical guarantee as the > file descriptor. You cannot have two inodes with the same (inum, gen) > simultaneously, generation would need some years to wrap. Unfortunately, st_gen is zeroed for users without PRIV_VFS_GENERATION (this is to make it harder to forge NFS file handles). As a result, it works less well for non-root users and may incorrectly not reuse a nameinfo if the process dropped root privileges between opens. Instead, you could use st_birthtim; since there is no specified API to set timestamps on semaphores, it should never change. On another note, I wonder whether the generation number or birth time is necessary at all. The old file is still open because it is mapped, so it will not be deleted completely. There can only be a problem if the filesystem's file identifier is larger than an ino_t and therefore the value in st_ino is truncated. > [snip] > diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c > index 9a2ab27..ed58de3 100644 > --- a/lib/libc/gen/sem_new.c > +++ b/lib/libc/gen/sem_new.c > [snip] > LIST_FOREACH(ni, &sem_list, next) { > - if (strcmp(name, ni->name) =3D=3D 0) { > + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) { > + fd =3D _open(path, flags | O_RDWR | O_CLOEXEC | > + O_EXLOCK, mode); > + if (fd =3D=3D -1 || _fstat(fd, &sb) =3D=3D -1) > + goto error; > + if (ni->dev !=3D sb.st_dev || > + ni->ino !=3D sb.st_ino || > + ni->gen !=3D sb.st_gen) { > + ni->name =3D NULL; > + ni =3D NULL; > + break; > + } > if ((flags & (O_CREAT|O_EXCL)) =3D=3D (O_CREAT|O_EXCL)) { If dev/ino/gen are reused and open with O_CREAT | O_EXCL succeeded, the semaphore was apparently recreated, so this check should be moved to the previous if. > - _pthread_mutex_unlock(&sem_llock); > - errno =3D EEXIST; > - return (SEM_FAILED); > + goto error; > } else { > ni->open_count++; > sem =3D ni->sem; > _pthread_mutex_unlock(&sem_llock); > + _close(fd); > return (sem); > } > } > } > [snip] > @@ -287,20 +302,32 @@ _sem_close(sem_t *sem) > int > _sem_unlink(const char *name) > { > + struct sem_nameinfo *ni; > char path[PATH_MAX]; > + int error; > =20 > if (name[0] !=3D '/') { > errno =3D ENOENT; > return -1; > } > name++; > - > strcpy(path, SEM_PREFIX); > if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { > errno =3D ENAMETOOLONG; > return (-1); > } > - return unlink(path); > + > + _pthread_once(&once, sem_module_init); > + _pthread_mutex_lock(&sem_llock); > + LIST_FOREACH(ni, &sem_list, next) { > + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) { > + ni->name =3D NULL; > + break; > + } > + } > + error =3D unlink(path); > + _pthread_mutex_unlock(&sem_llock); > + return (error); > } For efficiency and reduction of code paths, perhaps the loop over sem_list should be removed. It solves the reuse issue for sem_unlink() by the same process, but the fstat()-based code in sem_open() solves it for sem_unlink() by any process. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Mon May 5 03:24:00 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55AF6858 for ; Mon, 5 May 2014 03:24:00 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 139AB1651 for ; Mon, 5 May 2014 03:23:59 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 13377D6631E; Mon, 5 May 2014 13:23:51 +1000 (EST) Date: Mon, 5 May 2014 13:23:50 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context In-Reply-To: <20140504221736.GA65318@stack.nl> Message-ID: <20140505125518.N1229@besplex.bde.org> References: <201405041830.s44IU1cI097827@freefall.freebsd.org> <20140504221736.GA65318@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=eojmkOZX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=qf9-kXOrRskA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=q2iNgHpFIiEPlQtiQoAA:9 a=IlEH4ovqaXfvBIOp:21 a=py9sw7IzfpQxe7xA:21 a=CjuIK1q_8ugA:10 Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 03:24:00 -0000 On Mon, 5 May 2014, Jilles Tjoelker wrote: > On Sun, May 04, 2014 at 06:30:01PM +0000, Konstantin Belousov wrote: > ... >> > It looks like glibc is using inodes numbers and dev number for that, >> > which, while not being strictly correct (inodes can be reused), seems >> > to work fine on linux. >> Inode number + generation provides the same practical guarantee as the >> file descriptor. You cannot have two inodes with the same (inum, gen) >> simultaneously, generation would need some years to wrap. > > Unfortunately, st_gen is zeroed for users without PRIV_VFS_GENERATION > (this is to make it harder to forge NFS file handles). As a result, it > works less well for non-root users and may incorrectly not reuse a > nameinfo if the process dropped root privileges between opens. > > Instead, you could use st_birthtim; since there is no specified API to > set timestamps on semaphores, it should never change. To hijack this thread... setutimes() has support for setting btimes^Wbirthtimes if the caller passes a btime, but no callers pass a btime. It sets the btime to the mtime if the current btime is after the new mtime. Thus userland callers can intentionally change (or unintentionally corrupt) the btime by frobbing with the mtime. The MAC check in setutimes() doesn't support btimes even when they are passed. I recently used my hack for frobbing ctimes so as to store or restore them to consistent values in backups. It is not such a good hack as the btime one. I probably want backup backup programs to preserve btimes too, but currently don't notice their inconsistencies since my attribute checking program doesn't support them. It also doesn't support ACLs... futimes() works on file descriptors. Does it work on semaphores? All time-setting APIs still seem to be broken as designed, since they only support setting timevals but file times are timespecs. Thus it is impossible to back up, restore, or otherwise preserve file times in the general case. I mostly avoid this problem by not using high vfs.timestamp_precision values. If btimes are uses as identifiers, then they should use full timespec precision and not honor vfs.timestamp_precision, but then accidental corruption of them using standard APIs to "preserve" them is even easoer. Bruce From owner-freebsd-standards@FreeBSD.ORG Mon May 5 11:06:51 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 627ACF0B for ; Mon, 5 May 2014 11:06:51 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 4EFB01D00 for ; Mon, 5 May 2014 11:06:51 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s45B6pNt083260 for ; Mon, 5 May 2014 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s45B6oDt083258 for freebsd-standards@FreeBSD.org; Mon, 5 May 2014 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 May 2014 11:06:50 GMT Message-Id: <201405051106.s45B6oDt083258@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 11:06:51 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/189353 standards POSIX sem_unlink does not actually unlink the semaphor o stand/188316 standards [headers] Visibility of ntohl etc. and POSIX 2008 o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards [headers] stdlib.h doesn't define W* macros (e.g. WEXI o stand/185663 standards [libcxxrt] Bug in the libcxxrt version in FreeBSD 10.0 o stand/184694 standards [headers] gssapi.h does not define GSS_C_PRF_KEY_{FULL o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164793 standards [kern] RLIMIT_FSIZE does not work, affecting ftruncate p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/164049 standards [patch] getconf(1) returns bad value for ULLONG_MAX o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/78537 standards times(2) not functioning per the Posix spec o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/57911 standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_ o stand/56476 standards [cd9660] [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 54 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon May 5 18:27:13 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AED70784 for ; Mon, 5 May 2014 18:27:13 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 364EAE25 for ; Mon, 5 May 2014 18:27:13 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.8/8.14.8) with ESMTP id s45IR2Rr059116; Mon, 5 May 2014 21:27:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s45IR2Rr059116 Received: (from kostik@localhost) by tom.home (8.14.8/8.14.8/Submit) id s45IR2GF059115; Mon, 5 May 2014 21:27:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 May 2014 21:27:02 +0300 From: Konstantin Belousov To: Jilles Tjoelker Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context Message-ID: <20140505182702.GK74331@kib.kiev.ua> References: <201405041830.s44IU1cI097827@freefall.freebsd.org> <20140504221736.GA65318@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rnP2AJ7yb1j09OW/" Content-Disposition: inline In-Reply-To: <20140504221736.GA65318@stack.nl> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 18:27:13 -0000 --rnP2AJ7yb1j09OW/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 05, 2014 at 12:17:36AM +0200, Jilles Tjoelker wrote: > On Sun, May 04, 2014 at 06:30:01PM +0000, Konstantin Belousov wrote: > > The following reply was made to PR standards/189353; it has been noted > > by GNATS. >=20 > > From: Konstantin Belousov > > To: Joris Giovannangeli > > Cc: freebsd-gnats-submit@FreeBSD.org > > Subject: Re: standards/189353: POSIX sem_unlink does not actually unlin= k the > > semaphore in the process context > > Date: Sun, 4 May 2014 21:23:56 +0300 >=20 > > > It looks like glibc is using inodes numbers and dev number for that, > > > which, while not being strictly correct (inodes can be reused), seems > > > to work fine on linux. > > Inode number + generation provides the same practical guarantee as the > > file descriptor. You cannot have two inodes with the same (inum, gen) > > simultaneously, generation would need some years to wrap. >=20 > Unfortunately, st_gen is zeroed for users without PRIV_VFS_GENERATION > (this is to make it harder to forge NFS file handles). As a result, it > works less well for non-root users and may incorrectly not reuse a > nameinfo if the process dropped root privileges between opens. >=20 > Instead, you could use st_birthtim; since there is no specified API to > set timestamps on semaphores, it should never change. >=20 > On another note, I wonder whether the generation number or birth time is > necessary at all. The old file is still open because it is mapped, so it > will not be deleted completely. There can only be a problem if the > filesystem's file identifier is larger than an ino_t and therefore the > value in st_ino is truncated. I see. I just removed the gen from the semaphore structure. >=20 > > [snip] >=20 > > diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c > > index 9a2ab27..ed58de3 100644 > > --- a/lib/libc/gen/sem_new.c > > +++ b/lib/libc/gen/sem_new.c > > [snip] > > LIST_FOREACH(ni, &sem_list, next) { > > - if (strcmp(name, ni->name) =3D3D=3D3D 0) { > > + if (ni->name !=3D3D NULL && strcmp(name, ni->name) =3D3D=3D3D 0) { > > + fd =3D3D _open(path, flags | O_RDWR | O_CLOEXEC | > > + O_EXLOCK, mode); > > + if (fd =3D3D=3D3D -1 || _fstat(fd, &sb) =3D3D=3D3D -1) > > + goto error; > > + if (ni->dev !=3D3D sb.st_dev || > > + ni->ino !=3D3D sb.st_ino || > > + ni->gen !=3D3D sb.st_gen) { > > + ni->name =3D3D NULL; > > + ni =3D3D NULL; > > + break; > > + } > > if ((flags & (O_CREAT|O_EXCL)) =3D3D=3D3D (O_CREAT|O_EXCL)) { >=20 > If dev/ino/gen are reused and open with O_CREAT | O_EXCL succeeded, the > semaphore was apparently recreated, so this check should be moved to the > previous if. Agreed. >=20 > > - _pthread_mutex_unlock(&sem_llock); > > - errno =3D3D EEXIST; > > - return (SEM_FAILED); > > + goto error; > > } else { > > ni->open_count++; > > sem =3D3D ni->sem; > > _pthread_mutex_unlock(&sem_llock); > > + _close(fd); > > return (sem); > > } > > } > > } > > [snip] > > @@ -287,20 +302,32 @@ _sem_close(sem_t *sem) > > int > > _sem_unlink(const char *name) > > { > > + struct sem_nameinfo *ni; > > char path[PATH_MAX]; > > + int error; > > =3D20 > > if (name[0] !=3D3D '/') { > > errno =3D3D ENOENT; > > return -1; > > } > > name++; > > - > > strcpy(path, SEM_PREFIX); > > if (strlcat(path, name, sizeof(path)) >=3D3D sizeof(path)) { > > errno =3D3D ENAMETOOLONG; > > return (-1); > > } > > - return unlink(path); > > + > > + _pthread_once(&once, sem_module_init); > > + _pthread_mutex_lock(&sem_llock); > > + LIST_FOREACH(ni, &sem_list, next) { > > + if (ni->name !=3D3D NULL && strcmp(name, ni->name) =3D3D=3D3D 0) { > > + ni->name =3D3D NULL; > > + break; > > + } > > + } > > + error =3D3D unlink(path); > > + _pthread_mutex_unlock(&sem_llock); > > + return (error); > > } >=20 > For efficiency and reduction of code paths, perhaps the loop over > sem_list should be removed. It solves the reuse issue for sem_unlink() > by the same process, but the fstat()-based code in sem_open() solves it > for sem_unlink() by any process. Agreed again. What is left from the chunk is actually a style change, that will be committed separately. Updated patch below, thank you for the notes. diff --git a/lib/libc/gen/sem_new.c b/lib/libc/gen/sem_new.c index 9a2ab27..ec1a2fd 100644 --- a/lib/libc/gen/sem_new.c +++ b/lib/libc/gen/sem_new.c @@ -66,6 +66,8 @@ __weak_reference(_sem_wait, sem_wait); struct sem_nameinfo { int open_count; char *name; + dev_t dev; + ino_t ino; sem_t *sem; LIST_ENTRY(sem_nameinfo) next; }; @@ -151,37 +153,46 @@ _sem_open(const char *name, int flags, ...) return (SEM_FAILED); } name++; - + strcpy(path, SEM_PREFIX); + if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { + errno =3D ENAMETOOLONG; + return (SEM_FAILED); + } if (flags & ~(O_CREAT|O_EXCL)) { errno =3D EINVAL; return (SEM_FAILED); } - + if ((flags & O_CREAT) !=3D 0) { + va_start(ap, flags); + mode =3D va_arg(ap, int); + value =3D va_arg(ap, int); + va_end(ap); + } + fd =3D -1; _pthread_once(&once, sem_module_init); =20 _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { - if (strcmp(name, ni->name) =3D=3D 0) { - if ((flags & (O_CREAT|O_EXCL)) =3D=3D (O_CREAT|O_EXCL)) { - _pthread_mutex_unlock(&sem_llock); - errno =3D EEXIST; - return (SEM_FAILED); - } else { - ni->open_count++; - sem =3D ni->sem; - _pthread_mutex_unlock(&sem_llock); - return (sem); + if (ni->name !=3D NULL && strcmp(name, ni->name) =3D=3D 0) { + fd =3D _open(path, flags | O_RDWR | O_CLOEXEC | + O_EXLOCK, mode); + if (fd =3D=3D -1 || _fstat(fd, &sb) =3D=3D -1) + goto error; + if ((flags & (O_CREAT | O_EXCL)) =3D=3D (O_CREAT | + O_EXCL) || ni->dev !=3D sb.st_dev || + ni->ino !=3D sb.st_ino) { + ni->name =3D NULL; + ni =3D NULL; + break; } + ni->open_count++; + sem =3D ni->sem; + _pthread_mutex_unlock(&sem_llock); + _close(fd); + return (sem); } } =20 - if (flags & O_CREAT) { - va_start(ap, flags); - mode =3D va_arg(ap, int); - value =3D va_arg(ap, int); - va_end(ap); - } - len =3D sizeof(*ni) + strlen(name) + 1; ni =3D (struct sem_nameinfo *)malloc(len); if (ni =3D=3D NULL) { @@ -192,17 +203,11 @@ _sem_open(const char *name, int flags, ...) ni->name =3D (char *)(ni+1); strcpy(ni->name, name); =20 - strcpy(path, SEM_PREFIX); - if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { - errno =3D ENAMETOOLONG; - goto error; + if (fd =3D=3D -1) { + fd =3D _open(path, flags | O_RDWR | O_CLOEXEC | O_EXLOCK, mode); + if (fd =3D=3D -1 || _fstat(fd, &sb) =3D=3D -1) + goto error; } - - fd =3D _open(path, flags|O_RDWR|O_CLOEXEC|O_EXLOCK, mode); - if (fd =3D=3D -1) - goto error; - if (_fstat(fd, &sb)) - goto error; if (sb.st_size < sizeof(sem_t)) { sem_t tmp; =20 @@ -228,6 +233,8 @@ _sem_open(const char *name, int flags, ...) } ni->open_count =3D 1; ni->sem =3D sem; + ni->dev =3D sb.st_dev; + ni->ino =3D sb.st_ino; LIST_INSERT_HEAD(&sem_list, ni, next); _close(fd); _pthread_mutex_unlock(&sem_llock); @@ -294,13 +301,13 @@ _sem_unlink(const char *name) return -1; } name++; - strcpy(path, SEM_PREFIX); if (strlcat(path, name, sizeof(path)) >=3D sizeof(path)) { errno =3D ENAMETOOLONG; return (-1); } - return unlink(path); + + return (unlink(path)); } =20 int --rnP2AJ7yb1j09OW/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTZ9f1AAoJEJDCuSvBvK1B5U8P/2aQEwO6xCg0reK1Nfy0zKOB la2webOYgYZdlOq7vwKigkZXpRv3J9IgHNGBIcZqHqku4f405nLIQEsWOygZBbwA CNfEbv1eFK4Q1idsBrx1BLvzt7S1lttELzRodMuNBk+lJw/pFWSd+/6TJWBNzaqO nFc0C4d15bUigBohiNWTs1+syH6sDFcVJSkckl5eV9QOW2jBnhnxsnyaYIA2KyQ8 arpkkjFGMJktCotRDWnC3isnJeSN6FRcCoIOTYS7ylfvhkRAcwPKUQ29+DxDm5uT yfSBz5Fhokx+PRZU1h5F/XKn2VwNIIzh3wo3fllgw93OE+lCyptm59t8kvUpQ4gr wXj+P7Gcr3DI1YP9Zt52od2FGdlMrZ3S49xa3ZS8UUVbqtPG27WCqqKKVe++YjYs oYi0ibNLEMJDCYHXgukPjybc1vi+Q0xpLiPiY6RUbmLuhcBHKZicClETPnsVKZJQ AcdFn7otj84b0E0OllNZo3q73JwH5gzbYNEYpy+aPOFItC7DgWdm5/u+IuNle66X dszKnouKGtokpXKKjDpSpbQfqbn3B4giqvIRbTlD0KmHB9Htc/vdUDrysAPcgCh+ N7Gxhnl88087jGQnDYwS8M3WwaXo3JQKmoiLHI/byRouZsH6LiMi7apSplh6x+ER 7xFX5me5j9VmEZ1sECKr =4JPI -----END PGP SIGNATURE----- --rnP2AJ7yb1j09OW/-- From owner-freebsd-standards@FreeBSD.ORG Mon May 12 11:06:52 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31913C4A for ; Mon, 12 May 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 1E62A26DB for ; Mon, 12 May 2014 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CB6pe4067980 for ; Mon, 12 May 2014 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4CB6pwq067975 for freebsd-standards@FreeBSD.org; Mon, 12 May 2014 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 May 2014 11:06:51 GMT Message-Id: <201405121106.s4CB6pwq067975@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2014 11:06:52 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/189353 standards POSIX sem_unlink does not actually unlink the semaphor o stand/188316 standards [headers] Visibility of ntohl etc. and POSIX 2008 o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards [headers] stdlib.h doesn't define W* macros (e.g. WEXI o stand/185663 standards [libcxxrt] Bug in the libcxxrt version in FreeBSD 10.0 o stand/184694 standards [headers] gssapi.h does not define GSS_C_PRF_KEY_{FULL o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164793 standards [kern] RLIMIT_FSIZE does not work, affecting ftruncate p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/164049 standards [patch] getconf(1) returns bad value for ULLONG_MAX o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/78537 standards times(2) not functioning per the Posix spec o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/57911 standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_ o stand/56476 standards [cd9660] [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 54 problems total. From owner-freebsd-standards@FreeBSD.ORG Tue May 13 03:59:49 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A84EA8E; Tue, 13 May 2014 03:59:49 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 F180F266E; Tue, 13 May 2014 03:59:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4D3xmI8080785; Tue, 13 May 2014 03:59:48 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4D3xmeA080784; Tue, 13 May 2014 03:59:48 GMT (envelope-from linimon) Date: Tue, 13 May 2014 03:59:48 GMT Message-Id: <201405130359.s4D3xmeA080784@freefall.freebsd.org> To: dfilter@FreeBSD.ORG, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/189624: Re: standards/189353: commit references a PR X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2014 03:59:49 -0000 Old Synopsis: Re: standard/189353: commit references a PR New Synopsis: Re: standards/189353: commit references a PR State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Tue May 13 03:59:05 UTC 2014 State-Changed-Why: Misfiled followup to standards/189624; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Tue May 13 03:59:05 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=189624 From owner-freebsd-standards@FreeBSD.ORG Sat May 17 04:50:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5687E500 for ; Sat, 17 May 2014 04:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 426CC2D67 for ; Sat, 17 May 2014 04:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H4o1aK071159 for ; Sat, 17 May 2014 04:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4H4o1Y2071158; Sat, 17 May 2014 04:50:01 GMT (envelope-from gnats) Date: Sat, 17 May 2014 04:50:01 GMT Message-Id: <201405170450.s4H4o1Y2071158@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Nikolas Britton Subject: Re: standards/183652: make installkernel failure with installer provided ZFS configuration. Reply-To: Nikolas Britton X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 04:50:01 -0000 The following reply was made to PR standards/183652; it has been noted by GNATS. From: Nikolas Britton To: bug-followup@freebsd.org Cc: Subject: Re: standards/183652: make installkernel failure with installer provided ZFS configuration. Date: Fri, 16 May 2014 23:49:32 -0500 --001a11c2036499e69504f9914197 Content-Type: text/plain; charset=UTF-8 This bug is resolved in 10.0-RELEASE, please close. --001a11c2036499e69504f9914197 Content-Type: text/html; charset=UTF-8
This bug is resolved in 10.0-RELEASE, please close.
--001a11c2036499e69504f9914197-- From owner-freebsd-standards@FreeBSD.ORG Sat May 17 16:46:02 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1DFF156; Sat, 17 May 2014 16:46:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 9671023A7; Sat, 17 May 2014 16:46:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGk2Ga077858; Sat, 17 May 2014 16:46:02 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4HGk2Fu077857; Sat, 17 May 2014 16:46:02 GMT (envelope-from linimon) Date: Sat, 17 May 2014 16:46:02 GMT Message-Id: <201405171646.s4HGk2Fu077857@freefall.freebsd.org> To: dfilter@FreeBSD.ORG, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/189884: Re: standards/189353: commit references a PR X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:46:02 -0000 Old Synopsis: Re: standard/189353: commit references a PR New Synopsis: Re: standards/189353: commit references a PR State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Sat May 17 16:45:09 UTC 2014 State-Changed-Why: Misfiled followup to standards/189353; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Sat May 17 16:45:09 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=189884 From owner-freebsd-standards@FreeBSD.ORG Sat May 17 16:46:51 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E47A82AC; Sat, 17 May 2014 16:46:51 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 B8E1823AF; Sat, 17 May 2014 16:46:51 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGkp0V077928; Sat, 17 May 2014 16:46:51 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4HGkpjw077927; Sat, 17 May 2014 16:46:51 GMT (envelope-from linimon) Date: Sat, 17 May 2014 16:46:51 GMT Message-Id: <201405171646.s4HGkpjw077927@freefall.freebsd.org> To: dfilter@FreeBSD.ORG, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/189889: Re: standards/189353: commit references a PR X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:46:52 -0000 Old Synopsis: Re: standard/189353: commit references a PR New Synopsis: Re: standards/189353: commit references a PR State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Sat May 17 16:45:09 UTC 2014 State-Changed-Why: Misfiled followup to standards/189353; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Sat May 17 16:45:09 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=189889 From owner-freebsd-standards@FreeBSD.ORG Sat May 17 16:47:40 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D8702D6; Sat, 17 May 2014 16:47:40 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 E6A9223B1; Sat, 17 May 2014 16:47:39 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4HGldnO077999; Sat, 17 May 2014 16:47:39 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4HGldhW077998; Sat, 17 May 2014 16:47:39 GMT (envelope-from linimon) Date: Sat, 17 May 2014 16:47:39 GMT Message-Id: <201405171647.s4HGldhW077998@freefall.freebsd.org> To: joris@giovannangeli.fr, linimon@FreeBSD.org, freebsd-standards@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/189353: POSIX sem_unlink does not actually unlink the semaphore in the process context X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:47:40 -0000 Synopsis: POSIX sem_unlink does not actually unlink the semaphore in the process context State-Changed-From-To: open->open State-Changed-By: linimon State-Changed-When: Sat May 17 16:45:09 UTC 2014 State-Changed-Why: add misfiled PRs. Responsible-Changed-From-To: freebsd-standards->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Sat May 17 16:45:09 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=189353 From owner-freebsd-standards@FreeBSD.ORG Sun May 18 21:50:53 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3C1A9AC; Sun, 18 May 2014 21:50:53 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 591322F38; Sun, 18 May 2014 21:50:53 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 535DB3592EF; Sun, 18 May 2014 23:50:50 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 3801B28497; Sun, 18 May 2014 23:50:50 +0200 (CEST) Date: Sun, 18 May 2014 23:50:50 +0200 From: Jilles Tjoelker To: Bruce Evans Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 Message-ID: <20140518215050.GA8365@stack.nl> References: <201404061430.s36EUbFE092028@cgiserv.freebsd.org> <20140407024203.M6470@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140407024203.M6470@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-gnats-submit@freebsd.org, freebsd-standards@freebsd.org, Christian Neukirchen X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 21:50:53 -0000 On Mon, Apr 07, 2014 at 03:43:44AM +1000, Bruce Evans wrote: > On Sun, 6 Apr 2014, Christian Neukirchen wrote: > >> Description: > > According to POSIX 2008, the functions ntohl etc. are defined in > > > > (http://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html), > > which works because they are defined unconditionally there. > > However, just including should also define them > > (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html): > >> The htonl(), htons(), ntohl(), and ntohs() functions shall be available > >> as described in . Inclusion of the header may > >> also make visible all symbols from . > POSIX.1-2001 also says this. > > But ntohl etc are inside a "#if !defined(_KERNEL) && __BSD_VISIBLE" > > in , violating the "shall be" requirement above. > The requirement was somehow missed before. Probably due to its bad wording. > The bad wording "shall be available" is only used for namespaces twice in > POSIX.1-2001-draft7 (for {h_errno} in and for {ntoh*} in > . The normal wording is "shall be defined as described in > "). > >> How-To-Repeat: > > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > > (all good) > > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > > :2:12: warning: implicit declaration of function 'htonl' is invalid in C99 [-Wimplicit-function-declaration] > > int main(){htonl(1);} > > ^ > > 1 warning generated. > >> Fix: > > Guard the definition with __POSIX_VISIBLE >= 200112. > This is wrong too, and is inconsistent with where there > the symbols are defined unconditionally (if this wouldn't be redundant). > The correctness of this depends on the symbols being in a header that > doesn't exist in versions of POSIX that don't have the symbols. I > think it is indeed correct, because POSIX started specifying both the > symbols and the headers in 2001. Howver, the unconditional declarations > may be wrong for XSI, and aren't really right for BSD. In 4.4BSD, they > were declared unconditionally in via nested pollution from > , and were only declared in the POSIX headers as a > side effect of these headers being broken unless the application included > . Similarly in FreeBSD-1 (and Net/2?). Applications written > for this polluted API are no longer supported. However, the documented > API (byteorder.3) was that these functions are declared in . > It is now that these functions are declared in the 2 POSIX headers. So you propose to change the "#if !defined(_KERNEL) && __BSD_VISIBLE" conditional to "#ifndef _KERNEL"? This affects only old versions of POSIX (where may not be included anyway) and non-POSIX standard C (which does not define either). Note that there are other __POSIX_VISIBLE >= 200112 conditionals in , so the submitter's change may be more consistent, even if it is somehow wrong. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Sun May 18 22:00:01 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A161B29 for ; Sun, 18 May 2014 22:00:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 870A42F77 for ; Sun, 18 May 2014 22:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4IM01lR074042 for ; Sun, 18 May 2014 22:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4IM013Z074041; Sun, 18 May 2014 22:00:01 GMT (envelope-from gnats) Date: Sun, 18 May 2014 22:00:01 GMT Message-Id: <201405182200.s4IM013Z074041@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Jilles Tjoelker Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 Reply-To: Jilles Tjoelker X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2014 22:00:01 -0000 The following reply was made to PR standards/188316; it has been noted by GNATS. From: Jilles Tjoelker To: Bruce Evans Cc: Christian Neukirchen , freebsd-gnats-submit@freebsd.org, freebsd-standards@freebsd.org Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 Date: Sun, 18 May 2014 23:50:50 +0200 On Mon, Apr 07, 2014 at 03:43:44AM +1000, Bruce Evans wrote: > On Sun, 6 Apr 2014, Christian Neukirchen wrote: > >> Description: > > According to POSIX 2008, the functions ntohl etc. are defined in > > > > (http://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html), > > which works because they are defined unconditionally there. > > However, just including should also define them > > (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html): > >> The htonl(), htons(), ntohl(), and ntohs() functions shall be available > >> as described in . Inclusion of the header may > >> also make visible all symbols from . > POSIX.1-2001 also says this. > > But ntohl etc are inside a "#if !defined(_KERNEL) && __BSD_VISIBLE" > > in , violating the "shall be" requirement above. > The requirement was somehow missed before. Probably due to its bad wording. > The bad wording "shall be available" is only used for namespaces twice in > POSIX.1-2001-draft7 (for {h_errno} in and for {ntoh*} in > . The normal wording is "shall be defined as described in > "). > >> How-To-Repeat: > > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > > (all good) > > echo '#include \nint main(){htonl(1);}' | cc -D_XOPEN_SOURCE=700 -x c - > > :2:12: warning: implicit declaration of function 'htonl' is invalid in C99 [-Wimplicit-function-declaration] > > int main(){htonl(1);} > > ^ > > 1 warning generated. > >> Fix: > > Guard the definition with __POSIX_VISIBLE >= 200112. > This is wrong too, and is inconsistent with where there > the symbols are defined unconditionally (if this wouldn't be redundant). > The correctness of this depends on the symbols being in a header that > doesn't exist in versions of POSIX that don't have the symbols. I > think it is indeed correct, because POSIX started specifying both the > symbols and the headers in 2001. Howver, the unconditional declarations > may be wrong for XSI, and aren't really right for BSD. In 4.4BSD, they > were declared unconditionally in via nested pollution from > , and were only declared in the POSIX headers as a > side effect of these headers being broken unless the application included > . Similarly in FreeBSD-1 (and Net/2?). Applications written > for this polluted API are no longer supported. However, the documented > API (byteorder.3) was that these functions are declared in . > It is now that these functions are declared in the 2 POSIX headers. So you propose to change the "#if !defined(_KERNEL) && __BSD_VISIBLE" conditional to "#ifndef _KERNEL"? This affects only old versions of POSIX (where may not be included anyway) and non-POSIX standard C (which does not define either). Note that there are other __POSIX_VISIBLE >= 200112 conditionals in , so the submitter's change may be more consistent, even if it is somehow wrong. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Mon May 19 11:06:53 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86DD9552 for ; Mon, 19 May 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 737C52DCC for ; Mon, 19 May 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4JB6r66080176 for ; Mon, 19 May 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4JB6ru0080174 for freebsd-standards@FreeBSD.org; Mon, 19 May 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 19 May 2014 11:06:53 GMT Message-Id: <201405191106.s4JB6ru0080174@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/189353 standards POSIX sem_unlink does not actually unlink the semaphor o stand/188316 standards [headers] Visibility of ntohl etc. and POSIX 2008 o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards [headers] stdlib.h doesn't define W* macros (e.g. WEXI o stand/185663 standards [libcxxrt] Bug in the libcxxrt version in FreeBSD 10.0 o stand/184694 standards [headers] gssapi.h does not define GSS_C_PRF_KEY_{FULL o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164793 standards [kern] RLIMIT_FSIZE does not work, affecting ftruncate p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/164049 standards [patch] getconf(1) returns bad value for ULLONG_MAX o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/78537 standards times(2) not functioning per the Posix spec o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/57911 standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_ o stand/56476 standards [cd9660] [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 54 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon May 26 11:06:53 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 803D5F60 for ; Mon, 26 May 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 6C36624F3 for ; Mon, 26 May 2014 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QB6rLb032172 for ; Mon, 26 May 2014 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4QB6q2l032170 for freebsd-standards@FreeBSD.org; Mon, 26 May 2014 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 26 May 2014 11:06:52 GMT Message-Id: <201405261106.s4QB6q2l032170@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/189353 standards POSIX sem_unlink does not actually unlink the semaphor o stand/188316 standards [headers] Visibility of ntohl etc. and POSIX 2008 o stand/188036 standards mblen(3) in EUC locales causes crash and segmentation o stand/187378 standards [headers] stdlib.h doesn't define W* macros (e.g. WEXI o stand/185663 standards [libcxxrt] Bug in the libcxxrt version in FreeBSD 10.0 o stand/184694 standards [headers] gssapi.h does not define GSS_C_PRF_KEY_{FULL o stand/183654 standards FreeBSD 10 Beta2: Installer provided five times the am o stand/183652 standards make installkernel failure with installer provided ZFS o stand/179248 standards A return value of telldir(3) only seekable for once o stand/177742 standards conflict of dd's bs= option with use of conv=sparse o stand/176683 standards catman pages shall be stored in /var (/usr/local/var,/ o stand/176412 standards newfs writes by default, compare to bsdlabel/disklabel o stand/175711 standards When the server has more than 3 days, rising interrupt p stand/175453 standards Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 o stand/174938 standards Problem statement: iSCSI target failure o stand/173421 standards [libc] [patch] strptime() accepts formats that should o stand/173087 standards pax(1) does not support the pax interchange format o stand/172805 standards Fix catopen(3)'s EINVAL usage and document EFTYPE o stand/172276 standards POSIX: {get,set}groups gidsetsize is u_int not int o stand/172215 standards localeconv() grouping appears not to match POSIX o stand/170403 standards wrong ntohs expression type tickling clang o stand/169697 standards syslogd(8) is not BOM aware o stand/166349 standards Support the assignment-allocation character for fscanf o stand/164793 standards [kern] RLIMIT_FSIZE does not work, affecting ftruncate p stand/164787 standards dirfd() function not available when _POSIX_C_SOURCE is o kern/164674 standards [patch] [libc] vfprintf/vfwprintf return error (EOF) o o stand/164049 standards [patch] getconf(1) returns bad value for ULLONG_MAX o stand/162434 standards getaddrinfo: addrinfo.ai_family is an address family, o stand/150093 standards C++ std::locale support is broken o stand/130067 standards Wrong numeric limits in system headers? o stand/125751 standards man 3 pthread_getschedparam section ERRORS incomplete o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/78537 standards times(2) not functioning per the Posix spec o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( o stand/57911 standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) returns FNM_ o stand/56476 standards [cd9660] [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 54 problems total. From owner-freebsd-standards@FreeBSD.ORG Thu May 29 15:27:23 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47DFBF80; Thu, 29 May 2014 15:27:23 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 1EAD4259A; Thu, 29 May 2014 15:27:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4TFRMx7035879; Thu, 29 May 2014 15:27:22 GMT (envelope-from jilles@freefall.freebsd.org) Received: (from jilles@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4TFRMPk035878; Thu, 29 May 2014 15:27:22 GMT (envelope-from jilles) Date: Thu, 29 May 2014 15:27:22 GMT Message-Id: <201405291527.s4TFRMPk035878@freefall.freebsd.org> To: chneukirchen@gmail.com, jilles@FreeBSD.org, freebsd-standards@FreeBSD.org, jilles@FreeBSD.org From: jilles@FreeBSD.org Subject: Re: standards/188316: [headers] Visibility of ntohl etc. and POSIX 2008 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 15:27:23 -0000 Synopsis: [headers] Visibility of ntohl etc. and POSIX 2008 State-Changed-From-To: open->patched State-Changed-By: jilles State-Changed-When: Thu May 29 15:26:56 UTC 2014 State-Changed-Why: Committed to 11-current, thanks! Responsible-Changed-From-To: freebsd-standards->jilles Responsible-Changed-By: jilles Responsible-Changed-When: Thu May 29 15:26:56 UTC 2014 Responsible-Changed-Why: I committed the change. http://www.freebsd.org/cgi/query-pr.cgi?pr=188316 From owner-freebsd-standards@FreeBSD.ORG Thu May 29 16:17:16 2014 Return-Path: Delivered-To: freebsd-standards@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4F84334; Thu, 29 May 2014 16:17:16 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 9BE4E2A8D; Thu, 29 May 2014 16:17:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4TGHGJj051426; Thu, 29 May 2014 16:17:16 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4TGHGps051425; Thu, 29 May 2014 16:17:16 GMT (envelope-from linimon) Date: Thu, 29 May 2014 16:17:16 GMT Message-Id: <201405291617.s4TGHGps051425@freefall.freebsd.org> To: dfilter@FreeBSD.ORG, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-standards@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: standards/190373: Re: standards/188316: commit references a PR X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 16:17:16 -0000 Old Synopsis: Re: standard/188316: commit references a PR New Synopsis: Re: standards/188316: commit references a PR State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Thu May 29 16:16:40 UTC 2014 State-Changed-Why: Misfiled followup to standards/188316; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-standards Responsible-Changed-By: linimon Responsible-Changed-When: Thu May 29 16:16:40 UTC 2014 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=190373 From owner-freebsd-standards@FreeBSD.ORG Sat May 31 14:04:25 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDD7DFC; Sat, 31 May 2014 14:04:25 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 9031E2C06; Sat, 31 May 2014 14:04:25 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 778F91A1ECB; Sat, 31 May 2014 23:35:52 +1000 (EST) Date: Sat, 31 May 2014 23:35:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 In-Reply-To: <20140518215050.GA8365@stack.nl> Message-ID: <20140531224728.G1905@besplex.bde.org> References: <201404061430.s36EUbFE092028@cgiserv.freebsd.org> <20140407024203.M6470@besplex.bde.org> <20140518215050.GA8365@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=U6SrU4bu c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=xzXVF2VtB1oA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=1KXvEyHEul4y2PPbTlcA:9 a=CjuIK1q_8ugA:10 Cc: freebsd-gnats-submit@freebsd.org, freebsd-standards@freebsd.org, Christian Neukirchen X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2014 14:04:25 -0000 I finally got back to this. On Sun, 18 May 2014, Jilles Tjoelker wrote: > On Mon, Apr 07, 2014 at 03:43:44AM +1000, Bruce Evans wrote: >> On Sun, 6 Apr 2014, Christian Neukirchen wrote: >>>> Fix: >>> Guard the definition with __POSIX_VISIBLE >= 200112. > >> This is wrong too, and is inconsistent with where there >> the symbols are defined unconditionally (if this wouldn't be redundant). >> The correctness of this depends on the symbols being in a header that >> doesn't exist in versions of POSIX that don't have the symbols. I > ... > So you propose to change the "#if !defined(_KERNEL) && __BSD_VISIBLE" > conditional to "#ifndef _KERNEL"? This affects only old versions of > POSIX (where may not be included anyway) and non-POSIX > standard C (which does not define either). > Note that there are other __POSIX_VISIBLE >= 200112 conditionals in > , so the submitter's change may be more consistent, even > if it is somehow wrong. I see you committed a version that changed to a __POSIX_VISIBLE conditional. There were only 2 _POSIX_VISIBLE conditionals. They were mostly for ipv6 things, so removing them won't expose many problematic symbols. I'm surprised POSIX had so much support for ipv6 in 2001. The ipv6 extensions are in mostly in netinet6/in6.h. They are fairly carefully ifdefed, and of course are mostly spelled with a '6' to keep them separate from ipv4 names (which are mostly not spelled with a '4'). Unfortunately, their namspace isn't very consistent. POSIX reserves mainly IP6, IPV6_, IN6_, in6_, s6_ and sin6_ as prefixes, and still has special cases like sockaddr_in6 and in6addr_any where the '6' is not part of a prefix or not followed by an underscores. FreeBSD extensions extend the mess, e.g., by using inet6_ instead of in6_ as a prefix for most functions. POSIX avoided the corresponding mistake for ipv4 (the alternative spellings in_ and inet_) for the lower case versions, and avoided reserving INET6_ as a prefix (it is only used for special cases like AF_INET6). Bruce From owner-freebsd-standards@FreeBSD.ORG Mon Jun 2 08:48:46 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C0AAC86 for ; Mon, 2 Jun 2014 08:48:46 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 333982A05 for ; Mon, 2 Jun 2014 08:48:46 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s528mkKL005140 for ; Mon, 2 Jun 2014 09:48:46 +0100 (BST) (envelope-from no-reply-bugzilla-daemon@freebsd.org) From: no-reply-bugzilla-daemon@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 172215] localeconv() grouping appears not to match POSIX Date: Mon, 02 Jun 2014 08:48:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 9.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 08:48:46 -0000 http://bugs.freebsd.org/bugzilla/show_bug.cgi?id=172215 David Chisnall changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |theraven@FreeBSD.org --- Comment #1 from David Chisnall --- This looks correct, and may account for a couple of the libc++ test failures. I'm not sure what the ports fallout for the fix would be though. The -1, "" case seems more sensible because it means that callers don't need to special case the no-grouping case (-1, "" means treat all remaining characters as having no grouping) -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jun 2 08:50:04 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA9F0CB6 for ; Mon, 2 Jun 2014 08:50:04 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D224B2A0F for ; Mon, 2 Jun 2014 08:50:04 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s528o4iG006096 for ; Mon, 2 Jun 2014 09:50:04 +0100 (BST) (envelope-from no-reply-bugzilla-daemon@freebsd.org) From: no-reply-bugzilla-daemon@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 150093] C++ std::locale support is broken Date: Mon, 02 Jun 2014 08:50:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 8.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: Issue Resolved X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 08:50:05 -0000 http://bugs.freebsd.org/bugzilla/show_bug.cgi?id=150093 David Chisnall changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Issue Resolved CC| |theraven@FreeBSD.org Resolution|--- |FIXED --- Comment #1 from David Chisnall --- In FreeBSD 9.1, the POSIX2008 extended locale additions (and some Darwin extensions) were added to libc. libc++ uses them and we pass almost all of its locale-specific tests (the remainder need triaging, but at least some are bugs in the tests). -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Wed Jun 4 08:00:16 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CFC71F3 for ; Wed, 4 Jun 2014 08:00:16 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B7692253 for ; Wed, 4 Jun 2014 08:00:16 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5480GAp050088 for ; Wed, 4 Jun 2014 09:00:16 +0100 (BST) (envelope-from bz-noreply@freebsd.org) Message-Id: <201406040800.s5480GAp050088@kenobi.freebsd.org> From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Wed, 04 Jun 2014 08:00:16 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 08:00:16 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is an experimental feature. Please file a bug or mail bugmeister@ with concerns. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 175453: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175453 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 From owner-freebsd-standards@FreeBSD.ORG Thu Jun 5 08:00:14 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 510A679B for ; Thu, 5 Jun 2014 08:00:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 401192B52 for ; Thu, 5 Jun 2014 08:00:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5580EOX039710 for ; Thu, 5 Jun 2014 09:00:14 +0100 (BST) (envelope-from bz-noreply@freebsd.org) Message-Id: <201406050800.s5580EOX039710@kenobi.freebsd.org> From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Thu, 05 Jun 2014 08:00:14 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2014 08:00:14 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is an experimental feature. Please file a bug or mail bugmeister@ with concerns. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 175453: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175453 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 From owner-freebsd-standards@FreeBSD.ORG Fri Jun 6 08:00:14 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5406B448 for ; Fri, 6 Jun 2014 08:00:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42CC521C8 for ; Fri, 6 Jun 2014 08:00:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5680E3G090927 for ; Fri, 6 Jun 2014 09:00:14 +0100 (BST) (envelope-from bz-noreply@freebsd.org) Message-Id: <201406060800.s5680E3G090927@kenobi.freebsd.org> From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Fri, 06 Jun 2014 08:00:14 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 08:00:14 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is an experimental feature. Please file a bug or mail bugmeister@ with concerns. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 175453: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175453 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 From owner-freebsd-standards@FreeBSD.ORG Fri Jun 6 08:05:45 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 569817BB for ; Fri, 6 Jun 2014 08:05:45 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D70C22B8 for ; Fri, 6 Jun 2014 08:05:45 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5685j1l031382 for ; Fri, 6 Jun 2014 09:05:45 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 175453] Catching C++ std::bad_cast doesn't work in FreeBSD 9.1 Date: Fri, 06 Jun 2014 08:05:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 9.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: Issue Resolved X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 08:05:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175453 David Chisnall changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs MFC |Issue Resolved CC| |theraven@FreeBSD.org Resolution|--- |FIXED --- Comment #6 from David Chisnall --- As per previous comment, merged to 9-STABLE prior to 9.2 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sun Jun 8 10:08:57 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C8C776C for ; Sun, 8 Jun 2014 10:08:57 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 540CB260F for ; Sun, 8 Jun 2014 10:08:57 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s58A8vSI050230 for ; Sun, 8 Jun 2014 11:08:57 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 190787] New: OCZ-AGILITY3 SSD Not Detected Date: Sun, 08 Jun 2014 10:08:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: aabienkowski@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 10:08:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190787 Bug ID: 190787 Summary: OCZ-AGILITY3 SSD Not Detected Product: Base System Version: 10.0-RELEASE Hardware: Any OS: Any Status: Needs Triage Severity: Affects Many People Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: aabienkowski@gmail.com Created attachment 143521 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=143521&action=edit Timeout when detecting SSD Currently on FreeBSD 9.0-RELEASE-p6. Can't upgrade because any newer release of FreeBSD I've tried does not recognize my SSD drive, and makes system unusable. SSD OCZ-AGILITY3 2.25 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sun Jun 8 10:09:58 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 273367A0 for ; Sun, 8 Jun 2014 10:09:58 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E97B2619 for ; Sun, 8 Jun 2014 10:09:58 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s58A9vJ0050649 for ; Sun, 8 Jun 2014 11:09:57 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 190787] OCZ-AGILITY3 SSD Not Detected Date: Sun, 08 Jun 2014 10:09:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: aabienkowski@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 10:09:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190787 --- Comment #1 from aabienkowski@gmail.com --- Created attachment 143522 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=143522&action=edit Full dmesg output -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sun Jun 8 10:10:48 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 687997CE for ; Sun, 8 Jun 2014 10:10:48 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD062687 for ; Sun, 8 Jun 2014 10:10:48 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s58AAmDW052387 for ; Sun, 8 Jun 2014 11:10:48 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 190787] OCZ-AGILITY3 SSD Not Detected Date: Sun, 08 Jun 2014 10:10:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: aabienkowski@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 10:10:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190787 --- Comment #2 from aabienkowski@gmail.com --- Created attachment 143523 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=143523&action=edit pciconf output -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sun Jun 8 10:11:11 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3DD17FB for ; Sun, 8 Jun 2014 10:11:11 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB81B268F for ; Sun, 8 Jun 2014 10:11:11 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s58ABBA1056168 for ; Sun, 8 Jun 2014 11:11:11 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 190787] OCZ-AGILITY3 SSD Not Detected Date: Sun, 08 Jun 2014 10:11:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc component assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jun 2014 10:11:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190787 David Chisnall changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |theraven@FreeBSD.org Component|standards |kern Assignee|freebsd-standards@FreeBSD.o |freebsd-bugs@FreeBSD.org |rg | --- Comment #3 from David Chisnall --- Reassign. This is a kernel bug, not a standards issue. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jun 9 08:00:13 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD93F64C for ; Mon, 9 Jun 2014 08:00:13 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B281327E7 for ; Mon, 9 Jun 2014 08:00:13 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5980Dhf057253 for ; Mon, 9 Jun 2014 09:00:13 +0100 (BST) (envelope-from bz-noreply@freebsd.org) Message-Id: <201406090800.s5980Dhf057253@kenobi.freebsd.org> From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 09 Jun 2014 08:00:13 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 08:00:13 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (1 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined From owner-freebsd-standards@FreeBSD.ORG Mon Jun 9 09:19:54 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66CC8FB for ; Mon, 9 Jun 2014 09:19:54 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6942FC9 for ; Mon, 9 Jun 2014 09:19:54 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s599Js41011230 for ; Mon, 9 Jun 2014 10:19:54 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 188036] mblen(3) in EUC locales causes crash and segmentation fault. Date: Mon, 09 Jun 2014 09:19:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 9.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: Needs MFC X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 09:19:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188036 David Chisnall changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs MFC CC| |theraven@FreeBSD.org --- Comment #4 from David Chisnall --- In head, needs MFC. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jun 12 22:24:15 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97199DA; Thu, 12 Jun 2014 22:24:15 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 58AF82FCB; Thu, 12 Jun 2014 22:24:15 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 04F23B806D; Fri, 13 Jun 2014 00:24:12 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id D7D3528497; Fri, 13 Jun 2014 00:24:11 +0200 (CEST) Date: Fri, 13 Jun 2014 00:24:11 +0200 From: Jilles Tjoelker To: Bruce Evans Subject: Re: standards/188316: Visibility of ntohl etc. and POSIX 2008 Message-ID: <20140612222411.GB171@stack.nl> References: <201404061430.s36EUbFE092028@cgiserv.freebsd.org> <20140407024203.M6470@besplex.bde.org> <20140518215050.GA8365@stack.nl> <20140531224728.G1905@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140531224728.G1905@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-gnats-submit@freebsd.org, freebsd-standards@freebsd.org, Christian Neukirchen X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 22:24:15 -0000 On Sat, May 31, 2014 at 11:35:43PM +1000, Bruce Evans wrote: > I finally got back to this. > On Sun, 18 May 2014, Jilles Tjoelker wrote: > > On Mon, Apr 07, 2014 at 03:43:44AM +1000, Bruce Evans wrote: > >> On Sun, 6 Apr 2014, Christian Neukirchen wrote: > >>>> Fix: > >>> Guard the definition with __POSIX_VISIBLE >= 200112. > >> This is wrong too, and is inconsistent with where there > >> the symbols are defined unconditionally (if this wouldn't be redundant). > >> The correctness of this depends on the symbols being in a header that > >> doesn't exist in versions of POSIX that don't have the symbols. I > > ... > > So you propose to change the "#if !defined(_KERNEL) && __BSD_VISIBLE" > > conditional to "#ifndef _KERNEL"? This affects only old versions of > > POSIX (where may not be included anyway) and non-POSIX > > standard C (which does not define either). > > Note that there are other __POSIX_VISIBLE >= 200112 conditionals in > > , so the submitter's change may be more consistent, even > > if it is somehow wrong. > I see you committed a version that changed to a __POSIX_VISIBLE conditional. > There were only 2 _POSIX_VISIBLE conditionals. They were mostly for > ipv6 things, so removing them won't expose many problematic symbols. > I'm surprised POSIX had so much support for ipv6 in 2001. The ipv6 > extensions are in mostly in netinet6/in6.h. They are fairly carefully > ifdefed, and of course are mostly spelled with a '6' to keep them > separate from ipv4 names (which are mostly not spelled with a '4'). > Unfortunately, their namspace isn't very consistent. POSIX reserves > mainly IP6, IPV6_, IN6_, in6_, s6_ and sin6_ as prefixes, and still > has special cases like sockaddr_in6 and in6addr_any where the '6' is not > part of a prefix or not followed by an underscores. FreeBSD extensions > extend the mess, e.g., by using inet6_ instead of in6_ as a prefix for > most functions. POSIX avoided the corresponding mistake for ipv4 (the > alternative spellings in_ and inet_) for the lower case versions, and > avoided reserving INET6_ as a prefix (it is only used for special cases > like AF_INET6). I guess the _POSIX_VISIBLE conditionals are to allow matching RFC 1700 in strict C standard mode, or for compliance to IEEE 1003.1g-2000 (the socket extension to POSIX.1-1996). Both of these are obsolete, so support could be removed. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Sun Jun 15 07:38:51 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69B15FC for ; Sun, 15 Jun 2014 07:38:51 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 515BD2AC1 for ; Sun, 15 Jun 2014 07:38:51 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5F7cpIl000849 for ; Sun, 15 Jun 2014 08:38:51 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 116081] make does not work with the directive sinclude Date: Sun, 15 Jun 2014 07:38:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 07:38:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=116081 yaneurabeya@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yaneurabeya@gmail.com --- Comment #2 from yaneurabeya@gmail.com --- This feature is available in later versions of fmake and in bmake (which is now the default make in 11-CURRENT). Please mark this bug resolved fixed. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sun Jun 15 10:28:10 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98F28943 for ; Sun, 15 Jun 2014 10:28:10 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8092427C5 for ; Sun, 15 Jun 2014 10:28:10 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5FASAsZ026681 for ; Sun, 15 Jun 2014 11:28:10 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 116081] make does not work with the directive sinclude Date: Sun, 15 Jun 2014 10:28:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc component assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 10:28:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=116081 David Chisnall changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |theraven@FreeBSD.org Component|standards |misc Assignee|freebsd-standards@FreeBSD.o |freebsd-bugs@FreeBSD.org |rg | --- Comment #3 from David Chisnall --- POSIX does not describe *any* mechanism for includes in Makefiles, so reassigning this from standards. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jun 16 08:00:14 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFF81241 for ; Mon, 16 Jun 2014 08:00:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E2562326 for ; Mon, 16 Jun 2014 08:00:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5G80Eiq072252 for ; Mon, 16 Jun 2014 09:00:14 +0100 (BST) (envelope-from bz-noreply@freebsd.org) Message-Id: <201406160800.s5G80Eiq072252@kenobi.freebsd.org> From: bz-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 16 Jun 2014 08:00:14 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 08:00:14 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 188036: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188036 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: mblen(3) in EUC locales causes crash and segmentation fault. From owner-freebsd-standards@FreeBSD.ORG Thu Jun 19 05:48:02 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2ED1F44A for ; Thu, 19 Jun 2014 05:48:02 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A25A02918 for ; Thu, 19 Jun 2014 05:48:00 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.8/8.14.8) with ESMTP id s5J5lhD8033907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 19 Jun 2014 13:47:44 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.8/8.14.8/Submit) id s5J5lhVP033906 for freebsd-standards@freebsd.org; Thu, 19 Jun 2014 13:47:43 +0800 (CST) (envelope-from kevlo) Date: Thu, 19 Jun 2014 13:47:43 +0800 From: Kevin Lo To: freebsd-standards@freebsd.org Subject: Is AF_UNIX really deprecated? Message-ID: <20140619054743.GA33893@ns.kevlo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 05:48:02 -0000 Hi, IEEE Std 1003.1g-2000 and later POSIX standards [1] do not include AF_LOCAL and mention only AF_UNIX, but according to socket(2) man page it mentions AF_UNIX is deprecated, use AF_LOCAL instead. I'd like to add support -f local to netstat(1), I'm wondering if AF_UNIX is really deprecated. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html Thanks, Kevin From owner-freebsd-standards@FreeBSD.ORG Thu Jun 19 12:25:02 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84658A69; Thu, 19 Jun 2014 12:25:02 +0000 (UTC) Received: from cursor.its.uu.se (smtp-out2.uu.se [130.238.7.173]) (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 12F032A15; Thu, 19 Jun 2014 12:25:01 +0000 (UTC) Received: from e-mailfilter01.sunet.se (e-mailfilter01.sunet.se [192.36.171.201]) by cursor.its.uu.se (Postfix) with ESMTP id 0E662615; Thu, 19 Jun 2014 14:18:27 +0200 (CEST) Received: from lyra.its.uu.se (lyra.its.uu.se [130.238.7.73]) by e-mailfilter01.sunet.se (8.14.4/8.14.4/Debian-4) with ESMTP id s5JCIQ5J022792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 Jun 2014 14:18:26 +0200 Received: from caligata.its.uu.se (caligata.its.uu.se [130.238.7.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lyra.its.uu.se (Postfix) with ESMTPS id 6FF223963E; Thu, 19 Jun 2014 14:18:26 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.3 lyra.its.uu.se 6FF223963E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uu.se; s=centralsmtp; t=1403180306; i=@uu.se; bh=45Gaz90Tvr6Cueiz6GIkadpxWVZtuJ/sif4tmSCaaBY=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=j2TzFbxRpqnbC23kR2CS013Vmds0X7Fu4T1tJHkRw5RPR2fE+B5eTCmHZC2UG2kUl 8XBZ6aJoM0ITIpZxcDtO8pWEZPfj/yZOF9acuiFsKkC+yZmlZf3sPtXR1SzoSj/nZJ F38z4u7SdEZWJw12s2m1Z79lKFPCN/Nc43c2haCw= Received: from jubula (localhost.localdomain [127.0.0.1]) by caligata.its.uu.se (8.13.8/8.13.8) with ESMTP id s5JCIQPs032371; Thu, 19 Jun 2014 14:18:26 +0200 Received: from h-197-74.a213.corp.bahnhof.se (h-197-74.a213.corp.bahnhof.se [85.24.197.74]) by webmail.uu.se (Horde Framework) with HTTP; Thu, 19 Jun 2014 14:18:26 +0200 Message-ID: <20140619141826.14853fw0x3yysf0y@webmail.uu.se> Date: Thu, 19 Jun 2014 14:18:26 +0200 From: Erik Trulsson To: Kevin Lo Subject: Re: Is AF_UNIX really deprecated? References: <20140619054743.GA33893@ns.kevlo.org> In-Reply-To: <20140619054743.GA33893@ns.kevlo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.9) X-Bayes-Prob: 0.9868 (Score 5, tokens from: outbound, outbound-uu-se:default, uu-se:default, base:default, @@RPTN) X-Spam-Score: 4.90 (****) [Tag at 15.00] T_RP_MATCHES_RCVD:-0.1, Bayes(0.9868:5.0) X-p0f-Info: os=Linux 2.6.x, link=Ethernet or modem X-CanIt-Geo: ip=130.238.7.81; country=SE; region=Uppsala; city=Uppsala; latitude=59.8667; longitude=17.6333; http://maps.google.com/maps?q=59.8667,17.6333&z=6 X-CanItPRO-Stream: outbound-uu-se:outbound (inherits from outbound-uu-se:default, uu-se:default, base:default) X-Canit-Stats-ID: 09MgciqcE - 862704254559 - 20140619 X-Antispam-Training-Forget: https://mailfilter.sunet.se/canit/b.php?i=09MgciqcE&m=862704254559&t=20140619&c=f X-Antispam-Training-Nonspam: https://mailfilter.sunet.se/canit/b.php?i=09MgciqcE&m=862704254559&t=20140619&c=n X-Antispam-Training-Spam: https://mailfilter.sunet.se/canit/b.php?i=09MgciqcE&m=862704254559&t=20140619&c=s X-CanIt-Archive-Cluster: PfMRe/vJWMiXwM2YIH5BVExnUnw X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.36.171.201 Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 12:25:02 -0000 Quoting Kevin Lo : > Hi, > > IEEE Std 1003.1g-2000 and later POSIX standards [1] do not include > AF_LOCAL and mention only AF_UNIX, but according to socket(2) man page it > mentions AF_UNIX is deprecated, use AF_LOCAL instead. > > I'd like to add support -f local to netstat(1), I'm wondering if AF_UNIX > is really deprecated. > > [1] > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html > > Thanks, > Kevin From what I can see the socket(2) manpage does not say anything at all about AF_UNIX - it talks about PF_UNIX and PF_LOCAL - which happen to have the same values as the corresponding AF_ defines. (It is also worth mentioning that AF_UNIX and AF_LOCAL have the same value, so on FreeBSD (and Linux for that matter) it does not matter which of those four you use - they all have the same numerical value.) Historically there seems to have been quite a bit of confusion over which variant to use (with the _LOCAL variant probably being older than _UNIX) but as you note the latest POSIX standard only mentions AF_UNIX so I suggest you use that one. (It is also perhaps worth mentioning that the socket(2) manpage has preferred PF_LOCAL over PF_UNIX for more than a decade now. I suspect neither is going away any time soon.) From owner-freebsd-standards@FreeBSD.ORG Thu Jun 19 15:35:17 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D64188BE for ; Thu, 19 Jun 2014 15:35:17 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDB092CA8 for ; Thu, 19 Jun 2014 15:35:17 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5JFZHwD063385 for ; Thu, 19 Jun 2014 16:35:17 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 173421] [libc] [patch] strptime() accepts formats that should be rejected Date: Thu, 19 Jun 2014 15:35:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pfg@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.ispatch Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 15:35:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=173421 Pedro F. Giffuni changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129434|0 |1 is patch| | -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jun 19 15:37:58 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6DA0928 for ; Thu, 19 Jun 2014 15:37:58 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEB9E2CCD for ; Thu, 19 Jun 2014 15:37:58 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5JFbw3v090407 for ; Thu, 19 Jun 2014 16:37:58 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 173421] [libc] [patch] strptime() accepts formats that should be rejected Date: Thu, 19 Jun 2014 15:37:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pfg@FreeBSD.org X-Bugzilla-Status: Needs MFC X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 15:37:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=173421 Pedro F. Giffuni changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs MFC CC| |pfg@FreeBSD.org --- Comment #1 from Pedro F. Giffuni --- The change was included as part of r173421 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jun 19 15:38:32 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEE45956 for ; Thu, 19 Jun 2014 15:38:32 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C67E72CD2 for ; Thu, 19 Jun 2014 15:38:32 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5JFcWWE096894 for ; Thu, 19 Jun 2014 16:38:32 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 173421] [libc] [patch] strptime() accepts formats that should be rejected Date: Thu, 19 Jun 2014 15:38:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pfg@FreeBSD.org X-Bugzilla-Status: Needs MFC X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: pfg@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 15:38:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=173421 Pedro F. Giffuni changed: What |Removed |Added ---------------------------------------------------------------------------- CC|pfg@FreeBSD.org | Assignee|freebsd-standards@FreeBSD.o |pfg@FreeBSD.org |rg | -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jun 19 16:16:32 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 838FCA15; Thu, 19 Jun 2014 16:16:32 +0000 (UTC) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [IPv6:2001:470:8b2d:1e1c:21b:21ff:feb8:d7b0]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "khavrinen.csail.mit.edu", Issuer "Client CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4595A20A4; Thu, 19 Jun 2014 16:16:32 +0000 (UTC) Received: from khavrinen.csail.mit.edu (localhost [127.0.0.1]) by khavrinen.csail.mit.edu (8.14.7/8.14.7) with ESMTP id s5JGGU1r063061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL CN=khavrinen.csail.mit.edu issuer=Client+20CA); Thu, 19 Jun 2014 12:16:30 -0400 (EDT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.14.7/8.14.7/Submit) id s5JGGU3Y063058; Thu, 19 Jun 2014 12:16:30 -0400 (EDT) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21411.3294.418186.992207@khavrinen.csail.mit.edu> Date: Thu, 19 Jun 2014 12:16:30 -0400 From: Garrett Wollman To: Kevin Lo Subject: Is AF_UNIX really deprecated? In-Reply-To: <20140619054743.GA33893@ns.kevlo.org> References: <20140619054743.GA33893@ns.kevlo.org> X-Mailer: VM 7.17 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (khavrinen.csail.mit.edu [127.0.0.1]); Thu, 19 Jun 2014 12:16:30 -0400 (EDT) Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 16:16:32 -0000 < said: > IEEE Std 1003.1g-2000 and later POSIX standards [1] do not include > AF_LOCAL and mention only AF_UNIX, but according to socket(2) man page it > mentions AF_UNIX is deprecated, use AF_LOCAL instead. > I'd like to add support -f local to netstat(1), I'm wondering if AF_UNIX > is really deprecated. AF_UNIX was deprecated in 4.4BSD (or maybe 4.3-net/2) due to issues with the Unix trademark. However, POSIX standardized it anyway (much later), and since POSIX standardization is now handled by the organization that owns the Unix trademark this is probably no longer an issue. -GAWollman From owner-freebsd-standards@FreeBSD.ORG Fri Jun 20 04:48:21 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97E2E388 for ; Fri, 20 Jun 2014 04:48:21 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AF624222B for ; Fri, 20 Jun 2014 04:48:20 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.8/8.14.8) with ESMTP id s5K2rJhq039588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 20 Jun 2014 10:53:19 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.8/8.14.8/Submit) id s5K2rICa039587; Fri, 20 Jun 2014 10:53:18 +0800 (CST) (envelope-from kevlo) Date: Fri, 20 Jun 2014 10:53:18 +0800 From: Kevin Lo To: Garrett Wollman Subject: Re: Is AF_UNIX really deprecated? Message-ID: <20140620025318.GA39576@ns.kevlo.org> References: <20140619054743.GA33893@ns.kevlo.org> <21411.3294.418186.992207@khavrinen.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21411.3294.418186.992207@khavrinen.csail.mit.edu> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 04:48:21 -0000 On Thu, Jun 19, 2014 at 12:16:30PM -0400, Garrett Wollman wrote: > > < said: > > > IEEE Std 1003.1g-2000 and later POSIX standards [1] do not include > > AF_LOCAL and mention only AF_UNIX, but according to socket(2) man page it > > mentions AF_UNIX is deprecated, use AF_LOCAL instead. > > > I'd like to add support -f local to netstat(1), I'm wondering if AF_UNIX > > is really deprecated. > > AF_UNIX was deprecated in 4.4BSD (or maybe 4.3-net/2) due to issues > with the Unix trademark. However, POSIX standardized it anyway (much > later), and since POSIX standardization is now handled by the > organization that owns the Unix trademark this is probably no longer > an issue. It seems that the word "deprecated" may lead to misunderstanding. The diff below removes "deprecated" to socket(2). Does it look ok? Thanks. Index: lib/libc/sys/socket.2 =================================================================== --- lib/libc/sys/socket.2 (revision 267659) +++ lib/libc/sys/socket.2 (working copy) @@ -28,7 +28,7 @@ .\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 19, 2013 +.Dd June 20, 2014 .Dt SOCKET 2 .Os .Sh NAME @@ -58,7 +58,7 @@ The currently understood formats are: .Pp .Bd -literal -offset indent -compact PF_LOCAL Host-internal protocols, formerly called PF_UNIX, -PF_UNIX Host-internal protocols, deprecated, use PF_LOCAL, +PF_UNIX Host-internal protocols, PF_INET Internet version 4 protocols, PF_PUP PUP protocols, like BSP, PF_APPLETALK AppleTalk protocols, From owner-freebsd-standards@FreeBSD.ORG Fri Jun 20 17:20:10 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87D55530; Fri, 20 Jun 2014 17:20:10 +0000 (UTC) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [IPv6:2001:470:8b2d:1e1c:21b:21ff:feb8:d7b0]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "khavrinen.csail.mit.edu", Issuer "Client CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46EE726D4; Fri, 20 Jun 2014 17:20:09 +0000 (UTC) Received: from khavrinen.csail.mit.edu (localhost [127.0.0.1]) by khavrinen.csail.mit.edu (8.14.7/8.14.7) with ESMTP id s5KHK7kE071629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL CN=khavrinen.csail.mit.edu issuer=Client+20CA); Fri, 20 Jun 2014 13:20:07 -0400 (EDT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.14.7/8.14.7/Submit) id s5KHK6GM071626; Fri, 20 Jun 2014 13:20:06 -0400 (EDT) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21412.27974.858589.84131@khavrinen.csail.mit.edu> Date: Fri, 20 Jun 2014 13:20:06 -0400 From: Garrett Wollman To: Kevin Lo Subject: Re: Is AF_UNIX really deprecated? In-Reply-To: <20140620025318.GA39576@ns.kevlo.org> References: <20140619054743.GA33893@ns.kevlo.org> <21411.3294.418186.992207@khavrinen.csail.mit.edu> <20140620025318.GA39576@ns.kevlo.org> X-Mailer: VM 7.17 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (khavrinen.csail.mit.edu [127.0.0.1]); Fri, 20 Jun 2014 13:20:08 -0400 (EDT) Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 17:20:10 -0000 < said: > It seems that the word "deprecated" may lead to misunderstanding. > The diff below removes "deprecated" to socket(2). Does it look ok? Thanks. I don't think that's quite what we want. Let me see if I can whip up a diff. -GAWollman From owner-freebsd-standards@FreeBSD.ORG Fri Jun 20 18:18:20 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94C7FD59; Fri, 20 Jun 2014 18:18:20 +0000 (UTC) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [IPv6:2001:470:8b2d:1e1c:21b:21ff:feb8:d7b0]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "khavrinen.csail.mit.edu", Issuer "Client CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 670CC2C4C; Fri, 20 Jun 2014 18:18:20 +0000 (UTC) Received: from khavrinen.csail.mit.edu (localhost [127.0.0.1]) by khavrinen.csail.mit.edu (8.14.7/8.14.7) with ESMTP id s5KIIIkm072320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL CN=khavrinen.csail.mit.edu issuer=Client+20CA); Fri, 20 Jun 2014 14:18:19 -0400 (EDT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.14.7/8.14.7/Submit) id s5KIII4t072317; Fri, 20 Jun 2014 14:18:18 -0400 (EDT) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21412.31466.959351.729672@khavrinen.csail.mit.edu> Date: Fri, 20 Jun 2014 14:18:18 -0400 From: Garrett Wollman To: Kevin Lo Subject: Re: Is AF_UNIX really deprecated? In-Reply-To: <20140620025318.GA39576@ns.kevlo.org> References: <20140619054743.GA33893@ns.kevlo.org> <21411.3294.418186.992207@khavrinen.csail.mit.edu> <20140620025318.GA39576@ns.kevlo.org> X-Mailer: VM 7.17 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (khavrinen.csail.mit.edu [127.0.0.1]); Fri, 20 Jun 2014 14:18:19 -0400 (EDT) Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 18:18:20 -0000 < said: > It seems that the word "deprecated" may lead to misunderstanding. > The diff below removes "deprecated" to socket(2). Does it look ok? Thanks. I think this is an improvement. I've removed some of the unsupported families from this listing and added others that were never documented. We should consider whether to stop documenting the PF_* constants and use only AF_* constants; although this is bogus in terms of semantics, it's what POSIX has standardized. It would be really great if someone had the time to go through all of the interfaces in 1003.1-2008 and add/update conformance statements for each manual page. I'm not that someone. -GAWollman Index: socket.2 =================================================================== --- socket.2 (revision 267679) +++ socket.2 (working copy) @@ -57,24 +57,30 @@ The currently understood formats are: .Pp .Bd -literal -offset indent -compact -PF_LOCAL Host-internal protocols, formerly called PF_UNIX, -PF_UNIX Host-internal protocols, deprecated, use PF_LOCAL, +PF_LOCAL Host-internal protocols (alias for PF_UNIX), +PF_UNIX Host-internal protocols, PF_INET Internet version 4 protocols, -PF_PUP PUP protocols, like BSP, -PF_APPLETALK AppleTalk protocols, -PF_ROUTE Internal Routing protocol, +PF_INET6 Internet version 6 protocols, +PF_ROUTE Internal routing protocol, PF_LINK Link layer interface, -PF_IPX Novell Internet Packet eXchange protocol, -PF_RTIP Help Identify RTIP packets, -PF_PIP Help Identify PIP packets, -PF_ISDN Integrated Services Digital Network, PF_KEY Internal key-management function, -PF_INET6 Internet version 6 protocols, -PF_NATM Native ATM access, -PF_ATM ATM, -PF_NETGRAPH Netgraph sockets +PF_NATM Asynchronous transfer mode protocols, +PF_NETGRAPH Netgraph sockets, +PF_IEEE80211 IEEE 802.11 wireless link-layer protocols (WiFi), +PF_BLUETOOTH Bluetooth protocols, +PF_INET_SDP OFED socket direct protocol (IPv4), +PF_INET6_SDP OFED socket direct protocol (IPv6) .Ed .Pp +Each protocol family is connected to an address family, which has the +same name except that the prefix is +.Dq Dv AF_ +in place of +.Dq Dv PF_ . +Other protocol families may be also defined, beginning with +.Dq Dv PF_ , +with corresponding address families. +.Pp The socket has the indicated .Fa type , which specifies the semantics of communication. @@ -307,6 +313,37 @@ .%B PS1 .%N 8 .Re +.Sh STANDARDS +The +.Fn socket +function conforms to +.St -p1003.1-2008 . +The +.Tn POSIX +standard specifies only the +.Dv AF_INET , +.Dv AF_INET6 , +and +.Dv AF_UNIX +constants for address families, and requires the use of +.Dv AF_* +constants for the +.Fa domain +argument of +.Fn socket . +The +.Dv SOCK_CLOEXEC +flag is expected to conform to the next revision of the +.Tn POSIX +standard. +The +.Dv SOCK_RDM +.Fa type , +the +.Dv PF_* +constants, and other address families are +.Fx +extensions. .Sh HISTORY The .Fn socket From owner-freebsd-standards@FreeBSD.ORG Sat Jun 21 16:04:32 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE19460A for ; Sat, 21 Jun 2014 16:04:32 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CC812E69 for ; Sat, 21 Jun 2014 16:04:31 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.8/8.14.8) with ESMTP id s5LG47bY011346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 22 Jun 2014 00:04:08 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.8/8.14.8/Submit) id s5LG47Lg011345; Sun, 22 Jun 2014 00:04:07 +0800 (CST) (envelope-from kevlo) Date: Sun, 22 Jun 2014 00:04:06 +0800 From: Kevin Lo To: Garrett Wollman Subject: Re: Is AF_UNIX really deprecated? Message-ID: <20140621160406.GA11268@ns.kevlo.org> References: <20140619054743.GA33893@ns.kevlo.org> <21411.3294.418186.992207@khavrinen.csail.mit.edu> <20140620025318.GA39576@ns.kevlo.org> <21412.31466.959351.729672@khavrinen.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21412.31466.959351.729672@khavrinen.csail.mit.edu> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 16:04:32 -0000 On Fri, Jun 20, 2014 at 02:18:18PM -0400, Garrett Wollman wrote: > > < said: > > > It seems that the word "deprecated" may lead to misunderstanding. > > The diff below removes "deprecated" to socket(2). Does it look ok? Thanks. > > I think this is an improvement. I've removed some of the unsupported > families from this listing and added others that were never > documented. We should consider whether to stop documenting the PF_* > constants and use only AF_* constants; although this is bogus in terms > of semantics, it's what POSIX has standardized. > > It would be really great if someone had the time to go through all of > the interfaces in 1003.1-2008 and add/update conformance statements > for each manual page. I'm not that someone. Your patch looks much better. :-) Thank you. > -GAWollman > > Index: socket.2 > =================================================================== > --- socket.2 (revision 267679) > +++ socket.2 (working copy) > @@ -57,24 +57,30 @@ > The currently understood formats are: > .Pp > .Bd -literal -offset indent -compact > -PF_LOCAL Host-internal protocols, formerly called PF_UNIX, > -PF_UNIX Host-internal protocols, deprecated, use PF_LOCAL, > +PF_LOCAL Host-internal protocols (alias for PF_UNIX), > +PF_UNIX Host-internal protocols, > PF_INET Internet version 4 protocols, > -PF_PUP PUP protocols, like BSP, > -PF_APPLETALK AppleTalk protocols, > -PF_ROUTE Internal Routing protocol, > +PF_INET6 Internet version 6 protocols, > +PF_ROUTE Internal routing protocol, > PF_LINK Link layer interface, > -PF_IPX Novell Internet Packet eXchange protocol, > -PF_RTIP Help Identify RTIP packets, > -PF_PIP Help Identify PIP packets, > -PF_ISDN Integrated Services Digital Network, > PF_KEY Internal key-management function, > -PF_INET6 Internet version 6 protocols, > -PF_NATM Native ATM access, > -PF_ATM ATM, > -PF_NETGRAPH Netgraph sockets > +PF_NATM Asynchronous transfer mode protocols, > +PF_NETGRAPH Netgraph sockets, > +PF_IEEE80211 IEEE 802.11 wireless link-layer protocols (WiFi), > +PF_BLUETOOTH Bluetooth protocols, > +PF_INET_SDP OFED socket direct protocol (IPv4), > +PF_INET6_SDP OFED socket direct protocol (IPv6) > .Ed > .Pp > +Each protocol family is connected to an address family, which has the > +same name except that the prefix is > +.Dq Dv AF_ > +in place of > +.Dq Dv PF_ . > +Other protocol families may be also defined, beginning with > +.Dq Dv PF_ , > +with corresponding address families. > +.Pp > The socket has the indicated > .Fa type , > which specifies the semantics of communication. > @@ -307,6 +313,37 @@ > .%B PS1 > .%N 8 > .Re > +.Sh STANDARDS > +The > +.Fn socket > +function conforms to > +.St -p1003.1-2008 . > +The > +.Tn POSIX > +standard specifies only the > +.Dv AF_INET , > +.Dv AF_INET6 , > +and > +.Dv AF_UNIX > +constants for address families, and requires the use of > +.Dv AF_* > +constants for the > +.Fa domain > +argument of > +.Fn socket . > +The > +.Dv SOCK_CLOEXEC > +flag is expected to conform to the next revision of the > +.Tn POSIX > +standard. > +The > +.Dv SOCK_RDM > +.Fa type , > +the > +.Dv PF_* > +constants, and other address families are > +.Fx > +extensions. > .Sh HISTORY > The > .Fn socket > From owner-freebsd-standards@FreeBSD.ORG Sun Jun 22 07:51:22 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0363AB63; Sun, 22 Jun 2014 07:51:22 +0000 (UTC) Received: from cursor.its.uu.se (smtp-out2.uu.se [130.238.7.173]) (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 81FF62E0C; Sun, 22 Jun 2014 07:51:20 +0000 (UTC) Received: from e-mailfilter01.sunet.se (e-mailfilter01.sunet.se [192.36.171.201]) by cursor.its.uu.se (Postfix) with ESMTP id 33D33444; Sun, 22 Jun 2014 09:51:12 +0200 (CEST) Received: from lyra.its.uu.se (lyra.its.uu.se [130.238.7.73]) by e-mailfilter01.sunet.se (8.14.4/8.14.4/Debian-4) with ESMTP id s5M7pBsk026463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 Jun 2014 09:51:12 +0200 Received: from virgata.its.uu.se (virgata.its.uu.se [130.238.7.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lyra.its.uu.se (Postfix) with ESMTPS id 7E90D39198; Sun, 22 Jun 2014 09:51:11 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.3 lyra.its.uu.se 7E90D39198 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uu.se; s=centralsmtp; t=1403423471; i=@uu.se; bh=7x+Cnuhv+86PWxNUVHkdIZCqLnxJniegXLdPtFO02vg=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=twh/hR2wRe10dXUnp2U3/QGhklNWrJqxyIPFHoXcikVjh/P9jZfXtDzOQZIdrvKWB qmZyWPsFizrOx79azINomOEda5S3IQ+EvMou+i6HIfQFLXaqdsJYpiA7n92+4x2+SH 1I5ZdjqteLSwvFcIlX6ZYh0Hpq4Vis3yuCz3ycV4= Received: from jubula (localhost.localdomain [127.0.0.1]) by virgata.its.uu.se (8.13.8/8.13.8) with ESMTP id s5M7p7Vt027627; Sun, 22 Jun 2014 09:51:07 +0200 Received: from c83-253-1-13.bredband.comhem.se (c83-253-1-13.bredband.comhem.se [83.253.1.13]) by webmail.uu.se (Horde Framework) with HTTP; Sun, 22 Jun 2014 09:51:07 +0200 Message-ID: <20140622095107.57031ui1xqnesmi3@webmail.uu.se> Date: Sun, 22 Jun 2014 09:51:07 +0200 From: Erik Trulsson To: Garrett Wollman Subject: Re: Is AF_UNIX really deprecated? References: <20140619054743.GA33893@ns.kevlo.org> <21411.3294.418186.992207@khavrinen.csail.mit.edu> <20140620025318.GA39576@ns.kevlo.org> <21412.31466.959351.729672@khavrinen.csail.mit.edu> In-Reply-To: <21412.31466.959351.729672@khavrinen.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.9) X-Bayes-Prob: 0.0001 (Score 0, tokens from: outbound, outbound-uu-se:default, uu-se:default, base:default, @@RPTN) X-Spam-Score: -0.10 () [Tag at 15.00] T_RP_MATCHES_RCVD:-0.1 X-p0f-Info: os=Linux 2.6.x, link=Ethernet or modem X-CanIt-Geo: ip=130.238.7.55; country=SE; region=Uppsala; city=Uppsala; latitude=59.8667; longitude=17.6333; http://maps.google.com/maps?q=59.8667,17.6333&z=6 X-CanItPRO-Stream: outbound-uu-se:outbound (inherits from outbound-uu-se:default, uu-se:default, base:default) X-Canit-Stats-ID: 09MhjPc7a - 1d90f0e04ac9 - 20140622 X-Antispam-Training-Forget: https://mailfilter.sunet.se/canit/b.php?i=09MhjPc7a&m=1d90f0e04ac9&t=20140622&c=f X-Antispam-Training-Nonspam: https://mailfilter.sunet.se/canit/b.php?i=09MhjPc7a&m=1d90f0e04ac9&t=20140622&c=n X-Antispam-Training-Spam: https://mailfilter.sunet.se/canit/b.php?i=09MhjPc7a&m=1d90f0e04ac9&t=20140622&c=s X-CanIt-Archive-Cluster: PfMRe/vJWMiXwM2YIH5BVExnUnw X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.36.171.201 Cc: Kevin Lo , freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2014 07:51:22 -0000 Citerar Garrett Wollman : > < said: > >> It seems that the word "deprecated" may lead to misunderstanding. >> The diff below removes "deprecated" to socket(2). Does it look ok? Thanks. > > I think this is an improvement. I've removed some of the unsupported > families from this listing and added others that were never > documented. We should consider whether to stop documenting the PF_* > constants and use only AF_* constants; although this is bogus in terms > of semantics, it's what POSIX has standardized. I think the PF_* constants should remain documented - if only to help understanding programs that use them. Adding a note that they are non-standardized equivalents to the AF_* constants, or something like that, would probably be a good idea though. From owner-freebsd-standards@FreeBSD.ORG Mon Jun 23 08:00:15 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10AE2760 for ; Mon, 23 Jun 2014 08:00:15 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2CE92945 for ; Mon, 23 Jun 2014 08:00:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5N80EJR087412 for ; Mon, 23 Jun 2014 09:00:14 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) Message-Id: <201406230800.s5N80EJR087412@kenobi.freebsd.org> From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 23 Jun 2014 08:00:14 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2014 08:00:15 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 188036: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188036 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: mblen(3) in EUC locales causes crash and segmentation fault. From owner-freebsd-standards@FreeBSD.ORG Wed Jun 25 13:38:21 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10E83AA5 for ; Wed, 25 Jun 2014 13:38:21 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC1E828E6 for ; Wed, 25 Jun 2014 13:38:20 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PDcKEH056531 for ; Wed, 25 Jun 2014 14:38:20 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191365] New: Name demangling doesn't work for local names Date: Wed, 25 Jun 2014 13:38:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 9.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ikosarev@accesssoftek.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 13:38:21 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191365 Bug ID: 191365 Summary: Name demangling doesn't work for local names Product: Base System Version: 9.2-RELEASE Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: ikosarev@accesssoftek.com The C++ ABI's __cxa_demangle() function rejects unscoped/local/static names. The attached test outputs: _Z9NullDerefPi: status 0; demangled: 'NullDeref(int*)' _ZL9NullDerefPi: status -2 The expected output is: _Z9NullDerefPi: status 0; demangled: 'NullDeref(int*)' _ZL9NullDerefPi: status 0; demangled: 'NullDeref(int*)' Obvisouly, the reason of the rejection is the 'L' in front of the 2nd identifier. That letter reflects the fact the name is declared static: static void NullDeref(int*); This defect prevents the LLVM's address sanitizer test null_deref.cc from passing on FreeBSD 9.2 . -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Wed Jun 25 13:38:58 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 418BCADB for ; Wed, 25 Jun 2014 13:38:58 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 280F428EF for ; Wed, 25 Jun 2014 13:38:58 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5PDcwqe056913 for ; Wed, 25 Jun 2014 14:38:58 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191365] Name demangling doesn't work for local names Date: Wed, 25 Jun 2014 13:38:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 9.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ikosarev@accesssoftek.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 13:38:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191365 --- Comment #1 from ikosarev@accesssoftek.com --- Created attachment 144120 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144120&action=edit The test source -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Fri Jun 27 12:33:52 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCBE93CB for ; Fri, 27 Jun 2014 12:33:52 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C378A2A08 for ; Fri, 27 Jun 2014 12:33:52 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RCXqH0025465 for ; Fri, 27 Jun 2014 13:33:52 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191433] New: After create new vlan sysctl net.link.ether.inet.proxyall sets to 0 Date: Fri, 27 Jun 2014 12:33:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 9.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: evd_sas@mail.ru X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 12:33:52 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191433 Bug ID: 191433 Summary: After create new vlan sysctl net.link.ether.inet.proxyall sets to 0 Product: Base System Version: 9.2-STABLE Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: evd_sas@mail.ru Created attachment 144191 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144191&action=edit example creating vlan I use supervlan (ip-unnumbered) and set net.link.ether.inet.proxyall to 1. When I create new vlan, it sets to 0. FreeBSD 9.2-RELEASE-p3 amd64 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Fri Jun 27 12:34:45 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B49EF401 for ; Fri, 27 Jun 2014 12:34:45 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC372A13 for ; Fri, 27 Jun 2014 12:34:45 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RCYjGY067099 for ; Fri, 27 Jun 2014 13:34:45 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191433] After create new vlan sysctl net.link.ether.inet.proxyall sets to 0 Date: Fri, 27 Jun 2014 12:34:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 9.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: evd_sas@mail.ru X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 12:34:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191433 evd_sas@mail.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|--- |Normal CC| |evd_sas@mail.ru -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Fri Jun 27 20:25:37 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34412154 for ; Fri, 27 Jun 2014 20:25:37 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 F0C57290D for ; Fri, 27 Jun 2014 20:25:36 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RKPaxk046763 for ; Fri, 27 Jun 2014 20:25:36 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s5RKPaRD046762 for freebsd-standards@FreeBSD.org; Fri, 27 Jun 2014 20:25:36 GMT (envelope-from bdrewery) Received: (qmail 52345 invoked from network); 27 Jun 2014 15:25:33 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 27 Jun 2014 15:25:33 -0500 Message-ID: <53ADD32C.5040503@FreeBSD.org> Date: Fri, 27 Jun 2014 15:25:16 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Pedro Giffuni , freebsd-standards@FreeBSD.org Subject: Re: regex(3): support for \< and \> word delimiters References: <53556919.4010305@freebsd.org> In-Reply-To: <53556919.4010305@freebsd.org> X-Enigmail-Version: 1.6 OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDcnk4GT9VernEa2XjkQkKnsn15XmsWpG" X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 20:25:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dDcnk4GT9VernEa2XjkQkKnsn15XmsWpG Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 4/21/2014 1:53 PM, Pedro Giffuni wrote: > Hello; >=20 > Is there any related standard (or in absence strong feelings) > about having \< and \> delimiters in regex expressions? >=20 > I have an old PR bin/153257 which actually comes from illumos: > https://www.illumos.org/issues/516 >=20 > I don't use them but maybe it would help people moving their > scripts from Solaris. >=20 > Regards, >=20 > Pedro. I don't know about a standard, but I find the lack of \< \> to be a frustrating difference with other platforms. [[:<:]] [[:>:]] work but are far more characters to type. --=20 Regards, Bryan Drewery --dDcnk4GT9VernEa2XjkQkKnsn15XmsWpG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTrdMxAAoJEDXXcbtuRpfPlvAIAJzfsQR5DQ6sKsFfdveVDXD8 Mvj5tdb3EAZRM9ydB7BSe8ln/giBipNb06hYhtkrrzLfGQNOHvlAGIqqoX30E5Ga K8eI89dNxo9nU13364+AWBQC/SO9FjMqXcYcIDQcYJNsaGz9tYhttlenGXT+aPmE 11EXVKt0UuPuw2+Mv3B8Z4Tk/kynzjv4qdeuZ3tbCzFqzJePps79mjzhir+fy4bR yhANd5gdNWJB/XMDsR2aM+O2c0KXI59xEsv8OXLCWm8SDWdKtM93aHL3ND1Gh25w DXEEYXfWv9eW2BfQwXBHSC5hJMcqTcLs8cOw9fIdiP8jlByaFyyoWEnTZBgfeCU= =KI4p -----END PGP SIGNATURE----- --dDcnk4GT9VernEa2XjkQkKnsn15XmsWpG-- From owner-freebsd-standards@FreeBSD.ORG Fri Jun 27 21:21:34 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3A8ADB5 for ; Fri, 27 Jun 2014 21:21:34 +0000 (UTC) Received: from nm41-vm9.bullet.mail.bf1.yahoo.com (nm41-vm9.bullet.mail.bf1.yahoo.com [216.109.114.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C9792E29 for ; Fri, 27 Jun 2014 21:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1403903713; bh=2lClpdUYfsGClOKA/G6yXC4GqreYsNXfTHH77fLZC6M=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=bzp3V95MOy47WWU8LZr6GhETL+r3GLnaYBYTskDwh6nZd3m5KkfyXsJAHY+u2TwbG3flXEXlJ8KVtUZTeW4mnCOhETEGY2z1Twrcdgkbz3PPHNzVrB4FWOTz7FyV2DBleUf+OByIuse/rTMljbYkTH6qxZWEkLWKXbf6Xqa6e84lQvdbUxjoMN/GEtpZfB8GUweClF93T+JPTkM+ghWGmpHiWkmF0oTPDXzymnf6cTpUZPsC+DOrdajKorrqJXA80pPVuYlffYYGYV7N+9/R440srGeKs9ZPQudyh4UZVFyA1BQLVxRLFagXFNrrdBVZVokktr975pf5eJLz4zIjFQ== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=MzxvussMSQh1TY8zBFZMBdx/uZLSlKWSk0Hi+me17TFd/5XHKfPoGsOKjJ6IHpjgg8Gt3BqTv3D0ioio1evtR0gN8uoKEsN9+P32W3k4fzU9WihkPAGYYN6d9YNPK8dKDZ1AK3oM/26zfKJWt6s0J4su8ChSjvGQXfeFz42Sw9C0QpHXkPp4lmHeuCkauJOh3fFYUf0O3QNdQF4QtLCdGIvTYaTLMKlchYyfPLztnIn5iSCcrsKkFVdlKX4qeMfXO+HxhkQEW95JYqu28MYKFkU1rJlFZM9QldkuzrripZjjzLbHTBL+wFO93tDCnjUvOT7pWJkpy/8fRu/yOQ5olg==; Received: from [66.196.81.171] by nm41.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jun 2014 21:15:13 -0000 Received: from [98.139.211.193] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 27 Jun 2014 21:15:13 -0000 Received: from [127.0.0.1] by smtp202.mail.bf1.yahoo.com with NNFMP; 27 Jun 2014 21:15:13 -0000 X-Yahoo-Newman-Id: 459390.99553.bm@smtp202.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: DdKBSmwVM1l.EqAH9R7SSLw95qL_91P7HlcIvuE5BYWsu72 E_Hyw37FLVRcPVMVn2QniEJShp5UR40F2rLy17kbxCa4ii8Gmy6VbadLRF6t m8.GNABsGaXaOOBpvYfymoy3b7nCKuLmjHW0fi6hdDqh1CpMHyR0VQ.r9Kji ZZ5g2pSwRbdkNMwgbLCb8mtJtgD3gWiU.BbvfzqpWqEoV5Gck2QdmoYucU9a mowWC8I5jbgvmwUGkb3j3JE49yyzluzsOcRfw9hdIjNLXYfCQVDVQtmM_zQ1 tJjVZfGiW.qQ2vUg1vejKcNbbDlmw7Rmzhpj5tIx7NemaFyV8F7gom58F7YT 8DO82vKy75ciyAMfN1kL2Y3T_YmHz9_vtbHmxUC4Siqb7qQEgpP1H6dGgcSz .1zSBokHHIsp3gHjD1nOK8mqfQQDjSgHuxBmycuw5FYGOd1sefoVIudB2ZyI uIaZTTxt4cebdWjuIB2f2zxhgR4X0dX8w4tGbAwBEJlugV4BA1BqMDDSMj20 fQyfssNoP6HxTIctgc9V0872s0ugrVB5M4uNwNOQS6GMFnM72rvb2t7inZUv ijORV_Y.0CbH9Qr4HQtLXeRaNtps52ESqzlkBpBrCvCrEwpU- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.101] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp202.mail.bf1.yahoo.com with SMTP; 27 Jun 2014 14:15:13 -0700 PDT Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: regex(3): support for \< and \> word delimiters From: Pedro Giffuni In-Reply-To: <53ADD32C.5040503@FreeBSD.org> Date: Fri, 27 Jun 2014 16:15:11 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <20545470-A847-4835-A42B-382E5CC363ED@freebsd.org> References: <53556919.4010305@freebsd.org> <53ADD32C.5040503@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.1878.2) Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 21:21:34 -0000 Hi; Il giorno 27/giu/2014, alle ore 15:25, Bryan Drewery = ha scritto: > On 4/21/2014 1:53 PM, Pedro Giffuni wrote: >> Hello; >>=20 >> Is there any related standard (or in absence strong feelings) >> about having \< and \> delimiters in regex expressions? >>=20 >> I have an old PR bin/153257 which actually comes from illumos: >> https://www.illumos.org/issues/516 >>=20 >> I don't use them but maybe it would help people moving their >> scripts from Solaris. >>=20 >> Regards, >>=20 >> Pedro. >=20 > I don't know about a standard, but I find the lack of \< \> to be a > frustrating difference with other platforms. [[:<:]] [[:>:]] work but > are far more characters to type. >=20 Thank you for the feedback! I had closed the issue because I thought = there was no interest. Another thing that needed consideration was that I thought there was = some work going on to replace libregex with libtre, which doesn=92t = support *any* such delimiter so committing the change would raise the = bar for the replacement. Discussing it with Gabor it seems like libtre = is not in the capacity of replacing our current libregex anyways so I = guess Spencer=92s libregex is here to stay. While here, there is also the sed(1) syntax issue: https://www.illumos.org/issues/586 Adopting both changes would probably reduce to a minimum the use of GNU = sed in the ports tree, but such changes are likely to be = controversial(?) and I don=92t feel like wearing asbestos underwear at = this time .. at least not for sed ;). Pedro. From owner-freebsd-standards@FreeBSD.ORG Mon Jun 30 08:00:15 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E43CE85C for ; Mon, 30 Jun 2014 08:00:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1F4F292B for ; Mon, 30 Jun 2014 08:00:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5U80Ep8004479 for ; Mon, 30 Jun 2014 09:00:14 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) Message-Id: <201406300800.s5U80Ep8004479@kenobi.freebsd.org> From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 30 Jun 2014 08:00:14 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 08:00:15 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 188036: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188036 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: mblen(3) in EUC locales causes crash and segmentation fault. From owner-freebsd-standards@FreeBSD.ORG Wed Jul 2 21:21:50 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9654C79 for ; Wed, 2 Jul 2014 21:21:50 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 A5A66237F for ; Wed, 2 Jul 2014 21:21:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s62LLo3L031498 for ; Wed, 2 Jul 2014 21:21:50 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s62LLo8I031494 for freebsd-standards@FreeBSD.org; Wed, 2 Jul 2014 21:21:50 GMT (envelope-from bdrewery) Received: (qmail 88816 invoked from network); 2 Jul 2014 16:21:48 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 2 Jul 2014 16:21:48 -0500 Message-ID: <53B477E6.10103@FreeBSD.org> Date: Wed, 02 Jul 2014 16:21:42 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Pedro Giffuni Subject: Re: regex(3): support for \< and \> word delimiters References: <53556919.4010305@freebsd.org> <53ADD32C.5040503@FreeBSD.org> <20545470-A847-4835-A42B-382E5CC363ED@freebsd.org> In-Reply-To: <20545470-A847-4835-A42B-382E5CC363ED@freebsd.org> X-Enigmail-Version: 1.6 OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Barc27AgSlAMftbldr21qPgcJWdxtWPxG" Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 21:21:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Barc27AgSlAMftbldr21qPgcJWdxtWPxG Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 6/27/2014 4:15 PM, Pedro Giffuni wrote: > Hi; >=20 > Il giorno 27/giu/2014, alle ore 15:25, Bryan Drewery ha scritto: >=20 >> On 4/21/2014 1:53 PM, Pedro Giffuni wrote: >>> Hello; >>> >>> Is there any related standard (or in absence strong feelings) >>> about having \< and \> delimiters in regex expressions? >>> >>> I have an old PR bin/153257 which actually comes from illumos: >>> https://www.illumos.org/issues/516 >>> >>> I don't use them but maybe it would help people moving their >>> scripts from Solaris. >>> >>> Regards, >>> >>> Pedro. >> >> I don't know about a standard, but I find the lack of \< \> to be a >> frustrating difference with other platforms. [[:<:]] [[:>:]] work but >> are far more characters to type. >> >=20 > Thank you for the feedback! I had closed the issue because I thought th= ere was no interest. >=20 > Another thing that needed consideration was that I thought there was so= me work going on to replace libregex with libtre, which doesn=92t support= *any* such delimiter so committing the change would raise the bar for th= e replacement. Discussing it with Gabor it seems like libtre is not in th= e capacity of replacing our current libregex anyways so I guess Spencer=92= s libregex is here to stay. >=20 > While here, there is also the sed(1) syntax issue: >=20 > https://www.illumos.org/issues/586 >=20 > Adopting both changes would probably reduce to a minimum the use of GNU= sed in the ports tree, but such changes are likely to be controversial(?= ) and I don=92t feel like wearing asbestos underwear at this time .. at l= east not for sed ;). >=20 > Pedro. >=20 IMHO yes that is a good thing to bring over as it helps with people coming from other platforms and improves portability with scripts. I started on Linux and kept wondering why I had FILEe files all over my system until I realized -i '' was required on FreeBSD. --=20 Regards, Bryan Drewery --Barc27AgSlAMftbldr21qPgcJWdxtWPxG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTtHfmAAoJEDXXcbtuRpfPXKYIAJo4jmqGDTwIa8/y3F9JYUa2 4h2hpveUU+q1q5jND/Gx8ItKr2qQBGdXfI0AX3E5V5y9rubAgt/oXmtL6n7p7b+M bQ+XDWdA3jIGm4TUXnpgcz32zLSysSDW5U661UxH/n2TEoQpZTOaLWZ7Q/pme33/ LTuSyadoOMrRVa4qTo0jz+4Tjv3++yExKL8MXdDoCRNJgTRkLf4kmrJh3hxMlFxg I4IwuaJ4ArVNtZJBk/jBGMVN7vg5L/QyTzp1xsUNuPFok1NwXKjWiV5p+4kJXYmu y2i+RR3Bwz+4kgq/m7I83/lMMWEf0H4h4VGBwnYhnrKtB6Y1kRXyzT+MFMIZiig= =ymDB -----END PGP SIGNATURE----- --Barc27AgSlAMftbldr21qPgcJWdxtWPxG-- From owner-freebsd-standards@FreeBSD.ORG Wed Jul 2 22:17:43 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F48DF92; Wed, 2 Jul 2014 22:17:43 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D5F90286E; Wed, 2 Jul 2014 22:17:42 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id E185F3592EA; Thu, 3 Jul 2014 00:17:39 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id B551C28497; Thu, 3 Jul 2014 00:17:39 +0200 (CEST) Date: Thu, 3 Jul 2014 00:17:39 +0200 From: Jilles Tjoelker To: Bryan Drewery Subject: Re: sed -i (was: regex(3): support for \< and \> word delimiters) Message-ID: <20140702221739.GB61834@stack.nl> References: <53556919.4010305@freebsd.org> <53ADD32C.5040503@FreeBSD.org> <20545470-A847-4835-A42B-382E5CC363ED@freebsd.org> <53B477E6.10103@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <53B477E6.10103@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Pedro Giffuni , freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 22:17:43 -0000 On Wed, Jul 02, 2014 at 04:21:42PM -0500, Bryan Drewery wrote: > On 6/27/2014 4:15 PM, Pedro Giffuni wrote: > > While here, there is also the sed(1) syntax issue: > > https://www.illumos.org/issues/586 > > Adopting both changes would probably reduce to a minimum the use of > > GNU sed in the ports tree, but such changes are likely to be > > controversial(?) and I don’t feel like wearing asbestos underwear at > > this time .. at least not for sed ;). > IMHO yes that is a good thing to bring over as it helps with people > coming from other platforms and improves portability with scripts. I > started on Linux and kept wondering why I had FILEe files all over my > system until I realized -i '' was required on FreeBSD. What are your ideas about the breakage this will cause? sed -i was proposed in the Austin Group, but standardization broke down on this issue. Even a simple grep for 'sed -i' finds a few dozen uses in FreeBSD base that would be broken, for example: etc/Makefile: sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab On the other hand, usr.sbin/pc-sysinstall/backend/functions-cleanup.sh: sed -i -e "s|my.domain|${HOSTNAME} ${HOSTNAME}|g" ${FSMNT}/etc/hosts appears to attempt to use the GNU form. Also, where a backup suffix is deliberately given, it is always attached to -i. Therefore, it would work for the scripts in FreeBSD base to use the GNU behaviour except that an empty argument after an argumentless -i option counts as an argument to that -i option anyway. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Wed Jul 2 22:20:22 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 673C134D for ; Wed, 2 Jul 2014 22:20:22 +0000 (UTC) Received: from nm2-vm1.bullet.mail.bf1.yahoo.com (nm2-vm1.bullet.mail.bf1.yahoo.com [98.139.213.158]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 055282886 for ; Wed, 2 Jul 2014 22:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1404339614; bh=A8nuwbGmV8LJ5FfxCt+QacQd3MWwoOBCUTA72PehDNo=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=PoCTDLh12E07wGUMc2SQTVs+wnz8s4hsG7p4lB6Aw9R6K4f14sZYK0/mOTbi8OV/CoyxQTOVM3eHN9UZGo/pACFJE47bcvy9NnSOFFep3ECZ7zp28+WzOongCVYXvLrtkj3f+p8T7/n85E1fQz4+8exHbO5gdpRNW2G28TkxxE2oV8aSknb7tHWBkPOF7BcnOtJ8VB6+qKd8Na2VD/NWzqmtF9W0s5tDJoWcLRAuPsi+hmPnjUiSxt7cNppk8RlA3J3j9L+inP1zuP53Ri6mRyyxCSu9hDCmywaYzA0n/KnG0NyanYnwfrKWB+MvOvdzfBhlfceJBoMnuux8aztRIA== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=ZR4u6tf7ZjnOUWUelaRWiLe7pD36XAUkHS1AQK02VvkDihQxzBTDRQvUYCDx98XDKq5zVa9opqUxpyMyIWzj5YbrmDavoCDQmokZgsIMTf8EdInQyZiE/9fDZL7k9lYfFqvRZM1LROUGvQK4NDBvMbXyGEINAGh5+nmNwUxhLO9RpdE/itoo7x0uly7/D/pnDDIJDSP2Sw7jVgLShpo/2XW9Fd089aVhm3k47wt/jlRYO5Dx8va6NGjS7jDbPldk+rCkFpydnwB/MYp811ujRQgLwFh/zVGLoeKcPHuzwXF5gV5IMg2lfXj4vzwfAba0TgY83KFzqD3JRWqRI4/0zg==; Received: from [98.139.212.153] by nm2.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jul 2014 22:20:14 -0000 Received: from [98.139.211.200] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jul 2014 22:20:14 -0000 Received: from [127.0.0.1] by smtp209.mail.bf1.yahoo.com with NNFMP; 02 Jul 2014 22:20:14 -0000 X-Yahoo-Newman-Id: 627077.17279.bm@smtp209.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: YmfKh0UVM1n8Q38B_XbxpTHxLB7Y.jOyw0dKliJ05h7lJe_ NTPgodEddt5zvN0UG4K1DkDL4DkLoiglB7pT_M.mQQ6rPqv3vqDNYGrMg2EW d_8y2QsTLBsxIx8fAPvbF.gLgfyxmTOjrgnbc.fvjHOOp50Ge.fViOug22E_ PW1MP1cOvIShgDUB5hRNaI7pc61ro8_WUMdSAY1EpTpbTC0JE6GwAYlDUaSZ ExO.E3fqiwLUfnvlgeTVUsrRQU0hSGKrqmZyLTxXvO0i0.RyVROR4FeKDaTK vlRjCPJamVoJIRZJ_4VilLAcvZmMVHngbKmWC3_ys9uFfQnky7.2ttiWH0_s e62bjKgyi3x.H9vkq2G9BsB91FopvkFHu4_lcfshXNhOF2pFNtIxhRU0nGF4 f3twc44xhtYTKezxaNYA4h4icKxQKu7HU1aPqnM9TaHhgwyD.9vM4RdlGRf. lsLYWcKfKeZvZDJtIdIFTYbo4Np5_Pp3n3LdsMr7U3jI2mw7m3VZEhM68KsQ fkEAyXhOX2ub9E3MsX8ZEF.LX4TsVj2_x88ZlXbiXalB0HwsxvvxIxhwa2kn _WrhuofxDzjYsfTaecTm4_xeO8FBOF7ZK7GG7GLQBSGA- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.100] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp209.mail.bf1.yahoo.com with SMTP; 02 Jul 2014 15:20:14 -0700 PDT Message-ID: <53B485AC.3060706@freebsd.org> Date: Wed, 02 Jul 2014 17:20:28 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Bryan Drewery Subject: Re: regex(3): support for \< and \> word delimiters References: <53556919.4010305@freebsd.org> <53ADD32C.5040503@FreeBSD.org> <20545470-A847-4835-A42B-382E5CC363ED@freebsd.org> <53B477E6.10103@FreeBSD.org> In-Reply-To: <53B477E6.10103@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 22:20:22 -0000 On 07/02/14 16:21, Bryan Drewery wrote: > On 6/27/2014 4:15 PM, Pedro Giffuni wrote: >> Hi; >> >> Il giorno 27/giu/2014, alle ore 15:25, Bryan Drewery ha scritto: >> >>> On 4/21/2014 1:53 PM, Pedro Giffuni wrote: >>>> Hello; >>>> >>>> Is there any related standard (or in absence strong feelings) >>>> about having \< and \> delimiters in regex expressions? >>>> >>>> I have an old PR bin/153257 which actually comes from illumos: >>>> https://www.illumos.org/issues/516 >>>> >>>> I don't use them but maybe it would help people moving their >>>> scripts from Solaris. >>>> >>>> Regards, >>>> >>>> Pedro. >>> I don't know about a standard, but I find the lack of \< \> to be a >>> frustrating difference with other platforms. [[:<:]] [[:>:]] work but >>> are far more characters to type. >>> >> Thank you for the feedback! I had closed the issue because I thought there was no interest. >> >> Another thing that needed consideration was that I thought there was some work going on to replace libregex with libtre, which doesn’t support *any* such delimiter so committing the change would raise the bar for the replacement. Discussing it with Gabor it seems like libtre is not in the capacity of replacing our current libregex anyways so I guess Spencer’s libregex is here to stay. >> >> While here, there is also the sed(1) syntax issue: >> >> https://www.illumos.org/issues/586 >> >> Adopting both changes would probably reduce to a minimum the use of GNU sed in the ports tree, but such changes are likely to be controversial(?) and I don’t feel like wearing asbestos underwear at this time .. at least not for sed ;). >> >> Pedro. >> > IMHO yes that is a good thing to bring over as it helps with people > coming from other platforms and improves portability with scripts. I > started on Linux and kept wondering why I had FILEe files all over my > system until I realized -i '' was required on FreeBSD. > The original idea was, more or less, the contrary: by being stricter about non-standard extensions you can be sure that the code you made on FreeBSD will run unchanged on all existing platforms. It is difficult to strike a balance though: POSIX has been adopting some GNU extensions, so even if we reject them initially at some point they become necessary. The sed enhancement is actually pretty easy, and it looks like, in addition to illumos, NetBSD has it too. It is not high on my todo list though ;). Pedro. From owner-freebsd-standards@FreeBSD.ORG Wed Jul 2 22:21:17 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 220F1391 for ; Wed, 2 Jul 2014 22:21:17 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 00F3A28FC for ; Wed, 2 Jul 2014 22:21:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s62MLFMu054427 for ; Wed, 2 Jul 2014 22:21:15 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s62MLFj4054424 for freebsd-standards@FreeBSD.org; Wed, 2 Jul 2014 22:21:15 GMT (envelope-from bdrewery) Received: (qmail 5890 invoked from network); 2 Jul 2014 17:21:14 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 2 Jul 2014 17:21:14 -0500 Message-ID: <53B485D3.1080602@FreeBSD.org> Date: Wed, 02 Jul 2014 17:21:07 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Jilles Tjoelker Subject: Re: sed -i References: <53556919.4010305@freebsd.org> <53ADD32C.5040503@FreeBSD.org> <20545470-A847-4835-A42B-382E5CC363ED@freebsd.org> <53B477E6.10103@FreeBSD.org> <20140702221739.GB61834@stack.nl> In-Reply-To: <20140702221739.GB61834@stack.nl> X-Enigmail-Version: 1.6 OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ldLn8KHMsHXjwxhB5KQBuvnuwrAb0v5Th" Cc: Pedro Giffuni , freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 22:21:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ldLn8KHMsHXjwxhB5KQBuvnuwrAb0v5Th Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 7/2/2014 5:17 PM, Jilles Tjoelker wrote: > On Wed, Jul 02, 2014 at 04:21:42PM -0500, Bryan Drewery wrote: >> On 6/27/2014 4:15 PM, Pedro Giffuni wrote: >>> While here, there is also the sed(1) syntax issue: >=20 >>> https://www.illumos.org/issues/586 >=20 >>> Adopting both changes would probably reduce to a minimum the use of >>> GNU sed in the ports tree, but such changes are likely to be >>> controversial(?) and I don=E2=80=99t feel like wearing asbestos under= wear at >>> this time .. at least not for sed ;). >=20 >> IMHO yes that is a good thing to bring over as it helps with people >> coming from other platforms and improves portability with scripts. I >> started on Linux and kept wondering why I had FILEe files all over my >> system until I realized -i '' was required on FreeBSD. >=20 > What are your ideas about the breakage this will cause? sed -i was > proposed in the Austin Group, but standardization broke down on this > issue. >=20 > Even a simple grep for 'sed -i' finds a few dozen uses in FreeBSD base > that would be broken, for example: >=20 Breaking -i '' is not acceptable. I can't find the patch in question, but from the linked issue I found: https://gist.github.com/jclulow/1394562 It seems to address the backwards-compat concern. > etc/Makefile: sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/= crontab >=20 > On the other hand, >=20 > usr.sbin/pc-sysinstall/backend/functions-cleanup.sh: sed -i -e "s|my.do= main|${HOSTNAME} ${HOSTNAME}|g" ${FSMNT}/etc/hosts >=20 > appears to attempt to use the GNU form. >=20 > Also, where a backup suffix is deliberately given, it is always attache= d > to -i. Therefore, it would work for the scripts in FreeBSD base to use > the GNU behaviour except that an empty argument after an argumentless -= i > option counts as an argument to that -i option anyway. >=20 --=20 Regards, Bryan Drewery --ldLn8KHMsHXjwxhB5KQBuvnuwrAb0v5Th Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTtIXTAAoJEDXXcbtuRpfP/zwH/ipqgeGAla4hIT99Cnf9zTXM xHsShd8tvFRUjzgVJH8zU+qYC5y0ltRniGhWsGARM0WwohfkY27M0znDhmB6uLIh 50o2rCXp2gmK/Vx6ZC4/X6DUy61IYTMByEyP1jlRT/jmeY1d1quQwgtVBAP7+aeo YvlHpDjFjsuBpR2zZ/85SORPTjYep1HRQHGe236YxuUGXI7ffx3MkbfbA4Ra3kjQ WpfG35BOZZV4U7/AZEQj02lcg5iy3tNowjob0pfHUigF0HYUl5XyQfGrNx5jL14i bc43ACd63gqs/xvF3w4TVqGmopF0Ceuty1Ej6/2losRULn0HvDmORJWrSW2DYHs= =UMik -----END PGP SIGNATURE----- --ldLn8KHMsHXjwxhB5KQBuvnuwrAb0v5Th-- From owner-freebsd-standards@FreeBSD.ORG Wed Jul 2 23:18:47 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8236D00 for ; Wed, 2 Jul 2014 23:18:47 +0000 (UTC) Received: from nm11-vm1.bullet.mail.bf1.yahoo.com (nm11-vm1.bullet.mail.bf1.yahoo.com [98.139.213.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 562502D72 for ; Wed, 2 Jul 2014 23:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1404343125; bh=IFQgDwTtZKwfI5O1cz/udqHJqdsrqMcfCD0Bq+yPi4s=; h=Received:Received:Received:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=sjm/GwUUeF48gbiyP2e0x8/k/Cd7D8OTY1fUhVfgvoqngpT2iPrL0h4D3R0FcxNO3mg+NJu6rSQFRocI55D/Pl2+Ca9A0sQXWfIips2+I6iwJ6CnQuW2CIfU3adOFFcs2jfPb6OGyQ9eorj4ZLJIPwslYlvRe0dtGxMZ6lo3H2hab624g6om4FZ1/95gtrGbhFKN3b1NxtczijaYUc4GtWoaScQA9D/TtOhIMAmvN9xwc4W+ktkxfQKX3Q0Z2PbYesb/YtZOuejnULjBUaGvq72yKrw/6GrP8cYpGF+9CcVe8yV2HqAk9oogKAQq2Ub1PL4mkqGqbR/OiHeHLQM8BA== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=e26BEmFZgIGIDhuoBsawO1fdRCTwpOYEu6OYFaths6i0TiR6s7DO78kd711I0HH7uX9BdY2ls2sbU9V4KpY5Lb3AHCAd0BszayfwdfqLEW2BNN+e6yp4d8ByMlCbHHaEOj3iGYJ6x/wfphsO+wAuyzV0WSmuBMFKWCwAl0CoZXlz/D3zKgdwh7T3lRxyJX8lXlNEcCS/zLqKzioWF/WpBPVRS0GRyoHXzCpLi+GveL6S8evmrd5pk+Y09tHK2pT7R/aDayb+qC42Q6s0C+qpC/qzq/Ga1KWgNx/saeEkGA34eqeAoemstes3ZeJWGMsfjDvYPxEyiM7Rqbm3ky+3RQ==; Received: from [66.196.81.174] by nm11.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jul 2014 23:18:45 -0000 Received: from [98.139.213.11] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jul 2014 23:18:45 -0000 Received: from [127.0.0.1] by smtp111.mail.bf1.yahoo.com with NNFMP; 02 Jul 2014 23:18:45 -0000 X-Yahoo-Newman-Id: 74937.33835.bm@smtp111.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: VBdqtr0VM1lysjUH30LI5to5NDLIY_CpqR9m0p6k5jUKA1d 23NNMBlt3ZwQuSfYFGW8maIgDke7C0odBTpIHIQVFjZVAAojALhRJxhgcSg3 Ag3YkXXV5Ff4Q7tgcSSIlG1iB.X1vviKQUU1zHD.bwWrIyUPtZgjxA.T5Pe1 7S_pgvfAb8PICdu.XBzByLG4lO_uZvWDk_uDVNHR_mpQb4ZOmN0_HULN7FUr Y0fIpC1xbsyLAjvkcmbXZIu_ayuAIjoRYQz.0aaspUJLojYV83kfJjh.265L ZtgzFa2UnMEv2jQc.5xsIPAYxYhZ.4K1u55Tbe9SDvk.o8Z2MJWB3fA8Lqpd mXUcAKvZF1GGr4p1JviV76SoGCb5P05zGcKSuPmxC55d.092IRwtiFCmxQif DP1UgdB3Ibm8BPCFMr6ynA27w4LG5Isv4XheZx6YrjRFdoWp0qykNcvk6Vwa _2IK.RSq92aEFF1lTHjgKXkcHucLiAGg3bA2Hh_N92fMopjDe7ohlJ9L0YA0 jSPkSsGQ4dWNMTZ831SzJ8MNO5c4fWimAYJl2pm5TYLeZAYLo13BhzT2WRiE 1y9uJBJyjU73ogzJKBs1yC5nvJdY2JCzUvJxK4OaciYQj2GyyAtmyPFsKhFK 42kilfKnUe2IrvrltNAGxN7AbkEaAqt.c9NJ7xrwD.jaEk6YwE1zjbHVrNno DntydlzDk1xplFK.xBovbSDeoy.vMFePqJ9LoVW9buTJdML.vSoJtahQZ0wE - X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.100] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp111.mail.bf1.yahoo.com with SMTP; 02 Jul 2014 16:18:45 -0700 PDT Message-ID: <53B49363.9020308@freebsd.org> Date: Wed, 02 Jul 2014 18:18:59 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Bryan Drewery , Jilles Tjoelker Subject: Re: sed -i References: <53556919.4010305@freebsd.org> <53ADD32C.5040503@FreeBSD.org> <20545470-A847-4835-A42B-382E5CC363ED@freebsd.org> <53B477E6.10103@FreeBSD.org> <20140702221739.GB61834@stack.nl> <53B485D3.1080602@FreeBSD.org> In-Reply-To: <53B485D3.1080602@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 23:18:47 -0000 On 07/02/14 17:21, Bryan Drewery wrote: > On 7/2/2014 5:17 PM, Jilles Tjoelker wrote: >> On Wed, Jul 02, 2014 at 04:21:42PM -0500, Bryan Drewery wrote: >>> On 6/27/2014 4:15 PM, Pedro Giffuni wrote: >>>> While here, there is also the sed(1) syntax issue: >>>> https://www.illumos.org/issues/586 >>>> Adopting both changes would probably reduce to a minimum the use of >>>> GNU sed in the ports tree, but such changes are likely to be >>>> controversial(?) and I don’t feel like wearing asbestos underwear at >>>> this time .. at least not for sed ;). >>> IMHO yes that is a good thing to bring over as it helps with people >>> coming from other platforms and improves portability with scripts. I >>> started on Linux and kept wondering why I had FILEe files all over my >>> system until I realized -i '' was required on FreeBSD. >> What are your ideas about the breakage this will cause? sed -i was >> proposed in the Austin Group, but standardization broke down on this >> issue. >> >> Even a simple grep for 'sed -i' finds a few dozen uses in FreeBSD base >> that would be broken, for example: >> > Breaking -i '' is not acceptable. > > I can't find the patch in question, but from the linked issue I found: > > https://gist.github.com/jclulow/1394562 > > It seems to address the backwards-compat concern. FWIW, that patch is not in illumos [1]. >> etc/Makefile: sed -i "" -e 's;.*/usr/libexec/atrun;#&;' ${DESTDIR}/etc/crontab >> >> On the other hand, >> >> usr.sbin/pc-sysinstall/backend/functions-cleanup.sh: sed -i -e "s|my.domain|${HOSTNAME} ${HOSTNAME}|g" ${FSMNT}/etc/hosts >> >> appears to attempt to use the GNU form. >> >> Also, where a backup suffix is deliberately given, it is always attached >> to -i. Therefore, it would work for the scripts in FreeBSD base to use >> the GNU behaviour except that an empty argument after an argumentless -i >> option counts as an argument to that -i option anyway. >> > Undoubtedly backwards compatibility is a concern: we should add a test for this (if there isn't already). Pedro. [1] Check history on: http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/sed/ From owner-freebsd-standards@FreeBSD.ORG Thu Jul 3 19:03:35 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D7EB855 for ; Thu, 3 Jul 2014 19:03:35 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F4E829C1 for ; Thu, 3 Jul 2014 19:03:35 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s63J3ZBE065604 for ; Thu, 3 Jul 2014 20:03:35 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] New: FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Thu, 03 Jul 2014 19:03:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 19:03:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 Bug ID: 191586 Summary: FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: yaneurabeya@gmail.com POSIX specifies certain requirements for validating sa_family with bind(2) and connect(2): >From bind(2): [EAFNOSUPPORT] The specified address is not a valid address for the address family of the specified socket. ... [EINVAL] The address_len argument is not a valid length for the address family. >From connect [2]: [EINVAL] The address_len argument is not a valid length for the address family; or invalid address family in the sockaddr structure. >From listen [3]: [EDESTADDRREQ] The socket is not bound to a local address, and the protocol does not support listening on an unbound socket. FreeBSD 10/stable does not appear to be conforming to POSIX: - bind(2) doesn't appear to be validating the sa_family member at all (it doesn't set errno to either EAFNOSUPPORT or EINVAL). - connect(2)'s not handling EINVAL properly, but the issue is being caught with EAFNOSUPPORT . - listen(2)'s not handling EDESTADDRREQ. I haven't tested out a kernel built INET, INET6, or SCTP support compiled out to ensure that these cases would be caught properly. 1. http://pubs.opengroup.org/onlinepubs/009695399/functions/bind.html 2. http://pubs.opengroup.org/onlinepubs/009695399/functions/connect.html 3. http://pubs.opengroup.org/onlinepubs/009695399/functions/listen.html % uname -a FreeBSD freebsd-10-x64.localdomain 10.0-STABLE FreeBSD 10.0-STABLE #2 r267849+810c962(stable/10): Wed Jun 25 14:23:41 PDT 2014 root@freebsd-10-x64.localdomain:/usr/obj/usr/src/sys/GENERIC-WITHOUT-WITNESS amd64 % sysctl -Na | grep -q sctp && echo "has SCTP" has SCTP % sysctl kern.features. | grep 'inet' kern.features.inet: 1 kern.features.inet6: 1 % cat /root/test_bogus_sa_family.c #include #include #include #include #include #include #include #include #include int main(void) { struct sockaddr_in sai; int sock; sock = socket(AF_INET, SOCK_STREAM, 0); memset(&sai, 0, sizeof(sai)); memset(&sai, 0, sizeof(sai)); sai.sin_family = AF_MAX + 10; sai.sin_addr.s_addr = INADDR_ANY; sai.sin_port = 42000; if (bind(sock, (struct sockaddr*)&sai, sizeof(sai)) == 0) { warnx("bind did not fail with invalid sin_family as expected"); if (listen(sock, 1) == 0) { warnx("and is now listening for connections on an invalid address family!? (netstat output follows)"); system("netstat -a | grep LISTEN"); } else warn("but did fail when listen was called"); } else if (errno != EAFNOSUPPORT) warn("bind did not fail with EAFNOSUPPORT"); else printf("bind test passed"); close(sock); sock = socket(AF_INET, SOCK_STREAM, 0); if (connect(sock, (struct sockaddr*)&sai, sizeof(sai)) == 0) warnx("connect did not fail with invalid sin_family as expected"); else if (errno != EINVAL) warn("connect did not fail with EINVAL"); else printf("connect test passed"); close(sock); return (0); } % /root/test_bogus_sa_family test_bogus_sa_family: bind did not fail with invalid sin_family as expected test_bogus_sa_family: and is now listening for connections on an invalid address family!? (netstat output follows) tcp4 0 0 *.4260 *.* LISTEN tcp4 0 0 localhost.smtp *.* LISTEN tcp4 0 0 *.ssh *.* LISTEN tcp6 0 0 *.ssh *.* LISTEN tcp6 0 0 *.nfsd *.* LISTEN tcp4 0 0 *.nfsd *.* LISTEN tcp4 0 0 *.mecomm *.* LISTEN tcp6 0 0 *.mecomm *.* LISTEN tcp4 0 0 *.sunrpc *.* LISTEN tcp6 0 0 *.sunrpc *.* LISTEN test_bogus_sa_family: connect did not fail with EINVAL: Address family not supported by protocol family -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jul 3 19:04:11 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26F64889 for ; Thu, 3 Jul 2014 19:04:11 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DBE029C9 for ; Thu, 3 Jul 2014 19:04:11 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s63J4AGt069447 for ; Thu, 3 Jul 2014 20:04:10 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Thu, 03 Jul 2014 19:04:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 19:04:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #1 from yaneurabeya@gmail.com --- (In reply to yaneurabeya from comment #0) > POSIX specifies certain requirements for validating sa_family with bind(2) > and connect(2): ... and connect(2) -> connect(2), and listen(2). -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jul 3 19:04:16 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 940918AF for ; Thu, 3 Jul 2014 19:04:16 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AD5329CA for ; Thu, 3 Jul 2014 19:04:16 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s63J4GQs069493 for ; Thu, 3 Jul 2014 20:04:16 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Thu, 03 Jul 2014 19:04:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_severity Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 19:04:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 yaneurabeya@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Affects Only Me |Affects Some People -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jul 3 19:04:45 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97F918DC for ; Thu, 3 Jul 2014 19:04:45 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F08729D0 for ; Thu, 3 Jul 2014 19:04:45 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s63J4j3P069647 for ; Thu, 3 Jul 2014 20:04:45 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Thu, 03 Jul 2014 19:04:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: see_also Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 19:04:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 yaneurabeya@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.freebsd.org/bu | |gzilla/show_bug.cgi?id=1913 | |82 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Thu Jul 3 22:01:39 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 342AA850 for ; Thu, 3 Jul 2014 22:01:39 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 166D9298E for ; Thu, 3 Jul 2014 22:01:39 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s63M1cP8090426 for ; Thu, 3 Jul 2014 23:01:38 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Thu, 03 Jul 2014 22:01:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lambert.tr@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 22:01:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 Terry Lambert changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lambert.tr@gmail.com --- Comment #2 from Terry Lambert --- Some valid statements, some invalid. You would have to configure the VSX4 tests correctly to expect the results that you'd get, but some of these are optional implement, while still being conformant. For the interfaces in question, the relevant documents are: http://pubs.opengroup.org/onlinepubs/009695399/functions/bind.html http://pubs.opengroup.org/onlinepubs/009695399/functions/connect.html http://pubs.opengroup.org/onlinepubs/009695399/functions/listen.html Comments are by API: bind(2): The EAFNOSUPPORT is non-optional; however, the test code is bogus, in that it has to specify an existing address family, such as AF_INET, rather than a potentially loaded/pluggable address family. Because this is a negative assertion test, it needs to hit on something that's actually guaranteed to be there, such as AF_INET r AF_UNIX. The EINVAL in bind(2) is an optional error return: "The bind() function may fail if..."; this indicates that bounds checking of the length is not a requirement. The rationale for this is to allow a larger-than-needed buffer to be used for a sockaddr and take it to a sockaddr_in as a void value, if needed, such that different values can be used (this is derived from the SVID III definition for the TLI implementation of separation of naming, from which the POSIX tests are originally derived). You could (potentially) make a case for bounds checking for a known address family (not pluggable) on the basis of the decode of the sin_family/sin_addr tuple, but the standard does not require it. connect(2): The EINVAL is similarly an optional error return: "The connect() function may fail if"... same base rationale. listen(2): The EDESTADDRREQ is similarly non-optional; again, however, the test is bogus for its use of an out of range/undefined address family definition. --- NB: I believe Andrew and Neil would be open to giving a select group of FreeBSD developers access to the actual test suite, perhaps later this year, assuming additional discussion and closed access to the test suite to a select group. It should very much be noted that in any conflict between the test suite and the standard, the test suite is assumed to be more correct than the actual standard, unless you file a TSD (Test Suite Deficiency) report, and The Open Group and the Austin Group agree that a test suite change is warranted by the rationale for the report. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Fri Jul 4 07:05:53 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FFCD7BC for ; Fri, 4 Jul 2014 07:05:53 +0000 (UTC) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA2B3271D for ; Fri, 4 Jul 2014 07:05:52 +0000 (UTC) Received: by mail-la0-f48.google.com with SMTP id el20so868982lab.7 for ; Fri, 04 Jul 2014 00:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=2cWdL76uICr4AzbLLeNd65ADOQnqpWmGPCZNSYl3VY0=; b=sgDU5YaMmAYfYCKTMuVKwnQY5RSQWVkIYBqYlZ+pzi8bHRDrl8Z9d5L9FlzE9N2q4M AbhZHSyuydhVHzFC+kMBAEE4cnul1miuWC+JN6cHmP3O3HVogM4c++FkASAGVdgOYroQ non2NewyHqIpfnhNBkEJoCsMPoxcXDF4aWS72RBtxuQKNZx+SjG6osz1ebpx2+hrI49u nG6EllCTqe/QS7GlcVJ9bJU8XJqJGoWQI2cLpqNgGuvDEfdLcH8zrtyEQLas0dlOCGj+ xKzENQy5syXsuyC/o89KTDHSfoe1Tpo0XPuKAEEhOTxyIKxFRRsciA0POREcHvbNwVNF j7jg== X-Received: by 10.152.87.164 with SMTP id az4mr203087lab.74.1404457550646; Fri, 04 Jul 2014 00:05:50 -0700 (PDT) Received: from [10.0.1.2] (ip-95-220-95-94.bb.netbynet.ru. [95.220.95.94]) by mx.google.com with ESMTPSA id kw10sm14508517lac.24.2014.07.04.00.05.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Jul 2014 00:05:48 -0700 (PDT) From: Dmitry Sivachenko Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: About sysconf(_SC_GETPW_R_SIZE_MAX) Message-Id: Date: Fri, 4 Jul 2014 11:05:46 +0400 To: freebsd-standards@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) X-Mailer: Apple Mail (2.1878.2) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 07:05:53 -0000 Hello! (FreeBSD-10/stable). According to sysconf(3), _SC_GETPW_R_SIZE_MAX is the valid argument to = sysconf(): _SC_GETPW_R_SIZE_MAX Suggested initial value for the size of the password entry buffer. But the following test program fails: #include #include #include #include int main() { int buf_sz; errno=3D0; buf_sz =3D sysconf(_SC_GETPW_R_SIZE_MAX); printf("%d\n", buf_sz); warn("sysconf: "); return 0; } % ./a.out=20 -1 a.out: sysconf: : Invalid argument What is wrong? Thanks!= From owner-freebsd-standards@FreeBSD.ORG Fri Jul 4 13:00:23 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F13AE63 for ; Fri, 4 Jul 2014 13:00:23 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B51122815 for ; Fri, 4 Jul 2014 13:00:22 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s64D0Hr6088090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jul 2014 16:00:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s64D0Hr6088090 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s64D0Hdn088089; Fri, 4 Jul 2014 16:00:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 4 Jul 2014 16:00:17 +0300 From: Konstantin Belousov To: Dmitry Sivachenko Subject: Re: About sysconf(_SC_GETPW_R_SIZE_MAX) Message-ID: <20140704130017.GG93733@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s2LtGGIeHe+Td5YU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 13:00:23 -0000 --s2LtGGIeHe+Td5YU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 04, 2014 at 11:05:46AM +0400, Dmitry Sivachenko wrote: > Hello! >=20 > (FreeBSD-10/stable). >=20 > According to sysconf(3), _SC_GETPW_R_SIZE_MAX is the valid argument to sy= sconf(): >=20 > _SC_GETPW_R_SIZE_MAX > Suggested initial value for the size of the password entry > buffer. >=20 > But the following test program fails: >=20 > #include > #include > #include > #include >=20 > int main() { > int buf_sz; >=20 > errno=3D0; > buf_sz =3D sysconf(_SC_GETPW_R_SIZE_MAX); > printf("%d\n", buf_sz); > warn("sysconf: "); > return 0; > } >=20 > % ./a.out=20 > -1 > a.out: sysconf: : Invalid argument >=20 >=20 > What is wrong? =46rom lib/libc/gen/sysconf.c, around line 327: #if _POSIX_THREAD_SAFE_FUNCTIONS > -1 case _SC_GETGR_R_SIZE_MAX: case _SC_GETPW_R_SIZE_MAX: #error "somebody needs to implement this" #endif --s2LtGGIeHe+Td5YU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTtqVhAAoJEJDCuSvBvK1BfrgP/j0bYJcXt2kqs+YsNOrjHjR8 9ZamVUow5Adl2i06PGLuYosMLlKecx2sfpU8n5uJ/8Lpfmh5ORWxxUeFqKrnUsxE 7f5ln+EfiMJxejxw3SxC7iEEoGiC+E/JycGBEz0GN7b/5p9DULmJ/QavQxYxuoCI d/mwrORYmTcJ0H1pas4kotuyKKk/z9q4cEc+DJiUTOPI/bvc0mDtPAx9MZURMjBU WbZrH9uSJjgvfMdd8Z3tOANBFeeJclUq4nthgeiDQ53COKj51vwlesDtyfbj92h/ IWhsotJuac9XP7NZ9PrVq4jj6L7Hl7rJhGzw4FiiAWDrap3hsdjiiRE1VY5+6K7Q 3MCsC2SBg4B7ZZi1s9VieNTv4Ymm3LSS9q6Zly0uYXpFkJNWQXPsuAd7gMrcxJms 3vcpkPTXba2HjIqtcIoacOusDbFHMLvGA9reiUR+2VCMG+bmXdzzqTbjo2sK2ro0 +Gf2uq1SOiMzoct9CyH3hxCVeUUxTKo7vhXE8C1wgHRkDAtJscxzrAMoLTP9Ba82 rFYO8pNwKnfjqSnmgiSEHmympEaUUX8QIFZ7zfNpRhf5C4LRkgC4EDkSwwoGxhtG giGHcEnsnfCrI6468Tw0SC8bQ6DlYJ9LoACbV36stgRXIrLgBuHKSmTM00XJI0tB HMzI4ClKf1wMuNw4tEI5 =HhZT -----END PGP SIGNATURE----- --s2LtGGIeHe+Td5YU-- From owner-freebsd-standards@FreeBSD.ORG Fri Jul 4 14:17:25 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 631B871D for ; Fri, 4 Jul 2014 14:17:25 +0000 (UTC) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com [IPv6:2a00:1450:4010:c04::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDBD22EA6 for ; Fri, 4 Jul 2014 14:17:24 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id 10so1224379lbg.15 for ; Fri, 04 Jul 2014 07:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=97wswigKZeeKNA6JtLKdkFHGnZ4gtlBj3EQvT96J/k4=; b=vNhVwI5zdoTgkAPhYoFxE2CRV/DMB01OSW5Bw2Tm3uD7xbGTMS6T8BZkzRKXeoZLi6 nB56JpK4q8W5EGelBfMeG8IWM69QUZ1+DQ1D4fCjCvA/Jv1AYFrzGIeGdhsJYleFa9FZ MOjQaFRbdRzMgNR7ijB0OWdBBfoERNkVfh97olv20c7seR/2wPWPf9UVB6IY1ENqovpY dJKCiI/bGrGOTq4qWx7bXAJp55NWxNs9iPvmNxd5IeQAIXFG4DHhB634cIMuyUAvVuJE j6dbCYFGl9YhjM/0BVOci1Kl2Ngqqls/iAUcbIKZz0VDhkWVgpVDEGgBOjHI2YX9BnDJ fkMQ== X-Received: by 10.152.121.73 with SMTP id li9mr47952lab.94.1404483442692; Fri, 04 Jul 2014 07:17:22 -0700 (PDT) Received: from ?IPv6:2a02:6b8::408:9186:aec2:d3a:9405? ([2a02:6b8:0:408:9186:aec2:d3a:9405]) by mx.google.com with ESMTPSA id k5sm6851170lak.8.2014.07.04.07.17.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Jul 2014 07:17:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: About sysconf(_SC_GETPW_R_SIZE_MAX) From: Dmitry Sivachenko In-Reply-To: <20140704130017.GG93733@kib.kiev.ua> Date: Fri, 4 Jul 2014 18:17:18 +0400 Content-Transfer-Encoding: quoted-printable Message-Id: <5EA35BF7-3984-4FD4-B523-9767E142475A@gmail.com> References: <20140704130017.GG93733@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1878.2) Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 14:17:25 -0000 On 04 =D0=B8=D1=8E=D0=BB=D1=8F 2014 =D0=B3., at 17:00, Konstantin = Belousov wrote: > On Fri, Jul 04, 2014 at 11:05:46AM +0400, Dmitry Sivachenko wrote: >> Hello! >>=20 >> (FreeBSD-10/stable). >>=20 >> According to sysconf(3), _SC_GETPW_R_SIZE_MAX is the valid argument = to sysconf(): >>=20 >> _SC_GETPW_R_SIZE_MAX >> Suggested initial value for the size of the password = entry >> buffer. >>=20 >> But the following test program fails: >>=20 >> #include >> #include >> #include >> #include >>=20 >> int main() { >> int buf_sz; >>=20 >> errno=3D0; >> buf_sz =3D sysconf(_SC_GETPW_R_SIZE_MAX); >> printf("%d\n", buf_sz); >> warn("sysconf: "); >> return 0; >> } >>=20 >> % ./a.out=20 >> -1 >> a.out: sysconf: : Invalid argument >>=20 >>=20 >> What is wrong? >=20 > =46rom lib/libc/gen/sysconf.c, around line 327: > #if _POSIX_THREAD_SAFE_FUNCTIONS > -1 > case _SC_GETGR_R_SIZE_MAX: > case _SC_GETPW_R_SIZE_MAX: > #error "somebody needs to implement this" > #endif May be remove these two from man page?= From owner-freebsd-standards@FreeBSD.ORG Fri Jul 4 15:20:30 2014 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C015D15 for ; Fri, 4 Jul 2014 15:20:30 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A925D23EB for ; Fri, 4 Jul 2014 15:20:29 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s64FKO5A020463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jul 2014 18:20:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s64FKO5A020463 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s64FKOli020462; Fri, 4 Jul 2014 18:20:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 4 Jul 2014 18:20:24 +0300 From: Konstantin Belousov To: Dmitry Sivachenko Subject: Re: About sysconf(_SC_GETPW_R_SIZE_MAX) Message-ID: <20140704152024.GI93733@kib.kiev.ua> References: <20140704130017.GG93733@kib.kiev.ua> <5EA35BF7-3984-4FD4-B523-9767E142475A@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XNnk+1bw058nV8qh" Content-Disposition: inline In-Reply-To: <5EA35BF7-3984-4FD4-B523-9767E142475A@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 15:20:30 -0000 --XNnk+1bw058nV8qh Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 04, 2014 at 06:17:18PM +0400, Dmitry Sivachenko wrote: >=20 > On 04 =C9=C0=CC=D1 2014 =C7., at 17:00, Konstantin Belousov wrote: >=20 > > On Fri, Jul 04, 2014 at 11:05:46AM +0400, Dmitry Sivachenko wrote: > >> Hello! > >>=20 > >> (FreeBSD-10/stable). > >>=20 > >> According to sysconf(3), _SC_GETPW_R_SIZE_MAX is the valid argument to= sysconf(): > >>=20 > >> _SC_GETPW_R_SIZE_MAX > >> Suggested initial value for the size of the password entry > >> buffer. > >>=20 > >> But the following test program fails: > >>=20 > >> #include > >> #include > >> #include > >> #include > >>=20 > >> int main() { > >> int buf_sz; > >>=20 > >> errno=3D0; > >> buf_sz =3D sysconf(_SC_GETPW_R_SIZE_MAX); > >> printf("%d\n", buf_sz); > >> warn("sysconf: "); > >> return 0; > >> } > >>=20 > >> % ./a.out=20 > >> -1 > >> a.out: sysconf: : Invalid argument > >>=20 > >>=20 > >> What is wrong? > >=20 > > From lib/libc/gen/sysconf.c, around line 327: > > #if _POSIX_THREAD_SAFE_FUNCTIONS > -1 > > case _SC_GETGR_R_SIZE_MAX: > > case _SC_GETPW_R_SIZE_MAX: > > #error "somebody needs to implement this" > > #endif >=20 >=20 > May be remove these two from man page? I suppose it is better to implement them, trivially: diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index b7952b1..2b3acfb 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -367,11 +367,17 @@ yesno: * _POSIX_FILE_LOCKING, so we can't answer this one. */ #endif -#if _POSIX_THREAD_SAFE_FUNCTIONS > -1 + + /* + * SUSv4tc1 says the following about _SC_GETGR_R_SIZE_MAX and + * _SC_GETPW_R_SIZE_MAX: + * Note that sysconf(_SC_GETGR_R_SIZE_MAX) may return -1 if + * there is no hard limit on the size of the buffer needed to + * store all the groups returned. + */ case _SC_GETGR_R_SIZE_MAX: case _SC_GETPW_R_SIZE_MAX: -#error "somebody needs to implement this" -#endif + return (-1); case _SC_HOST_NAME_MAX: return (MAXHOSTNAMELEN - 1); /* does not include \0 */ case _SC_LOGIN_NAME_MAX: --XNnk+1bw058nV8qh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTtsY3AAoJEJDCuSvBvK1BFTAQAJHYHa1vZHcZ/BOiFsglakcS ok3A78UWTyWIP2Lxp4NCK0qwoQ6kABzN0GLhLzWGl6JNdAfxGr661KJhiZtOOlMM pc/1YF+5o8qmOChd+GHcYeLyNo1zrLMXPWf18ccmEOaDdwq7qfzXzGrzklZ5mnEm KI1YU8f526KOkC2Mh+tusZhLheffJZfGlzhJNSWHEiWcTwbInotzvGXUZtWn92iE 4fgV25idehTmOR787GhodzDZFq65tNISciU6g58o8XxUT/vDMGqCSjAwhK/s2HXD mIB8H5IV9EV9k/VVaXVmGk+aBjDq15u8dY1WvmNR4KIyJYX0Fsv0uv6UpSLuK4qh ysioxJO/U2iPooIQ8+elJ2OaoHtLBMnHE1w5czk+NwpnunlsVN3gggMZGc/DmS1j MeLfpsiSt1RiB7ZrqwOZtJbOTQuHylMsnnJb85LX2qNW5LvYmaab6TeTg6Qy9To+ d5F6KgujCeOl5PG40qAwCWmksiIJaST7UkpNa17eee28JNXfpqse5A0akvaikmMo h5ZkJDFXiHn3D70bhdaSqaTaCnVpVazHdVBvvy6rocPLHKAyZ/BoVvbMp103B7f8 97RtaoxLrcB1pZwM5vVce9xNCdv3wbLqchEgkcaDDQ7MAFX2DIF1M7/F0ZY3noZZ bzg8CNLP829zDMNjU812 =75Kl -----END PGP SIGNATURE----- --XNnk+1bw058nV8qh-- From owner-freebsd-standards@FreeBSD.ORG Fri Jul 4 16:19:24 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50787CF1 for ; Fri, 4 Jul 2014 16:19:24 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D2B32997 for ; Fri, 4 Jul 2014 16:19:24 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s64GJNec077882 for ; Fri, 4 Jul 2014 17:19:23 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Fri, 04 Jul 2014 16:19:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kevlo@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 16:19:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 Kevin Lo changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Triage |In Discussion CC| |kevlo@FreeBSD.org --- Comment #3 from Kevin Lo --- (In reply to Terry Lambert from comment #2) > Some valid statements, some invalid. You would have to configure the VSX4 > tests correctly to expect the results that you'd get, but some of these are > optional implement, while still being conformant. > > For the interfaces in question, the relevant documents are: > http://pubs.opengroup.org/onlinepubs/009695399/functions/bind.html > http://pubs.opengroup.org/onlinepubs/009695399/functions/connect.html > http://pubs.opengroup.org/onlinepubs/009695399/functions/listen.html > > > Comments are by API: > > bind(2): > > The EAFNOSUPPORT is non-optional; however, the test code is bogus, in that > it has to specify an existing address family, such as AF_INET, rather than a > potentially loaded/pluggable address family. Because this is a negative > assertion test, it needs to hit on something that's actually guaranteed to > be there, such as AF_INET r AF_UNIX. [snip] Here's the diff that enables check family for bind(2), ok? Index: sys/netinet/in_pcb.c =================================================================== --- sys/netinet/in_pcb.c (revision 268261) +++ sys/netinet/in_pcb.c (working copy) @@ -528,14 +528,11 @@ in_pcbbind_setup(struct inpcb *inp, struct sockadd sin = (struct sockaddr_in *)nam; if (nam->sa_len != sizeof (*sin)) return (EINVAL); -#ifdef notdef /* - * We should check the family, but old programs - * incorrectly fail to initialize it. + * Family check. */ if (sin->sin_family != AF_INET) return (EAFNOSUPPORT); -#endif error = prison_local_ip4(cred, &sin->sin_addr); if (error) return (error); -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Fri Jul 4 17:04:56 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FEF0564 for ; Fri, 4 Jul 2014 17:04:56 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 350862D94 for ; Fri, 4 Jul 2014 17:04:56 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s64H4uPE040125 for ; Fri, 4 Jul 2014 18:04:56 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Fri, 04 Jul 2014 17:04:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lambert.tr@gmail.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2014 17:04:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #4 from Terry Lambert --- Since this isn't a "MAY", this is a "SHALL", I still *totally agree* with you that it's a missing mandatory check, and can't be ignored, but this is not necessarily the proper place for it, without the side effect testing. -- It's reasonable, but it would need some better testing. My initial objection to a "just make it all work" was only based on the unit test not testing what it claimed it was testing. -- Extra unit testing would be needed because doing the test in in_pcbbind_setup() like this also impacts other callers besides in_pcbbind(): in_pcbbind() in_pcbconnect_setup(() and, as a consequence, their callers: tcp_connect() <- this is where you want it to hit udp_output() udp6_bind() div_bind() <- specifically references that it will be passed a valid address ...and any other third party connection oriented protocols layered on top of IP. I also think that POSIX is not specifically concerned with AF_INET, so doing the check at this specific location might be simultaneously too narrow in scope. It's arguable that the check should actually be happening in a higher level protocol family function, or even based on protocol family metadata at one higher level than that, where the dispatch to the protocol family via AF_INET as the value got it into the protocol family code in the first place. In other words, the upper layer bind/connect code prior to the protocol dispatch, based on a "check address family first" bit in the protocol family descriptor. A valid argument against that approach might be that this would add general code path overhead for protocols that don't care/don't want the check by adding a single bit check and an interior dereference to get the flag bit and compare family, but it'd let you throw the right error for "AF_MAX + 10" EAFNOSUPPORT, which the code doesn't do, before or after the patch, in some circumstances. FFR: One of the reasons Mac OS X ignored optional ("MAY RETURN") error codes where they were not already implemented when we did the POSIX conformance certification was that overhead. A second reason we didn't add some simple checks we could have added was due to the fact that the behaviour was tied between APIs for the VSX test suite, i.e. you couldn't pick one "MAY" "here" and not pick it "there", and it can take 3-6 months to argue a test suite deficiency, and it's often more important to be compliant than right. NB: Sorry to be something of a downer on this; I was tech load on the Mac OS X POSIX conformance for Apple for the entire project, and there's a really narrow tight rope you have to walk between making as few changes as possible, and as many as absolutely necessary. I'm in the middle of moving my house right now, but I'm pretty sure I can be more genuinely helpful with actual code changes some time after that. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sun Jul 6 10:05:44 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CA5F882 for ; Sun, 6 Jul 2014 10:05:44 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4384C237D for ; Sun, 6 Jul 2014 10:05:44 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s66A5iXE030522 for ; Sun, 6 Jul 2014 11:05:44 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191652] New: Text console - true color (24 bit, 16 million colors) support Date: Sun, 06 Jul 2014 10:05:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: anton.kochkov@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 10:05:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191652 Bug ID: 191652 Summary: Text console - true color (24 bit, 16 million colors) support Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Many People Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: anton.kochkov@gmail.com Here's a test case: printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n" * or http://github.com/robertknight/konsole/tree/master/tests/color-spaces.pl * or https://git.gnome.org/browse/vte/tree/perf/img.sh?h=vte-0-36 According to Wikipedia[1], this is only supported by xterm and konsole. It's a common confusion about terminal colors... Actually we have this: * plain ascii * ansi escape codes (16 color codes with bold/italic and background) * 256 color palette (216 colors+16gray + ansi) (colors are 24bit) * 24bit true color (888 colors (aka 16 milion) The 256 color palete is configured at start, and it's a 666 cube of colors, each of them defined as a 24bit (888 rgb) color. This means that current support can only display 256 different colors in the terminal, while truecolor means that you can display 16 milion different colors at the same time. Truecolor escape codes doesnt uses a color palete. It just specifies the color itself. [1] https://en.wikipedia.org/wiki/ANSI_color Here are terminals discussions ============================== Now supporting truecolor ------------------------ * st (from suckless) - http://lists.suckless.org/dev/1307/16688.html * konsole - https://bugs.kde.org/show_bug.cgi?id=107487 * iterm2 - https://code.google.com/p/iterm2/issues/detail?id=218 * all libvte based terminals: https://bugzilla.gnome.org/show_bug.cgi?id=704449 * Gnome Terminal * sakura * Terminator * Lilyterm * ROXTerm * evilvte * Termit * Tilda * stjerm * tinyterm * GTKTerm2 Parsing ANSI color sequences, but approximating them to 256 palette ------------------------------------------------------------------- * xterm * mlterm - http://sourceforge.net/mailarchive/message.php?msg_id=31828705 NOT supporting truecolor ------------------------ * urxvt - http://lists.schmorp.de/pipermail/rxvt-unicode/2013q3/001826.html * Terminlogy (E17) - https://phab.enlightenment.org/T746 * mrxvt - https://sourceforge.net/p/materm/feature-requests/41/ * aterm - https://sourceforge.net/p/aterm/feature-requests/23/ * fbcon (linux kernel) - https://bugzilla.kernel.org/show_bug.cgi?id=79551 Here are another console programs discussions ============================================= * mutt - http://dev.mutt.org/trac/ticket/3674 * mc - http://www.midnight-commander.org/ticket/3145#comment:1 * s-lang library - http://lists.jedsoft.org/lists/slang-users/2014/0000001.html * ncurses library - https://lists.gnu.org/archive/html/bug-ncurses/2013-10/msg00007.html * mcabber - https://bitbucket.org/McKael/mcabber-crew/issue/126/support-for-true-color-16-millions-colors * emacs - http://emacs.1067599.n5.nabble.com/RFC-Add-tty-True-Color-support-td299962.html * vim - https://bitbucket.org/ZyX_I/vim/commits/branch/24-bit-xterm * tig - https://github.com/jonas/tig/issues/227 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sun Jul 6 15:20:31 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC661D04 for ; Sun, 6 Jul 2014 15:20:30 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD93B2A23 for ; Sun, 6 Jul 2014 15:20:30 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s66FKUlV050370 for ; Sun, 6 Jul 2014 16:20:30 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Sun, 06 Jul 2014 15:20:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kevlo@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2014 15:20:31 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #5 from Kevin Lo --- (In reply to Terry Lambert from comment #4) > Since this isn't a "MAY", this is a "SHALL", I still *totally agree* with > you that it's a missing mandatory check, and can't be ignored, but this is > not necessarily the proper place for it, without the side effect testing. > > -- > > It's reasonable, but it would need some better testing. My initial > objection to a "just make it all work" was only based on the unit test not > testing what it claimed it was testing. > > -- > > Extra unit testing would be needed because doing the test in > in_pcbbind_setup() like this also impacts other callers besides in_pcbbind(): > > in_pcbbind() > in_pcbconnect_setup(() > > and, as a consequence, their callers: > > tcp_connect() <- this is where you want it to hit > udp_output() > udp6_bind() > div_bind() <- specifically references that it will be passed a valid > address > > ...and any other third party connection oriented protocols layered on top of > IP. > > I also think that POSIX is not specifically concerned with AF_INET, so doing > the check at this specific location might be simultaneously too narrow in > scope. > > It's arguable that the check should actually be happening in a higher level > protocol family function, or even based on protocol family metadata at one > higher level than that, where the dispatch to the protocol family via > AF_INET as the value got it into the protocol family code in the first place. > > In other words, the upper layer bind/connect code prior to the protocol > dispatch, based on a "check address family first" bit in the protocol family > descriptor. > > A valid argument against that approach might be that this would add general > code path overhead for protocols that don't care/don't want the check by > adding a single bit check and an interior dereference to get the flag bit > and compare family, but it'd let you throw the right error for "AF_MAX + 10" > EAFNOSUPPORT, which the code doesn't do, before or after the patch, in some > circumstances. In case you missed it, the indentical test in the in6_pcbbind() function is performed. The same check in in_pcbconnect_setup() and in6_pcbladdr() are also actived. As comments say if old programs incorrectly fail to initialize it, they will return EAFNOSUPPORT. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 7 00:53:10 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 057A628D for ; Mon, 7 Jul 2014 00:53:10 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0A362713 for ; Mon, 7 Jul 2014 00:53:09 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s670r9mw014819 for ; Mon, 7 Jul 2014 01:53:09 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191676] New: tools/regression/lib/msun testcase failures on i386 Date: Mon, 07 Jul 2014 00:53:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 00:53:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191676 Bug ID: 191676 Summary: tools/regression/lib/msun testcase failures on i386 Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: yaneurabeya@gmail.com I run into a number of assertion failures on i386 with the lib/msun testcases that I don't run into with amd64 [with both clang and gcc47]. Are these known issues? % uname -a FreeBSD isilon-fuji-current.local 11.0-CURRENT FreeBSD 11.0-CURRENT #12 r267851+3e60b32(isilon-atf-fix-bsd-progs): Thu Jun 26 12:06:01 PDT 2014 root@isilon-fuji-current.local:/usr/obj/usr/src/sys/FUJI i386 % prove -rv . ./test-cexp.t ......... 1..7 ok 1 - cexp zero ok 2 - cexp nan ok 3 - cexp inf Assertion failed: (cfpequal_cs((cexpf)(_d), ( ((long double _Complex){ expf(finites[i]), 0.0 })), (1))), function test_reals, file test-cexp.c, line 200. Failed 4/7 subtests ./test-ctrig.t ........ 1..6 ok 1 - ctrig zero ok 2 - ctrig nan ok 3 - ctrig inf 0x1.921fb54442d18p-1 0x0p+0 0x1.4fc442p-1 0x0p+0 0x1.4fc444p-1 0x1.921fb54442d18p+0 0x0p+0 0x1.d594fep-1 0x0p+0 0x1.d595p-1 0x1.2d97c7f3321d2p+1 0x0p+0 0x1.f6e20cp-1 0x0p+0 0x1.f6e20ep-1 0x1.f6a7a2955385ep+1 0x0p+0 0x1.ff9a46p-1 0x0p+0 0x1.ff9a48p-1 0x1.2d97c7f3321d2p+2 0x0p+0 0x1.ffead8p-1 0x0p+0 0x1.ffeadap-1 0x1.5fdbbe9bba775p+2 0x0p+0 0x1.fffb9ap-1 0x0p+0 0x1.fffb9cp-1 ok 4 - ctrig axes ok 5 - ctrig small Assertion failed: (cfpequal_tol((ctanh)(_d), ( ((long double _Complex){ 1.0, -1.62994325413993477997492170229268382e-26L })), ( ldexpl(1.0, 1 - 53)), FPE_ABS_ZERO)), function test_large, file test-ctrig.c, line 433. Failed 1/6 subtests ./test-exponential.t .. 1..3 Assertion failed: (fpequal((expf)(_d), (__builtin_inff()))), function run_generic_tests, file test-exponential.c, line 106. Failed 3/3 subtests ./test-fenv.t ......... 1..8 ok 1 - fenv ok 2 - fenv ok 3 - fenv ok 4 - fenv ok 5 - fenv ok 6 - fenv ok 7 - fenv ok 8 - fenv ok ./test-fma.t .......... 1..19 Assertion failed: (fpequal((fma)(_vx, _vy, _vz), (-0.0))), function test_zeroes, file test-fma.c, line 116. Failed 19/19 subtests Failed 3/3 subtests ./test-fenv.t ......... 1..8 ok 1 - fenv ok 2 - fenv ok 3 - fenv ok 4 - fenv ok 5 - fenv ok 6 - fenv ok 7 - fenv ok 8 - fenv ok ./test-fma.t .......... 1..19 Assertion failed: (fpequal((fma)(_vx, _vy, _vz), (-0.0))), function test_zeroes, file test-fma.c, line 116. Failed 19/19 subtests ./test-invtrig.t ...... 1..7 Assertion failed: (fpequal_tol(acosf(_in), _out, ((0) * ldexpf(1.0, 1 - 24)), CS_BOTH)), function test_special, file test-invtrig.c, line 116. Failed 7/7 subtests -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 7 06:33:10 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A2D89C3 for ; Mon, 7 Jul 2014 06:33:10 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81E422F51 for ; Mon, 7 Jul 2014 06:33:10 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s676XAPJ027412 for ; Mon, 7 Jul 2014 07:33:10 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Mon, 07 Jul 2014 06:33:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lambert.tr@gmail.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 06:33:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #6 from Terry Lambert --- I didn't miss it. The test is still testing AF_MAX + 10, and assuming the existence of a particular set of AF's that are not mandated by POSIX, in order to provide the negative assertion. I believe the actual VSX4 tests use AF_UNIX, per the "shall define" description for . Given the #ifdef's to allow condition deletion of AF_INET/AF_INET6 support, this makes more sense anyway. I also believe the specific failure case was added to the error messages because of the unique nature of the Linux TCP implementation regarding the "simultaneous connect" case in section 3.4 of RFC 793, which Linux handles poorly. I still believe that the test should be done in upper level code, and yes, I am aware that that would mean adding fields to the protocol family structure to allw it to be done in a protocol independent fashion. Look at it this way: if I add XNS, RTSP, or some other protocol support, it's going to fail this negative assertion test when it shouldn't, since the API is supposed to be protocol agnostic. Does that seem right to you? -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 7 07:28:02 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8004068B for ; Mon, 7 Jul 2014 07:28:02 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 678C5234D for ; Mon, 7 Jul 2014 07:28:02 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s677S2pO013456 for ; Mon, 7 Jul 2014 08:28:02 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Mon, 07 Jul 2014 07:28:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kevlo@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 07:28:02 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #7 from Kevin Lo --- Nah, it doesn't make sense to me either. According to TCP/IP Illustrated, Vol 2, section 22.7, figure 22.22: 72 if (nam) { 73 sin = mtod(nam, struct sockaddr_in *); 74 if (nam->m_len != sizeof(*sin)) 75 return (EINVAL); 76 #ifdef notdef 77 /* 78 * We should check the family, but old programs 79 * incorrectly fail to initialize it. 80 */ 81 if (sin->sin_family != AF_INET) 82 return (EAFNOSUPPORT); 83 #endif 84 lport = sin->sin_port; /* might be 0 */ 76 - 83 The test for the correct address family is commented out, yet the identical test in the in_pcbconnect function is performed. We expect either both to be in or both to be out. Do you think both functions shouldn't perform the check? Thanks. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 7 08:00:14 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E79AE70 for ; Mon, 7 Jul 2014 08:00:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CC5B25AD for ; Mon, 7 Jul 2014 08:00:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6780EtE030496 for ; Mon, 7 Jul 2014 09:00:14 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) Message-Id: <201407070800.s6780EtE030496@kenobi.freebsd.org> From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 07 Jul 2014 08:00:14 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 08:00:14 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 188036: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188036 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: mblen(3) in EUC locales causes crash and segmentation fault. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 7 17:11:06 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D37396AB for ; Mon, 7 Jul 2014 17:11:06 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAC322B1B for ; Mon, 7 Jul 2014 17:11:06 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s67HB6I4034701 for ; Mon, 7 Jul 2014 18:11:06 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Mon, 07 Jul 2014 17:11:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lambert.tr@gmail.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 17:11:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #8 from Terry Lambert --- That's hard for me to answer without the VSX4 test sources in front of me. I will say that Mac OS X passes the tests, and that Mac OS X comments the test out, but without a lot of looking at upper level code, I'm still pretty sure they don't do the meta check I described at a higher level. Vincent Lubet (still networking manager at Apple) and more likely, Laurent Dumont (currently at Akamai) would be able to tell you for sure without groveling through code. The current Apple code with it "#if 0"'ed is visible here, FWIW: http://opensource.apple.com/source/xnu/xnu-2422.90.20/bsd/netinet/in_pcb.c There was no TSD (Test Suite Deficiency) or PIN (Permanent Interpretation) in this specific area during the Mac OS X UNIX certification process, so no test failure. I suspect that this is an area where the standard says what the people on the Austin Group who are representing Linux via IBM want it to say, and that the actual tests simply don't test it at all because it would conflict with existing implementations grandfathered under SVR3/SVR4 derivation rules. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 7 17:20:40 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E764DA7D for ; Mon, 7 Jul 2014 17:20:40 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CECD92C16 for ; Mon, 7 Jul 2014 17:20:40 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s67HKee1028901 for ; Mon, 7 Jul 2014 18:20:40 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191676] [tests] tools/regression/lib/msun testcase failures on i386 Date: Mon, 07 Jul 2014 17:20:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 17:20:41 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191676 yaneurabeya@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|tools/regression/lib/msun |[tests] |testcase failures on i386 |tools/regression/lib/msun | |testcase failures on i386 --- Comment #1 from yaneurabeya@gmail.com --- Here's what I did to skip over the failed assertions on i386 and fix the issue with precision on i386: - https://github.com/yaneurabeya/freebsd/commit/621df535e577ed84eaf7203a32589aa245c92679 - https://github.com/yaneurabeya/freebsd/commit/5e110d6e4e6fb0391ed329497da697a884bd5df8 - https://github.com/yaneurabeya/freebsd/commit/2ab79daaed044c30cd4450fa549500011b939b62 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Sat Jul 12 16:39:01 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E910B4FA for ; Sat, 12 Jul 2014 16:39:01 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B72AA20A2 for ; Sat, 12 Jul 2014 16:39:01 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6CGd1JB099879 for ; Sat, 12 Jul 2014 16:39:01 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Sat, 12 Jul 2014 16:39:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kevlo@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 16:39:02 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #9 from Kevin Lo --- Hi Terry, As you suggested, I asked Vincent Lubet how Mac OS X validates EAFNOSUPPORT in bind(2). Here is his response. "xnu version of bind() does not check the address family for AF_INET sockets for compatibility with older program -- that's a piece of code we inherited from FreeBSD! I do not have access to the POSIX test suite code but as Mac OS X was granted conformance I have to assume the POSIX test suite for bind() does not test for bogus address family for AF_INET sockets. May be they only test for AF_UNIX." Since Mac OS X was granted POSIX conformance, it makes more sense to me to validate EAFNOSUPPORT in bind(2) for AF_UNIX only. I think connect(2) should also return EAFNOSUPPORT for AF_UNIX on wrong address family. Here is the proposed patch, thanks Index: sys/kern/uipc_usrreq.c =================================================================== --- sys/kern/uipc_usrreq.c (revision 268570) +++ sys/kern/uipc_usrreq.c (working copy) @@ -467,6 +467,9 @@ uipc_bindat(int fd, struct socket *so, struct sock cap_rights_t rights; char *buf; + if (nam->sa_family != AF_UNIX) + return (EAFNOSUPPORT); + unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_bind: unp == NULL")); @@ -1278,6 +1281,9 @@ unp_connectat(int fd, struct socket *so, struct so cap_rights_t rights; int error, len; + if (nam->sa_family != AF_UNIX) + return (EAFNOSUPPORT); + UNP_LINK_WLOCK_ASSERT(); unp = sotounpcb(so); -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 14 05:08:08 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F956E60 for ; Mon, 14 Jul 2014 05:08:08 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2337C2C20 for ; Mon, 14 Jul 2014 05:08:08 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6E5883M070359 for ; Mon, 14 Jul 2014 05:08:08 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Mon, 14 Jul 2014 05:08:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lambert.tr@gmail.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 05:08:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #10 from Terry Lambert --- This seems like a great way of handling it. It might be reasonable to not in the commit message about what's going on (not sure if a bugzilla link would be a reasonable thing, but if so, that's probably enough). -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 14 06:04:47 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE09A5EF for ; Mon, 14 Jul 2014 06:04:47 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4F40207A for ; Mon, 14 Jul 2014 06:04:47 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6E64lqH081738 for ; Mon, 14 Jul 2014 06:04:47 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191586] FreeBSD doesn't validate negative edgecases in bind(2)/connect(2)/listen(2) like POSIX requires Date: Mon, 14 Jul 2014 06:04:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kevlo@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 06:04:47 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191586 --- Comment #11 from Kevin Lo --- Committed as r268601. Thank you Terry. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 14 08:00:15 2014 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F973E07 for ; Mon, 14 Jul 2014 08:00:15 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DC222A60 for ; Mon, 14 Jul 2014 08:00:15 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6E80F9q043693 for ; Mon, 14 Jul 2014 08:00:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Message-Id: <201407140800.s6E80F9q043693@kenobi.freebsd.org> From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 14 Jul 2014 08:00:15 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 08:00:15 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (2 bugs) Bug 164787: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=164787 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: dirfd() function not available when _POSIX_C_SOURCE is defined Bug 188036: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188036 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-standards@FreeBSD.org Status: Needs MFC Resolution: Summary: mblen(3) in EUC locales causes crash and segmentation fault.