From owner-freebsd-standards@FreeBSD.ORG Sun Jul 28 21:27:15 2013 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 ESMTP id 7C9867A6; Sun, 28 Jul 2013 21:27:15 +0000 (UTC) (envelope-from kubito@gmail.com) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C5872B45; Sun, 28 Jul 2013 21:27:13 +0000 (UTC) Received: by mail-la0-f48.google.com with SMTP id hi8so3483393lab.7 for ; Sun, 28 Jul 2013 14:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Rvb+Xw1Xmjeny08DFaM9CxfCpANkexBCMuHIKllYarw=; b=j0TmsaLc7Nfu1nd3dXPkbtRPCQPsB2YBuicVU1fneXk2Gxg5dbGhJztTxTyGXn+L4H e9ZiHtW8w276LILx8lUU9dPePUEwgBI/ZZePHONLd4SonYPyO3wB0JkN6S6NWBo1D3MW Xho2tOcLyGvLK9uZ/QsfEG4hUVSkRukP5VluVmjn4GAe6kYCjlmY8YULq3s/XMl/j+du N3IOw54QjBX1hVBO2QCiBEJuPKvoK6m9dASVsqzDb06GuxpVY7ZGfbSlVdZOLCwy7jLO AmlOoiiA/kp9B4tR9T+btdEGpbUkuk5wdsfxUk2pJ7whp4AdX4iT3+OvkbFTAYPZ4SmN 91Rg== X-Received: by 10.112.53.10 with SMTP id x10mr24743382lbo.28.1375046832077; Sun, 28 Jul 2013 14:27:12 -0700 (PDT) Received: from orwell.Elisa.gmail.com (a91-154-115-217.elisa-laajakaista.fi. [91.154.115.217]) by mx.google.com with ESMTPSA id k10sm4959313lbl.10.2013.07.28.14.27.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 28 Jul 2013 14:27:11 -0700 (PDT) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: Pasi Parviainen Subject: Re: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity References: <20130710155809.0f589c22@thor.walstatt.dyndns.org> <20130710183315.725dfde0@thor.walstatt.dyndns.org> <20130710203200.5359fd18@thor.walstatt.dyndns.org> <51DDC04B.6040209@FreeBSD.org> <20957.49978.73666.392417@khavrinen.csail.mit.edu> <20130711130043.R920@besplex.bde.org> <20130711202908.L84170@besplex.bde.org> <20130712234749.5afa3c9b@thor.walstatt.dyndns.org> <9B0A6D14-640E-4ADD-8E58-0B7867C7C674@FreeBSD.org> <51E145CC.8080900@iki.fi> Date: Mon, 29 Jul 2013 00:27:02 +0300 In-Reply-To: <51E145CC.8080900@iki.fi> (Pasi Parviainen's message of "Sat, 13 Jul 2013 15:19:24 +0300") Message-ID: <861u6iv0ih.fsf@orwell.Elisa> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: Scot Hetzel , "O. Hartmann" , "freebsd-toolchain@FreeBSD.org" , Garrett Wollman , FreeBSD Current , Tijl Coosemans , "freebsd-standards@FreeBSD.org" X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 21:27:15 -0000 Pasi Parviainen writes: > On 13.7.2013 13:12, David Chisnall wrote: >> On 12 Jul 2013, at 22:47, "O. Hartmann" wrote: >> >>> Obviously not really fixed, but even worse: >>> >>> if I use in C code (C99, using clang 3.3 on FreeBSD 10.0-CURRENT/amd64 >>> revision 253287) isnan(x) where x is a "const double", I receive now >>> the following error (which doesn't appear on previous versions): >> >> Thanks. This is now fixed, however the _Generic() usage that we had there is also present in tgmath.h, and so this file will also need to be fixed in the same way. >> >> I've now tested the macros with clang/c99, clang/c11, clang/c++98 and clang/c++11, and gcc/c89 and they all seem to work for unqualified, const, volatile, and const-volatile qualified types. >> >> I've added Ed to the cc: list, as he wrote this code in tgmath.h. >> >> David >> > > Instead of listing all possible type qualifier combinations (like in > r253319), how about using a comma operator to strip away type > qualifiers? Since only the result type of the expression matters and > it isn't evaluated at all. > > like: > > #define __fp_type_select(x, f, d, ld) _Generic((0,(x)), This seems to have been committed in r253321, and broke some code that was working with r253320; namely, some code in x11/kde4-workspace includes math.h and calls isnan() with a const double. From owner-freebsd-standards@FreeBSD.ORG Sun Jul 28 22:31:58 2013 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 ESMTP id 39A4B6F5 for ; Sun, 28 Jul 2013 22:31:58 +0000 (UTC) (envelope-from chrisj@rtems.org) Received: from nschwqsrv03p.mx.bigpond.com (nschwqsrv03p.mx.bigpond.com [61.9.189.237]) by mx1.freebsd.org (Postfix) with ESMTP id C4B422DDE for ; Sun, 28 Jul 2013 22:31:57 +0000 (UTC) Received: from nschwcmgw05p ([61.9.190.165]) by nschwmtas02p.mx.bigpond.com with ESMTP id <20130728203830.FIWS24.nschwmtas02p.mx.bigpond.com@nschwcmgw05p> for ; Sun, 28 Jul 2013 20:38:30 +0000 Received: from kiwi.contemporary.net.au ([58.172.130.193]) by nschwcmgw05p with BigPond Outbound id 5weW1m00K4AWQ0y01weWoW; Sun, 28 Jul 2013 20:38:30 +0000 X-Authority-Analysis: v=2.0 cv=QJDqt33L c=1 sm=1 a=52MaS7aVRqv1DZ1aF93/eg==:17 a=rJ9FApbKPKgA:10 a=keqgt9dXCDEA:10 a=sLc0rD4f83wA:10 a=8nJEP1OIZ-IA:10 a=DU0EyFXtAAAA:8 a=LJf-Lilay-UA:10 a=r7mCciVOk2UeGrPK8RwA:9 a=wPNLvfGTeEIA:10 a=52MaS7aVRqv1DZ1aF93/eg==:117 Received: from takapu.local ([12.104.145.50]) (authenticated bits=0) by kiwi.contemporary.net.au (8.14.7/8.14.5) with ESMTP id r6SKcN0v074171 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Mon, 29 Jul 2013 06:38:25 +1000 (EST) (envelope-from chrisj@rtems.org) X-Authentication-Warning: kiwi.contemporary.net.au: Host [12.104.145.50] claimed to be takapu.local Message-ID: <51F5813D.2030806@rtems.org> Date: Mon, 29 Jul 2013 06:38:21 +1000 From: Chris Johns User-Agent: Postbox 3.0.8 (Macintosh/20130427) MIME-Version: 1.0 To: freebsd-standards@freebsd.org Subject: truncate and open(O_TRUNC) times. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.3 required=5.0 tests=RDNS_NONE autolearn=no version=3.3.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on kiwi.contemporary.net.au X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 22:31:58 -0000 Hello, In the RTEMS project we have some test code that appears to fail on FreeBSD. You can find a stripped down version at http://www.rtems.org/ftp/pub/rtems/people/chrisj/fstimes/truncate-time-test.c The code does .. fd = open (file01, O_CREAT | O_WRONLY, mode); n = write (fd, databuf, len); assert (n == len); status = close (fd); assert (status == 0); sleep(2); status = truncate (file01, len); assert (status == 0); The length does not change and given the file does not change our interpretation of the truncate call is the times should not change. In the case of .. fd = open (file03, O_CREAT | O_WRONLY, mode); status = close (fd); assert (status == 0); sleep(2); fd = open (file03, O_TRUNC | O_WRONLY, mode); status = close (fd); assert (status == 0); the times do change as expected. Chris From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 08:19:52 2013 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 ESMTP id D1FDC264; Mon, 29 Jul 2013 08:19:52 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 961DA2591; Mon, 29 Jul 2013 08:19:52 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r6T8JjmM071640 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 29 Jul 2013 08:19:46 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity From: David Chisnall In-Reply-To: <861u6iv0ih.fsf@orwell.Elisa> Date: Mon, 29 Jul 2013 09:19:40 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20130710155809.0f589c22@thor.walstatt.dyndns.org> <20130710183315.725dfde0@thor.walstatt.dyndns.org> <20130710203200.5359fd18@thor.walstatt.dyndns.org> <51DDC04B.6040209@FreeBSD.org> <20957.49978.73666.392417@khavrinen.csail.mit.edu> <20130711130043.R920@besplex.bde.org> <20130711202908.L84170@besplex.bde.org> <20130712234749.5afa3c9b@thor.walstatt.dyndns.org> <9B0A6D14-640E-4ADD-8E58-0B7867C7C674@FreeBSD.org> <51E145CC.8080900@iki.fi> <861u6iv0ih.fsf@orwell.Elisa> To: Raphael Kubo da Costa X-Mailer: Apple Mail (2.1508) Cc: Scot Hetzel , Pasi Parviainen , "freebsd-standards@FreeBSD.org" , "freebsd-toolchain@FreeBSD.org" , Garrett Wollman , FreeBSD Current , Tijl Coosemans , "O. Hartmann" X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 08:19:52 -0000 On 28 Jul 2013, at 22:27, Raphael Kubo da Costa = wrote: > This seems to have been committed in r253321, and broke some code that > was working with r253320; namely, some code in x11/kde4-workspace > includes math.h and calls isnan() with a const double. Please provide a test case. Specifically, I need to know what language = dialect this is using, because I have tested including math.h and = calling isnan(double) with c89, gnu89, c99, c11, c++03 and c++11 on gcc = (for the modes that it supports) and clang. David From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 09:56:57 2013 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 ESMTP id 04FA7D86 for ; Mon, 29 Jul 2013 09:56:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id A47EB2AA5 for ; Mon, 29 Jul 2013 09:56:56 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 71DB0780D6E; Mon, 29 Jul 2013 19:56:42 +1000 (EST) Date: Mon, 29 Jul 2013 19:56:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Chris Johns Subject: Re: truncate and open(O_TRUNC) times. In-Reply-To: <51F5813D.2030806@rtems.org> Message-ID: <20130729191944.M928@besplex.bde.org> References: <51F5813D.2030806@rtems.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=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=CT-yo7tBpAMA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=X5dPMJUElLQA:10 a=DU0EyFXtAAAA:8 a=jSCJBBQonswEp5FjZWIA:9 a=CjuIK1q_8ugA:10 Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 09:56:57 -0000 On Mon, 29 Jul 2013, Chris Johns wrote: > In the RTEMS project we have some test code that appears to fail on FreeBSD. > You can find a stripped down version at > http://www.rtems.org/ftp/pub/rtems/people/chrisj/fstimes/truncate-time-test.c > > The code does .. > > fd = open (file01, O_CREAT | O_WRONLY, mode); > n = write (fd, databuf, len); > assert (n == len); > status = close (fd); > assert (status == 0); > > sleep(2); > > status = truncate (file01, len); > assert (status == 0); > > The length does not change and given the file does not change our > interpretation of the truncate call is the times should not change. POSIX is weirdly different for truncate(). It only requires truncate() to change the times if it changed the size (this is not weird, but unusual), while it requires ftruncate() to change the times if it succeeded. > > In the case of .. > > fd = open (file03, O_CREAT | O_WRONLY, mode); > status = close (fd); > assert (status == 0); > > sleep(2); > > fd = open (file03, O_TRUNC | O_WRONLY, mode); > status = close (fd); > assert (status == 0); > > the times do change as expected. POSIX requires open() with O_TRUNC to change the times if it succeeded (so it acts like ftruncate() on its descriptor). FreeBSD can't possibly do this as weirdly as POSIX specifies, since it uses the same VOP_SETATTR() API to set the size for ftruncate() and truncate(), and this API doesn't say who made the call. Most file systems seem to force the setting of the times if successful. E.g., ffs_truncate() does nothing much except set the times if the size didn't change. Bruce From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 11:06:53 2013 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 ESMTP id F3798217 for ; Mon, 29 Jul 2013 11:06:52 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) 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 E05E92DE4 for ; Mon, 29 Jul 2013 11:06:52 +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 r6TB6qJw061926 for ; Mon, 29 Jul 2013 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6TB6q7O061924 for freebsd-standards@FreeBSD.org; Mon, 29 Jul 2013 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Jul 2013 11:06:52 GMT Message-Id: <201307291106.r6TB6q7O061924@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.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 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/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 42 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 11:27:38 2013 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 ESMTP id 7E00EFA6; Mon, 29 Jul 2013 11:27:38 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-oa0-x231.google.com (mail-oa0-x231.google.com [IPv6:2607:f8b0:4003:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07B622054; Mon, 29 Jul 2013 11:27:37 +0000 (UTC) Received: by mail-oa0-f49.google.com with SMTP id n16so1286857oag.22 for ; Mon, 29 Jul 2013 04:27:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Y8Nt738cak9jGA8Oj3TVrQEv6NEdC7+Rb2HlHDlDuvc=; b=OM9355H/eZQQRU0N5v5VmoRrK8EjVCOYgXjID1p2wrEFZfQEcFmMS6EneGtF9zIoHm JDUadzGrbwAoagkpjTA1OnM5E4gh3P3kI8yLcX4FTu9LLRIzktCzX1yOEING7QlCpHFz cZTTbXXrJWlg6nufRW1K/vCtAUQUyyS945OHL5OxTrQVp9xgViWZaMidnIH0i/xSDKwR YscXivvqJaWY9gIRDm5lX47SoERwbG/A+H0jPET7pBRbp1cvxlkY8vdBbliJCRUbAM94 LrgMICQBS45dY2JLIqP25ZgzOWa02Ln4CarxrAzFeQlpaRdBlohlRrr8+gC4cSoX0SdJ yVZA== X-Received: by 10.60.34.130 with SMTP id z2mr15075527oei.87.1375097257406; Mon, 29 Jul 2013 04:27:37 -0700 (PDT) Received: from rachacuca.gmail.com (li113-135.members.linode.com. [69.164.198.135]) by mx.google.com with ESMTPSA id jz7sm86843109obb.4.2013.07.29.04.27.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Jul 2013 04:27:36 -0700 (PDT) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: David Chisnall Subject: Re: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity References: <20130710155809.0f589c22@thor.walstatt.dyndns.org> <20130710183315.725dfde0@thor.walstatt.dyndns.org> <20130710203200.5359fd18@thor.walstatt.dyndns.org> <51DDC04B.6040209@FreeBSD.org> <20957.49978.73666.392417@khavrinen.csail.mit.edu> <20130711130043.R920@besplex.bde.org> <20130711202908.L84170@besplex.bde.org> <20130712234749.5afa3c9b@thor.walstatt.dyndns.org> <9B0A6D14-640E-4ADD-8E58-0B7867C7C674@FreeBSD.org> <51E145CC.8080900@iki.fi> <861u6iv0ih.fsf@orwell.Elisa> Date: Mon, 29 Jul 2013 08:27:29 -0300 In-Reply-To: (David Chisnall's message of "Mon, 29 Jul 2013 09:19:40 +0100") Message-ID: <83zjt5mwri.fsf@FreeBSD.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Cc: Scot Hetzel , Pasi Parviainen , "freebsd-standards@FreeBSD.org" , "freebsd-toolchain@FreeBSD.org" , Garrett Wollman , FreeBSD Current , Tijl Coosemans , "O. Hartmann" X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 11:27:38 -0000 David Chisnall writes: > On 28 Jul 2013, at 22:27, Raphael Kubo da Costa wrote: > >> This seems to have been committed in r253321, and broke some code that >> was working with r253320; namely, some code in x11/kde4-workspace >> includes math.h and calls isnan() with a const double. > > Please provide a test case. Specifically, I need to know what > language dialect this is using, because I have tested including math.h > and calling isnan(double) with c89, gnu89, c99, c11, c++03 and c++11 > on gcc (for the modes that it supports) and clang. I get the following results with and without -std=c++11 and/or -stdlib=libc++: % cat isnan.cc #include int main() { const double d = 42.0; return isnan(d) ? 1 : 0; } % clang++ isnan.cc isnan.cc:4:10: error: controlling expression type 'const double' not compatible with any generic association type return isnan(d) ? 1 : 0; ^~~~~~~~ /usr/include/math.h:109:2: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((0,(x)), \ ^~~~~ 1 error generated. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 14:07:00 2013 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 ESMTP id BE49AFAD for ; Mon, 29 Jul 2013 14:07:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CB682873 for ; Mon, 29 Jul 2013 14:07:00 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r6TE6tWD014316; Mon, 29 Jul 2013 17:06:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r6TE6tWD014316 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r6TE6spf014315; Mon, 29 Jul 2013 17:06:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 29 Jul 2013 17:06:54 +0300 From: Konstantin Belousov To: Bruce Evans Subject: Re: truncate and open(O_TRUNC) times. Message-ID: <20130729140654.GO4972@kib.kiev.ua> References: <51F5813D.2030806@rtems.org> <20130729191944.M928@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Vxa5joy26gVGOrvU" Content-Disposition: inline In-Reply-To: <20130729191944.M928@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 14:07:00 -0000 --Vxa5joy26gVGOrvU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 29, 2013 at 07:56:34PM +1000, Bruce Evans wrote: > On Mon, 29 Jul 2013, Chris Johns wrote: >=20 > > In the RTEMS project we have some test code that appears to fail on Fre= eBSD.=20 > > You can find a stripped down version at=20 > > http://www.rtems.org/ftp/pub/rtems/people/chrisj/fstimes/truncate-time-= test.c > > > > The code does .. > > > > fd =3D open (file01, O_CREAT | O_WRONLY, mode); > > n =3D write (fd, databuf, len); > > assert (n =3D=3D len); > > status =3D close (fd); > > assert (status =3D=3D 0); > >=20 > > sleep(2); > > > > status =3D truncate (file01, len); > > assert (status =3D=3D 0); > > > > The length does not change and given the file does not change our=20 > > interpretation of the truncate call is the times should not change. >=20 > POSIX is weirdly different for truncate(). It only requires truncate() > to change the times if it changed the size (this is not weird, but unusua= l), > while it requires ftruncate() to change the times if it succeeded. >=20 > > > > In the case of .. > > > > fd =3D open (file03, O_CREAT | O_WRONLY, mode); > > status =3D close (fd); > > assert (status =3D=3D 0); > > > > sleep(2); > > > > fd =3D open (file03, O_TRUNC | O_WRONLY, mode); > > status =3D close (fd); > > assert (status =3D=3D 0); > > > > the times do change as expected. >=20 > POSIX requires open() with O_TRUNC to change the times if it succeeded > (so it acts like ftruncate() on its descriptor). >=20 > FreeBSD can't possibly do this as weirdly as POSIX specifies, since > it uses the same VOP_SETATTR() API to set the size for ftruncate() and > truncate(), and this API doesn't say who made the call. Most file > systems seem to force the setting of the times if successful. E.g., > ffs_truncate() does nothing much except set the times if the size > didn't change. vaattr.va_vaflags could grow a flag to indicate that VOP_SETATTR() should only change times when size was changed. --Vxa5joy26gVGOrvU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJR9nb+AAoJEJDCuSvBvK1BoQcP/3Ez1aUsMNXppDbcnS/7loWO 3Er/qtKP85rvL1XRqW3tmK3Viwu298mvIj/iYP1wKU+eCWDruEX+3bfArLiZg8bV Yd1JH8DGf03v7OP+Gccpn48ZHuqOX7IqPLoOJcg028DfFl6VI0jU6YhWBjrn0IFe gCwmQ8EPnUoFtQu5VQItER9vg1jbjSJLnxLnedfBpucPlUmldzwpK7w9TVY4C0r+ 8sJf00942fwxYwlVgVUpC42CkbGkPepy95GwbQmnvp1em8RVru5lGUgfwBSeDON6 tGIFUkV2vwCNnhyBud3QzaXjVQhu/aOqTBZzMuuN+zKsknNmBcFq3aY4Q6gT510R FHoJhHaDVAwceyDASllCYRQH3px5O6jFbBRWO3UW3o9mCpkvFmGnjpHp4gSJfMv7 Ry3mjBN1IJCf5rLmoMkc23Hb8QseDjQHfAgKJXTGTYflhy9YBcOIGEurgYX2zJiu NqQI0fnLgpPYmQg+zKLoHKDUtI8ymtxlzd21z5EJrMRt37cuI40zb7Pc7mu35uCJ OUizRaWv2MC3HwL65zWG1vqaHj/xWZAW3V/OE8PGWl94TdrjM4/4mlD1ZiFXCI2w wvGM96SlV79OIX+9oFqF6mD3Ja8UsyyvLfoEJ+HSdeU6RMVcP0YyaQTIpYoeLMBb gNiZraXFeMLdbwdF8Bd5 =oMut -----END PGP SIGNATURE----- --Vxa5joy26gVGOrvU-- From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 14:41:26 2013 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 ESMTP id 2B4B319C for ; Mon, 29 Jul 2013 14:41:26 +0000 (UTC) (envelope-from nobody@opus30.register.it) Received: from hostingsmtp.register.it (hostingsmtp10.register.it [81.88.50.251]) by mx1.freebsd.org (Postfix) with ESMTP id 892812ADC for ; Mon, 29 Jul 2013 14:41:25 +0000 (UTC) Received: (qmail 2059 invoked from network); 29 Jul 2013 14:41:24 -0000 Received: from unknown (HELO opus30.register.it) by hostingsmtp.register.it with ESMTP; 29 Jul 2013 14:41:24 -0000 Received: (from nobody@localhost) by opus30.register.it (8.14.3/8.12.11/Submit) id r6TEfOS4032039; Mon, 29 Jul 2013 16:41:24 +0200 Date: Mon, 29 Jul 2013 16:41:24 +0200 X-RID: 7OnsJ3NuKzt0JW1yK2ZuOy9zbjtn6CjsL3RuI3RuK2Mt7FsvYiNbL3NjK2R06S8K|dDsnbSVjJW0jZCdbW1sK|MCwnLPkn4F0nXeDgCg==|WE5MR05JVFNPSAo= To: freebsd-standards@freebsd.org Subject: =?utf-8?B?0KHQuNC80LrQsNGA0YLQsCDQtNC70Y8g0YDQsNC30LPQvtCy0L7RgNC+0LIg0LfQsCDQs9GA0LDQvdC40YbQtdC5?= X-PHP-Originating-Script: 99:informations.php From: =?utf-8?B?0JLQsNC70LXRgNC40Y8g0JzQsNGA0LrQuNC9?= Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 14:41:26 -0000 Добрый день! Предлагаю сим карту для отдыхающих за границей звонки в Россию от 4,8 рублей. Срок действия карты неограничен, без абонентской платы. Подскажите, какой у Вас сотовый оператор, чтобы я могла уточнить сможете ли Вы привязать свой мобильный номер к новой сим карте? PS Могу сделать не только для Турции. с уважением, Людмила From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 15:35:05 2013 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 ESMTP id BDF2F39E for ; Mon, 29 Jul 2013 15:35:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 8257A2DCB for ; Mon, 29 Jul 2013 15:35:04 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id D3EE010414FC; Tue, 30 Jul 2013 01:35:00 +1000 (EST) Date: Tue, 30 Jul 2013 01:34:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: truncate and open(O_TRUNC) times. In-Reply-To: <20130729140654.GO4972@kib.kiev.ua> Message-ID: <20130730011126.V2176@besplex.bde.org> References: <51F5813D.2030806@rtems.org> <20130729191944.M928@besplex.bde.org> <20130729140654.GO4972@kib.kiev.ua> 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=Yos2GeoX c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=CT-yo7tBpAMA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=X5dPMJUElLQA:10 a=fijM0vgTtP0wRJXSTmoA:9 a=CjuIK1q_8ugA:10 Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 15:35:05 -0000 On Mon, 29 Jul 2013, Konstantin Belousov wrote: > On Mon, Jul 29, 2013 at 07:56:34PM +1000, Bruce Evans wrote: >> ... >> POSIX is weirdly different for truncate(). It only requires truncate() >> to change the times if it changed the size (this is not weird, but unusual), >> while it requires ftruncate() to change the times if it succeeded. >> ... >> FreeBSD can't possibly do this as weirdly as POSIX specifies, since >> it uses the same VOP_SETATTR() API to set the size for ftruncate() and >> truncate(), and this API doesn't say who made the call. Most file >> systems seem to force the setting of the times if successful. E.g., >> ffs_truncate() does nothing much except set the times if the size >> didn't change. > > vaattr.va_vaflags could grow a flag to indicate that VOP_SETATTR() > should only change times when size was changed. Indeed. I just checked some details for another bug involving [f]truncate() and the file size limit. They are specified to act the same (SIGFXSZ with no change in the file) above the limit, but for most file systems including ffs, neither checks. So the flag isn't needed to fix this bug. It is write() that acts differently. It is specified to write up to the limit and then return a short write with no SIGXFXSZ if the file pointer is initially before the limit; otherwise SIGFXSZ with no change to the file (or file times?). But for most file systems including ffs, write() fails with SIGFXSZ and no change in the file if the result of a full successful write would be above the limit. This is mostly a bug in POSIX. It makes short write()s possible for any write(), where users can easily arrange for foot shooting using their soft rlimit, but almost no applications understand short writes. Most file systems including ffs never produce short writes -- they back out of failing i/o's if possible, including for the similar ENOSPC error; when backing out is not possible, which is mainly for failing writes into the middle of files, they return -1 with no backing out; applications must assume that the region of the file written to by a failing write is indeterminate, but for writes at EOF this region is null after the backout. Bruce From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 15:42:50 2013 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 ESMTP id D7079555; Mon, 29 Jul 2013 15:42:49 +0000 (UTC) (envelope-from pasi.parviainen@iki.fi) Received: from sinikuusama.dnainternet.net (sinikuusama.dnainternet.net [83.102.40.134]) by mx1.freebsd.org (Postfix) with ESMTP id 4F43C2E17; Mon, 29 Jul 2013 15:42:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sinikuusama.dnainternet.net (Postfix) with ESMTP id 6D0393FC82; Mon, 29 Jul 2013 18:33:26 +0300 (EEST) X-Virus-Scanned: DNA Postiturva at dnainternet.net X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-9999 required=6 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from sinikuusama.dnainternet.net ([83.102.40.134]) by localhost (sinikuusama.dnainternet.net [127.0.0.1]) (DNA Postiturva, port 10041) with ESMTP id FkjCMZS4ItnD; Mon, 29 Jul 2013 18:33:25 +0300 (EEST) Received: from oliivipuu.dnainternet.net (oliivipuu.dnainternet.net [83.102.40.215]) by sinikuusama.dnainternet.net (Postfix) with ESMTP id D829C3FA63; Mon, 29 Jul 2013 18:33:25 +0300 (EEST) Received: from [192.168.0.2] (host-109-204-160-251.tp-fne.tampereenpuhelin.net [109.204.160.251]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oliivipuu.dnainternet.net (Postfix) with ESMTPS id 6278A5FAA6; Mon, 29 Jul 2013 18:33:16 +0300 (EEST) Message-ID: <51F68ACA.8030500@iki.fi> Date: Mon, 29 Jul 2013 18:31:22 +0300 From: Pasi Parviainen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Raphael Kubo da Costa Subject: Re: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity References: <20130710155809.0f589c22@thor.walstatt.dyndns.org> <20130710183315.725dfde0@thor.walstatt.dyndns.org> <20130710203200.5359fd18@thor.walstatt.dyndns.org> <51DDC04B.6040209@FreeBSD.org> <20957.49978.73666.392417@khavrinen.csail.mit.edu> <20130711130043.R920@besplex.bde.org> <20130711202908.L84170@besplex.bde.org> <20130712234749.5afa3c9b@thor.walstatt.dyndns.org> <9B0A6D14-640E-4ADD-8E58-0B7867C7C674@FreeBSD.org> <51E145CC.8080900@iki.fi> <861u6iv0ih.fsf@orwell.Elisa> <83zjt5mwri.fsf@FreeBSD.org> In-Reply-To: <83zjt5mwri.fsf@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Scot Hetzel , "freebsd-standards@FreeBSD.org" , "freebsd-toolchain@FreeBSD.org" , Garrett Wollman , FreeBSD Current , Tijl Coosemans , "O. Hartmann" X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 15:42:50 -0000 On 29.7.2013 14:27, Raphael Kubo da Costa wrote: > David Chisnall writes: > >> On 28 Jul 2013, at 22:27, Raphael Kubo da Costa wrote: >> >>> This seems to have been committed in r253321, and broke some code that >>> was working with r253320; namely, some code in x11/kde4-workspace >>> includes math.h and calls isnan() with a const double. >> >> Please provide a test case. Specifically, I need to know what >> language dialect this is using, because I have tested including math.h >> and calling isnan(double) with c89, gnu89, c99, c11, c++03 and c++11 >> on gcc (for the modes that it supports) and clang. > > I get the following results with and without -std=c++11 and/or > -stdlib=libc++: > > % cat isnan.cc > #include > int main() { > const double d = 42.0; > return isnan(d) ? 1 : 0; > } > > % clang++ isnan.cc > isnan.cc:4:10: error: controlling expression type 'const double' not > compatible with any generic association type > return isnan(d) ? 1 : 0; > ^~~~~~~~ > /usr/include/math.h:109:2: note: expanded from macro 'isnan' > __fp_type_select(x, __inline_isnanf, __inline_isnan, > __inline_isnanl) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' > #define __fp_type_select(x, f, d, ld) _Generic((0,(x)), > \ > ^~~~~ > 1 error generated. > In the first place C++ code should be using cmath instead of math.h. That said, this is a result of just an another wonderful little difference between C and C++. C standard explicitly states that comma operator does not yield an lvalue but in C++ it can if the right most operand is an lvalue. If C++ compatibility is desired then unary + operator (e.g. _Generic(+(x),...) could be used for the same effect, only downside with this is that the integer arguments are promoted, but that doesn't matter in this case. Pasi From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 18:46:52 2013 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 ESMTP id 3CC51F13 for ; Mon, 29 Jul 2013 18:46:52 +0000 (UTC) (envelope-from chrisj@rtems.org) Received: from nskntqsrv02p.mx.bigpond.com (nskntqsrv02p.mx.bigpond.com [61.9.168.234]) by mx1.freebsd.org (Postfix) with ESMTP id C9C8B2842 for ; Mon, 29 Jul 2013 18:46:51 +0000 (UTC) Received: from nskntcmgw07p ([61.9.169.167]) by nskntmtas05p.mx.bigpond.com with ESMTP id <20130729163102.PVUN2026.nskntmtas05p.mx.bigpond.com@nskntcmgw07p>; Mon, 29 Jul 2013 16:31:02 +0000 Received: from kiwi.contemporary.net.au ([58.172.130.193]) by nskntcmgw07p with BigPond Outbound id 6GX21m0014AWQ0y01GX2qK; Mon, 29 Jul 2013 16:31:02 +0000 X-Authority-Analysis: v=2.0 cv=IccFqBWa c=1 sm=1 a=52MaS7aVRqv1DZ1aF93/eg==:17 a=rJ9FApbKPKgA:10 a=CT-yo7tBpAMA:10 a=sLc0rD4f83wA:10 a=8nJEP1OIZ-IA:10 a=DU0EyFXtAAAA:8 a=lS0MHldHvS4A:10 a=X5dPMJUElLQA:10 a=yQ0M5D1pBhB24ZYwMwAA:9 a=wPNLvfGTeEIA:10 a=52MaS7aVRqv1DZ1aF93/eg==:117 Received: from takapu.local (50-240-213-197-static.hfc.comcastbusiness.net [50.240.213.197] (may be forged)) (authenticated bits=0) by kiwi.contemporary.net.au (8.14.7/8.14.5) with ESMTP id r6TGUsr1080934 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 30 Jul 2013 02:30:55 +1000 (EST) (envelope-from chrisj@rtems.org) X-Authentication-Warning: kiwi.contemporary.net.au: Host 50-240-213-197-static.hfc.comcastbusiness.net [50.240.213.197] (may be forged) claimed to be takapu.local Message-ID: <51F698B6.7050109@rtems.org> Date: Tue, 30 Jul 2013 02:30:46 +1000 From: Chris Johns User-Agent: Postbox 3.0.8 (Macintosh/20130427) MIME-Version: 1.0 To: Bruce Evans Subject: Re: truncate and open(O_TRUNC) times. References: <51F5813D.2030806@rtems.org> <20130729191944.M928@besplex.bde.org> <20130729140654.GO4972@kib.kiev.ua> <20130730011126.V2176@besplex.bde.org> In-Reply-To: <20130730011126.V2176@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.3 required=5.0 tests=RDNS_NONE autolearn=no version=3.3.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on kiwi.contemporary.net.au Cc: freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 18:46:52 -0000 Bruce Evans wrote: > > I just checked some details for another bug involving [f]truncate() and > the file size limit. They are specified to act the same (SIGFXSZ with > no change in the file) above the limit, but for most file systems including > ffs, neither checks. So the flag isn't needed to fix this bug. It is > write() that acts differently. It is specified to write up to the limit > and then return a short write with no SIGXFXSZ if the file pointer is > initially before the limit; otherwise SIGFXSZ with no change to the file > (or file times?). But for most file systems including ffs, write() fails > with SIGFXSZ and no change in the file if the result of a full successful > write would be above the limit. This is mostly a bug in POSIX. It makes > short write()s possible for any write(), where users can easily arrange > for foot shooting using their soft rlimit, but almost no applications > understand short writes. Applications running on RTEMS with its limited resources need to know this and we have a test to make sure this is handled correctly by all file systems. Chris From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 20:19:19 2013 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 ESMTP id 09A0B9DB; Mon, 29 Jul 2013 20:19:19 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com [IPv6:2a00:1450:4010:c04::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1992A2DBE; Mon, 29 Jul 2013 20:19:17 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id 13so1087731lba.34 for ; Mon, 29 Jul 2013 13:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=OjEsHxPHAmFHGkUic9UqG2IefoRw42UjeP24+EML4g0=; b=EO9oBLuPdjrWxErjW0LnlKcT07UDROYa9P07YZ0tCw4MtQ2koj7fviaswIOp41w9e9 J9btuBJg/o07lm2wAnnS+rYoi55ntYzaG5LUI+0YCw5Xzxx1UcsEi15tybsUKNlNIn7E Kuc+wGxS8axDyGr9M5HhLLmJaJ45T+OHeFaTIUO7vbsCYDEg1y382kgChm6znGc1TWHE fsa+y/KLuXHcVz2dUuxJDq/crlZD06yB18XgE9m5YD9DORpG4alF3DkyvHLQ3zXJCpCL gvqH4CyGd8Gi+rJIW8EFtMEFeufKqCaDuElyZSm9ntb520gwAbdaswUCuP9yXYGi1Dc3 CGSA== X-Received: by 10.112.157.226 with SMTP id wp2mr26292403lbb.65.1375129155313; Mon, 29 Jul 2013 13:19:15 -0700 (PDT) Received: from orwell.Elisa.gmail.com (a91-154-115-217.elisa-laajakaista.fi. [91.154.115.217]) by mx.google.com with ESMTPSA id j1sm3906801lag.4.2013.07.29.13.19.13 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Jul 2013 13:19:14 -0700 (PDT) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: FreeBSD Current Subject: Re: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity References: <20130710155809.0f589c22@thor.walstatt.dyndns.org> <20130710183315.725dfde0@thor.walstatt.dyndns.org> <20130710203200.5359fd18@thor.walstatt.dyndns.org> <51DDC04B.6040209@FreeBSD.org> <20957.49978.73666.392417@khavrinen.csail.mit.edu> <20130711130043.R920@besplex.bde.org> <20130711202908.L84170@besplex.bde.org> <20130712234749.5afa3c9b@thor.walstatt.dyndns.org> <9B0A6D14-640E-4ADD-8E58-0B7867C7C674@FreeBSD.org> <51E145CC.8080900@iki.fi> <861u6iv0ih.fsf@orwell.Elisa> Date: Mon, 29 Jul 2013 23:18:59 +0300 In-Reply-To: <861u6iv0ih.fsf@orwell.Elisa> (Raphael Kubo da Costa's message of "Mon, 29 Jul 2013 00:27:02 +0300") Message-ID: <868v0pdsr0.fsf@orwell.Elisa> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: "freebsd-toolchain@FreeBSD.org" , "freebsd-standards@FreeBSD.org" X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:19:19 -0000 Raphael Kubo da Costa writes: > This seems to have been committed in r253321, and broke some code that > was working with r253320; namely, some code in x11/kde4-workspace > includes math.h and calls isnan() with a const double. For posterity, David has reverted the code back to the previous behaviour in r253766. From owner-freebsd-standards@FreeBSD.ORG Mon Jul 29 20:50:19 2013 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 ESMTP id D999565F for ; Mon, 29 Jul 2013 20:50:19 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A15BB2010 for ; Mon, 29 Jul 2013 20:50:19 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 772BF1203CA; Mon, 29 Jul 2013 22:50:02 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 4B16928494; Mon, 29 Jul 2013 22:50:02 +0200 (CEST) Date: Mon, 29 Jul 2013 22:50:02 +0200 From: Jilles Tjoelker To: Chris Johns Subject: Re: truncate and open(O_TRUNC) times. Message-ID: <20130729205002.GA72031@stack.nl> References: <51F5813D.2030806@rtems.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51F5813D.2030806@rtems.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.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:50:19 -0000 On Mon, Jul 29, 2013 at 06:38:21AM +1000, Chris Johns wrote: > In the RTEMS project we have some test code that appears to fail on > FreeBSD. You can find a stripped down version at > http://www.rtems.org/ftp/pub/rtems/people/chrisj/fstimes/truncate-time-test.c > The code does .. > fd = open (file01, O_CREAT | O_WRONLY, mode); > n = write (fd, databuf, len); > assert (n == len); > status = close (fd); > assert (status == 0); > > sleep(2); > > status = truncate (file01, len); > assert (status == 0); > The length does not change and given the file does not change our > interpretation of the truncate call is the times should not change. > In the case of .. > fd = open (file03, O_CREAT | O_WRONLY, mode); > status = close (fd); > assert (status == 0); > > sleep(2); > > fd = open (file03, O_TRUNC | O_WRONLY, mode); > status = close (fd); > assert (status == 0); > the times do change as expected. Although POSIX indeed makes an exception for truncate() (ftruncate() and open(O_TRUNC) update the times whenever successful), this inconsistency has been reported as a bug to the Austin Group and this has been accepted. The report http://austingroupbugs.net/view.php?id=489 is specifically about truncate() and asks to change its specification to update the times whenever successful; http://austingroupbugs.net/view.php?id=485 changes all metadata-changing operations to update the times whenever successful, even when the new value is equal to the old value, except chown() where both uid and gid are -1 and futimens()/utimensat() where both times have UTIME_OMIT. In those special cases, the implementation may or may not update the times. Some browsing around on man.freebsd.org shows inconsistent descriptions in the man pages as well. Usually, ftruncate() and truncate() are described in the same man page and there is no mention of any difference in the way they affect timestamps. FreeBSD's truncate() already behaves as proposed in the Austin Group bugs; I think it is best to keep it that way. -- Jilles Tjoelker From owner-freebsd-standards@FreeBSD.ORG Tue Jul 30 02:32:44 2013 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 ESMTP id 1AEEE92E for ; Tue, 30 Jul 2013 02:32:44 +0000 (UTC) (envelope-from chrisj@rtems.org) Received: from nskntmtas05p.mx.bigpond.com (nskntmtas05p.mx.bigpond.com [61.9.168.149]) by mx1.freebsd.org (Postfix) with ESMTP id AAE892D70 for ; Tue, 30 Jul 2013 02:32:43 +0000 (UTC) Received: from nskntcmgw08p ([61.9.169.168]) by nskntmtas05p.mx.bigpond.com with ESMTP id <20130730023241.XDAK2026.nskntmtas05p.mx.bigpond.com@nskntcmgw08p>; Tue, 30 Jul 2013 02:32:41 +0000 Received: from kiwi.contemporary.net.au ([58.172.130.193]) by nskntcmgw08p with BigPond Outbound id 6SYh1m00P4AWQ0y01SYhcC; Tue, 30 Jul 2013 02:32:41 +0000 X-Authority-Analysis: v=2.0 cv=MrvQGhme c=1 sm=1 a=52MaS7aVRqv1DZ1aF93/eg==:17 a=rJ9FApbKPKgA:10 a=CT-yo7tBpAMA:10 a=sLc0rD4f83wA:10 a=8nJEP1OIZ-IA:10 a=DU0EyFXtAAAA:8 a=X5dPMJUElLQA:10 a=_R-tVgJfx7EKIQXTRP0A:9 a=wPNLvfGTeEIA:10 a=zRif_vtkVWcA:10 a=Iian8_5BlrAA:10 a=52MaS7aVRqv1DZ1aF93/eg==:117 Received: from takapu.local ([12.104.145.50]) (authenticated bits=0) by kiwi.contemporary.net.au (8.14.7/8.14.5) with ESMTP id r6U2WXUg084585 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 30 Jul 2013 12:32:36 +1000 (EST) (envelope-from chrisj@rtems.org) X-Authentication-Warning: kiwi.contemporary.net.au: Host [12.104.145.50] claimed to be takapu.local Message-ID: <51F725BE.4050608@rtems.org> Date: Tue, 30 Jul 2013 12:32:30 +1000 From: Chris Johns User-Agent: Postbox 3.0.8 (Macintosh/20130427) MIME-Version: 1.0 To: Jilles Tjoelker Subject: Re: truncate and open(O_TRUNC) times. References: <51F5813D.2030806@rtems.org> <20130729205002.GA72031@stack.nl> In-Reply-To: <20130729205002.GA72031@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.3 required=5.0 tests=RDNS_NONE autolearn=no version=3.3.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on kiwi.contemporary.net.au Cc: freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 02:32:44 -0000 Jilles Tjoelker wrote: > > FreeBSD's truncate() already behaves as proposed in the Austin Group > bugs; I think it is best to keep it that way. > I agree and thank you for information. Chris From owner-freebsd-standards@FreeBSD.ORG Wed Jul 31 13:40:02 2013 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 ESMTP id C2B401CB for ; Wed, 31 Jul 2013 13:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) 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 A2EA4229F for ; Wed, 31 Jul 2013 13:40:02 +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 r6VDe2rJ093403 for ; Wed, 31 Jul 2013 13:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6VDe20L093402; Wed, 31 Jul 2013 13:40:02 GMT (envelope-from gnats) Resent-Date: Wed, 31 Jul 2013 13:40:02 GMT Resent-Message-Id: <201307311340.r6VDe20L093402@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, Marco 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 ESMTP id A270619F for ; Wed, 31 Jul 2013 13:38:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 762C62285 for ; Wed, 31 Jul 2013 13:38:43 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r6VDcheX098371 for ; Wed, 31 Jul 2013 13:38:43 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r6VDchhT098368; Wed, 31 Jul 2013 13:38:43 GMT (envelope-from nobody) Message-Id: <201307311338.r6VDchhT098368@oldred.freebsd.org> Date: Wed, 31 Jul 2013 13:38:43 GMT From: Marco To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: standards/180969: You have a bug X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 13:40:02 -0000 >Number: 180969 >Category: standards >Synopsis: You have a bug >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Jul 31 13:40:02 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Marco >Release: Current >Organization: Not this time >Environment: BeOS >Description: I found a bug in my computer. His name is Cristian. Please, don't kill them... >How-To-Repeat: Sometimes noisy... >Fix: Feed it. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Thu Aug 1 03:02:14 2013 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 ESMTP id EDC1386A; Thu, 1 Aug 2013 03:02:14 +0000 (UTC) (envelope-from linimon@FreeBSD.org) 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 C413A23BF; Thu, 1 Aug 2013 03:02:14 +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 r7132EmT053342; Thu, 1 Aug 2013 03:02:14 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7132Ecf053341; Thu, 1 Aug 2013 03:02:14 GMT (envelope-from linimon) Date: Thu, 1 Aug 2013 03:02:14 GMT Message-Id: <201308010302.r7132Ecf053341@freefall.freebsd.org> To: nobody@nowhere.yeh, linimon@FreeBSD.org, freebsd-standards@FreeBSD.org, gnats-admin@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: junk/180969: You have a bug X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 03:02:15 -0000 Synopsis: You have a bug State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Thu Aug 1 03:01:45 UTC 2013 State-Changed-Why: not a PR. Responsible-Changed-From-To: freebsd-standards->gnats-admin Responsible-Changed-By: linimon Responsible-Changed-When: Thu Aug 1 03:01:45 UTC 2013 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=180969