lkml.org 
[lkml]   [1998]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] A few things from 2.0.x (Was: Pre-2.1.80..)


On Wed, 14 Jan 1998, Dr. Werner Fink wrote:
>
> Nothing dramatic ... only a few fixes in string-486.h done by Bernd Schmidt
> <crux@pool.informatik.rwth-aachen.de> for 2.0.30 but never applied to
> 2.1.x ... and two simple changes by my self (the PAGE_AGE_VALUE of 16 is
> a big one against PAGE_INITIAL_AGE of 3, avoid freeing a eventually not
> allocated page).

The "string-i486" part certainly still has bugs:

> @@ -416,9 +416,11 @@
>
> #define __HAVE_ARCH_MEMCPY
> #define memcpy(d,s,count) \
> -(__builtin_constant_p(count) ? \
> - __memcpy_c((d),(s),(count)) : \
> - __memcpy_g((d),(s),(count)))
> +(count == 0 \
> + ? d \
> + : __builtin_constant_p(count) \
> + ? __memcpy_c((d),(s),(count)) \
> + : __memcpy_g((d),(s),(count)))
>
> /*
> * These ought to get tweaked to do some cache priming.

The above makes the macro incorrectly use "count" twice. If count has side
effects, that's a serious problem that is very hard to find. Same goes for
the changes to memset().

The rest looks ok, but I'll continue to consider string-i486 totally
broken,

Linus


\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.621 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site