lkml.org 
[lkml]   [1998]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPossible problem in 2.1.78 ix86 mm code with SMP .
Today I tried to compile 2.1.78 with egcs and SMP=1
It failed in mm/simp.c with :
simp.c:73: size of array `fill' is too large.

That´s the following code :
[...]
struct simp {
/* 1st cache lines */
struct per_processor private[NR_PROCESSORS];
/* next cache line */
struct header * usable_list;
spinlock_t lock;
char fill[sizeof(void*) - sizeof(spinlock_t)];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
long real_size;
long max_elems;
structor again_ctor;
structor first_ctor;
structor dtor;
long fill2;
[...]
I checked <asm/spinlock.h> :sizeof(spinlock_t) is 8 for x86 SMP. And
sizeof(void*) is 4. So there is a negative array size.
The code compiles with gcc-2.7.2.1 . This is IMHO a bug .

--
------------------------------------------------------------------------------
Markus <markus.kossmann@inka.de> (Markus Kossmann)

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