Messages in this thread | | | Date | Tue, 06 Jan 1998 19:44:11 +0100 | From | Markus Kossmann <> | Subject | Possible 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)
| |