Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 2010 16:54:01 +0200
From:      Dimitry Andric <dimitry@andric.com>
To:        Gabor Kovesdan <gabor@FreeBSD.org>
Cc:        FreeBSD Hackers <hackers@freebsd.org>
Subject:   Re: strange problem with int64_t variables
Message-ID:  <4C39DB09.6010808@andric.com>
In-Reply-To: <4C39D92F.4050605@FreeBSD.org>
References:  <4C39D92F.4050605@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2010-07-11 16:46, Gabor Kovesdan wrote:
> I have two int64_t variables in kernel code, first is stored internally 
> and the second one is passed from a syscall argument. When I print them 
> with printf %lld modifier, the internal one behaves correctly but the 
> other one I pass from a syscall has a corrupted value. If I pass 1, it 
> prints out 3735348794091372545. I'm not doing anything special with it 
> just reading it out from the struct that was generated with make sysent. 

Since 3735348794091372545 is 0x33d69ff000000001, it looks like the upper
word got corrupted somehow.  Maybe some part of it got non-atomically
assigned?  Maybe the wrong word was read?  It is hard to tell without
code...  :) 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C39DB09.6010808>