WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502

Bernhard Froehlich decke at bluelife.at
Fri Mar 26 08:59:36 UTC 2010


On Fri, 26 Mar 2010 01:41:21 +0200, Andriy Gapon <avg at icyb.net.ua> wrote:
> On VirtualBox startup the following messages are produced in system log:
> WARNING pid ... (VBoxSVC): ioctl sign-extension ioctl ffffffffc4a81502
> 
> This happens on amd64 platform.
> 
> I think the reason for this is in RTFileIoCtl() helper function (in
> VBox/Runtime/r3/posix/fileio-posix.cpp).
> This function takes iRequest argument as 'int' and then passes it as the
> second
> parameter to ioctl(2).  But on FreeBSD that parameter, request, is
> expected to
> be of type unsigned long.
> Thus, a sufficiently large value of a request gets represented as a
> negative
> value in iRequest, which then leads to the warning.
> 
> On the other hand, looking at how ioctl(2) is declared in other
operating
> systems, I am not sure who is right and who is wrong here.
> Maybe we should a cast to unsigned int in RTFileIoCtl() for __FreeBSD__
> case.
> Maybe FreeBSD should just suck it up and remove the noisy warning.
> 
> I know too little to suggest a resolution.
> 
> P.S. it seems that Mac OS X is in the same boat as FreeBSD, perhaps
other
> BSDs too.

I've had a talk to Alexander Eichner and they have already fixed that 2
months ago in r25953 on trunk. So VirtualBox 3.2.x will include this fix. 

http://www.virtualbox.org/changeset/25953

-- 
Bernhard Fröhlich
http://www.bluelife.at/


More information about the freebsd-emulation mailing list