[OpenAFS] Strange access problems on one client
Matt Benjamin
matt@linuxbox.com
Thu, 11 Oct 2007 22:52:50 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I think Derrick was being careful when he said it a) fixed the issue and
b) was harmless.
Matt
Marc Dionne wrote:
> Carson Gaspar wrote:
>> Hans-Werner Paulsen wrote:
>>> On Sun, Oct 07, 2007 at 01:15:00PM -0400, Marc Dionne wrote:
>>
>>>> + else if (hval >= 1<<31)
>>
>>> this patch is fine for architectures where the size of "unsigned long"
>>> is 4 bytes. But on the x86_64 architecture this will not work, because
>>> the size is 8 bytes. One can use "unsigned int".
>>
>> Ummm... no. This whole thing is way too fragile. If you care about how
>> many bits the variable has, you MUST use something like uint32_t. Or
>> you can not care, and use sizeof() to generate your comparison. But
>> you MUST NOT use "int" or "long" and hard-code bit shifts.
>
> Sure enough - with the original patch I was trying to confirm that this
> was indeed the issue, and didn't try to be generic.
>
>
- --
Matt Benjamin
The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI 48104
http://linuxbox.com
tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHDuGCJiSUUSaRdSURCC7EAJ9QSM14weKgsjT0EZcUnS9O0cSCUACgj+mb
P7FrrFgD3q4cp6GKWKBqRR0=
=LHDI
-----END PGP SIGNATURE-----