[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9157: [PATCH] dd: sparse conv flag
From: |
Paul Eggert |
Subject: |
bug#9157: [PATCH] dd: sparse conv flag |
Date: |
Tue, 28 Feb 2012 15:39:38 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 |
On 02/28/2012 03:13 PM, Jim Meyering wrote:
>> -#define OUTPUT_BLOCK_SLOP (page_size - 1)
>> > +#define OUTPUT_BLOCK_SLOP MAX (sizeof (uintptr_t), page_size - 1)
> I haven't seen justification for why you're making the above change.
> Can sizeof uintptr_t really be larger than page_size-1 (getpagesize()-1)?
> This seems so unlikely that it'd deserve an assertion in main where
> page_size is set, even though there are only two uses of OUTPUT_BLOCK_SLOP.
Theoretically getpagesize could return 1, no?
Admittedly it's unlikely. I guess it'd be OK
to omit this change, and to just put in a comment
saying something like "We use the output slop
to store a uintptr_t value, so we assume that
getpagesize returns a value greater than sizeof (uintptr_t)."
Perhaps the comment should go right next to the place where
the uintptr_t sentinel is inserted.
> If you leave the sizeof, please omit the parentheses.
But "sizeof uintptr_t" wouldn't work, as uintptr_t is a type.
- bug#9157: [PATCH] dd: sparse conv flag, (continued)
- bug#9157: [PATCH] dd: sparse conv flag, Pádraig Brady, 2012/02/27
- bug#9157: [PATCH] dd: sparse conv flag, Pádraig Brady, 2012/02/27
- bug#9157: [PATCH] dd: sparse conv flag, Paul Eggert, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag, Pádraig Brady, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag, Pádraig Brady, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag, Paul Eggert, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag, Pádraig Brady, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag, Roman Rybalko, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag, Jim Meyering, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag, Pádraig Brady, 2012/02/28
- bug#9157: [PATCH] dd: sparse conv flag,
Paul Eggert <=
- bug#9157: [PATCH] dd: sparse conv flag, Pádraig Brady, 2012/02/28