From owner-freebsd-questions@FreeBSD.ORG Thu Jan 9 13:50:26 2014 Return-Path: Delivered-To: freebsd-questions@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 B0714E1B for ; Thu, 9 Jan 2014 13:50:26 +0000 (UTC) Received: from mail-qa0-x231.google.com (mail-qa0-x231.google.com [IPv6:2607:f8b0:400d:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D2CB1598 for ; Thu, 9 Jan 2014 13:50:26 +0000 (UTC) Received: by mail-qa0-f49.google.com with SMTP id w8so1606934qac.8 for ; Thu, 09 Jan 2014 05:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding:content-type; bh=IizlUXX7vbIkMgxLuN1tTneKqrzTdnguFx3uR2aDX88=; b=DuetXIjUYkRoT0Xp1W7Iw5X/VUJkqLSPe8EgDu/JRoRCQU861YlqyVyVj5Lov7QZWD cuwOdyiFEyxa+vheGYV4M0PDKstxWSWZjMof5wKya2zr+95KaLTvow5z1WbUhi6VLBX0 NdyQ+TToRI9062Dj/BDXFDIy2g+i7bz/DL+4wIevxCPRGS2JM15WzsBBTFtQrmWtheE9 jiY1DFHFg47C9NJVHybK6iP1s0fwvIMd3iR9s7z0VzTCnyVXNfmb/ixOWzUm13OejBQC Q+bCKLr6fzPljszaKk5T2GS6t9YvXS1LtDdcGgP1gXrnf3mSxsVA/HCLBc3BZus9kRpp S2sw== X-Received: by 10.49.51.66 with SMTP id i2mr7832831qeo.26.1389275425565; Thu, 09 Jan 2014 05:50:25 -0800 (PST) Received: from lumiwa.farms.net ([71.241.213.42]) by mx.google.com with ESMTPSA id l17sm6917166qej.13.2014.01.09.05.50.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jan 2014 05:50:24 -0800 (PST) From: Ajtim To: freebsd-questions@freebsd.org Subject: Re: python warning Date: Thu, 09 Jan 2014 08:50:22 -0500 Message-ID: <4495361.7qPzfLfjYJ@lumiwa.farms.net> User-Agent: KMail/4.11.3 (FreeBSD/10.0-RC4; KDE/4.11.3; amd64; ; ) In-Reply-To: <52CDA4B6.2020300@fjl.co.uk> References: <53434003.HmthDSXb49@lumiwa.farms.net> <52CDA4B6.2020300@fjl.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: Frank Leonhardt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 13:50:26 -0000 On Wednesday 08 January 2014 19:19:18 Frank Leonhardt wrote: > On 08/01/2014 18:37, Ajtim wrote: > > Hi! > > > > My system: > > FreeBSD 10.0-RC4 #0 r260130: Tue Dec 31 17:10:01 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > > > > I had bellow warnings in mail from version FreeBSD 10.0-ALPHA and it is still on. Do I need to make some settings or..., please? > > Thank you. > > > > +WARNING pid 1752 (python2.7): ioctl sign-extension ioctl ffffffff80087467 > > +WARNING pid 1762 (python2.7): ioctl sign-extension ioctl ffffffff80087467 > > I hate snakes! > > As to this, in case no one comes by that knows the answer, this wouldn't > worry me greatly. ioctl takes values that are unsigned long; generally > considered to be 32-bit unsigned values except when it's not. gcc > defaults to 64-bit on AMD64. I have a horrible feeling that CLANG > doesn't, and that FreeBSD 10 uses CLANG instead of gcc. I haven't been > brave enough to try it. OpenCL specifies that long will be 64-bit > regardless of platform, but that doesn't make it true. > > This is obviously bleating about a 64-bit value which looks like a -ve > 32-bit number (high bit set). Compilers moving a signed integer value > into a type with more bits WILL sign-extend, which means the high bit is > propagated through the "new" high-order bits. HOWEVER, when the device > driver is checking for commands it's not going to worry about the > high-order bits - if its expecting a 32-bit scalar but the architecture > gives it 64-bit instead it's not going to matter. It'll either check bit > 31 (which remains unchanged) or, worst case, test for -ve (in which case > you want the sign extend). It shouldn't do this, of course, because it's > not a signed number and therefore can only be +ve. Hence the bleat. > > Methinks there's probably a line in python that's calling ioctl with an > int instead of a ulong, and I bet CLANG comes in to it somewhere. > > Regards, Frank. > > > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" Thank you very much for explanation. Looks like that is not bad but it is not nice everyday read "WARNINGS". -- Mitja ------- http://www.redbubble.com/people/lumiwa