Package: hurd
Version: 2000/03/01
An unattended bug reoprt on help-hurd.
Thanks,
Marcus
----- Forwarded message from Kalle Olavi Niemitalo <[EMAIL PROTECTED]> -----
Delivered-To: [EMAIL PROTECTED]
Resent-Date: Wed, 13 Oct 1999 10:52:29 -0400
To: [EMAIL PROTECTED]
Subject: weak assertions in libstore/rdwr.c
X-URL: http://stekt.oulu.fi/~tosi/
From: Kalle Olavi Niemitalo <[EMAIL PROTECTED]>
Date: 13 Oct 1999 20:17:24 +0300
Resent-Message-ID: <"MiOxO1.0.0n4.Rl91u"@mescaline.gnu.org>
Resent-From: [EMAIL PROTECTED]
X-Mailing-List: <[EMAIL PROTECTED]> archive/latest/1122
X-Loop: [EMAIL PROTECTED]
Precedence: list
Resent-Sender: [EMAIL PROTECTED]
X-UIDL: 5864b146d9f60681d5a46299a702fa78
Resent-Bcc:
The assertions in hurd-19991004/libstore/rdwr.c look suspicious:
assert ((len & (block_shift - 1)) == 0); /* in store_write */
assert ((amount & (block_shift - 1)) == 0); /* in store_read */
block_shift is initialized from store->log2_block_size, so it is
the number of bits to be shifted. However the assertions use it
as a bitmask. I believe they should be changed to:
assert ((len & ((1 << block_shift) - 1)) == 0);
assert ((amount & ((1 << block_shift) - 1)) == 0);
if their purpose is to ensure that the bits shifted out in
(len >> block_shift) and (amount >> block_shift) are all clear.
This error doesn't cause the functions to malfunction unless
block_shift == 0, which it probably isn't.
----- End forwarded message -----
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server
Marcus Brinkmann GNU http://www.gnu.org for public PGP Key
[EMAIL PROTECTED], [EMAIL PROTECTED] PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ [EMAIL PROTECTED]