Hallo l-k,
I resend my answer to l-k too...
Jan Marek
On Fri, Oct 25, 2002 at 01:29:23PM +0200, Jan Marek wrote:
> > >
> > > unsigned int status;
> > > - long esp;
> > >
> > > irq_enter();
> > >
> > > #ifdef CONFIG_DEBUG_STACKOVERFLOW
> > > /* Debugging check for stack overflow: is there less than 1KB free? */
> > > + long esp;
> > >
> > > Most C compilers don't allow you to mix declarations and code.
> > > This is allowed only in new C standards. But GCC 3 seems to cope,
> > > so it's probably fine for new kernels.
> >
> > This fragment must be fixed, look at Documentation/Changes:
> gcc-2.95.4-17 on my Debian works fine on that and without any
> messages... You can try it, if you have other version of compiler...
Try testing with CONFIG_DEBUG_STACKOVERFLOW=y
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
Hallo Dave and l-k,
On Fri, Oct 25, 2002 at 02:18:24PM +0100, Dave Jones wrote:
> On Fri, Oct 25, 2002 at 01:29:23PM +0200, Jan Marek wrote:
> > > This fragment must be fixed, look at Documentation/Changes:
> > gcc-2.95.4-17 on my Debian works fine on that and without any
> > messages... You can try it, if you have other version of compiler...
>
> Try testing with CONFIG_DEBUG_STACKOVERFLOW=y
I'm sorry, I don't think about it :-(... Yes, error or warning can be
generated, when I compile #ifdef'ed code...
But I tried it and everythink was OK:
My compiler: as shown above...
I compiled kernel this way:
cp .config ..
make mrproper
vi Makefile and change gcc-3.2 to gcc
cp ../.config .
make -s oldconfig dep bzImage 2> ../errorlog
I'm attaching my .config and errorlog...
> Dave
> | Dave Jones. http://www.codemonkey.org.uk
Sincerely
Jan Marek
--
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080
Hallo,
On Fri, Oct 25, 2002 at 03:41:59PM +0200, Jan Marek wrote:
> Hallo Dave and l-k,
>
> On Fri, Oct 25, 2002 at 02:18:24PM +0100, Dave Jones wrote:
> > On Fri, Oct 25, 2002 at 01:29:23PM +0200, Jan Marek wrote:
> > > > This fragment must be fixed, look at Documentation/Changes:
> > > gcc-2.95.4-17 on my Debian works fine on that and without any
> > > messages... You can try it, if you have other version of compiler...
> >
> > Try testing with CONFIG_DEBUG_STACKOVERFLOW=y
>
> I'm sorry, I don't think about it :-(... Yes, error or warning can be
> generated, when I compile #ifdef'ed code...
>
> But I tried it and everythink was OK:
I'm sorry: with my fix compiler show error and ended... In the previous
case I've compiled 2.5.44-mm5 kernel, where is esp declared as follows:
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB
* free? */
{
long esp;
__asm__ __volatile__("andl %%esp,%0" :
"=r" (esp) : "0" (8191));
if (unlikely(esp < (sizeof(struct task_struct) + 1024)))
{
printk("do_IRQ: stack overflow: %ld\n",
esp - sizeof(struct task_struct));
dump_stack();
}
}
#endif
and on this code compiler is silent...
I'm one's more sorry...
This errorlog is from the compilation of 2.5.44-mm5:
> arch/i386/kernel/traps.c: In function `do_int3':
> arch/i386/kernel/traps.c:428: warning: label `skip_trap' defined but not used
> arch/i386/kernel/traps.c: In function `do_overflow':
> arch/i386/kernel/traps.c:429: warning: label `skip_trap' defined but not used
> arch/i386/kernel/traps.c: In function `do_bounds':
> arch/i386/kernel/traps.c:430: warning: label `skip_trap' defined but not used
> arch/i386/kernel/traps.c: In function `do_device_not_available':
> arch/i386/kernel/traps.c:432: warning: label `skip_trap' defined but not used
> arch/i386/mm/hugetlbpage.c:272: warning: `unlink_vma' defined but not used
> drivers/char/agp/agp.h:87: warning: `global_cache_flush' defined but not used
> drivers/char/agp/agp.h:87: warning: `global_cache_flush' defined but not used
> drivers/ide/pci/generic.h:138: warning: `unknown_chipset' defined but not used
> drivers/ide/ide.c: In function `start_request':
> drivers/ide/ide.c:881: warning: unused variable `hwif'
> drivers/ide/ide.c: In function `ide_do_drive_cmd':
> drivers/ide/ide.c:1518: warning: unused variable `major'
> Root device is (8, 1)
> Boot sector 512 bytes.
> Setup is 4854 bytes.
> System is 1253 kB
> warning: kernel is too big for standalone boot from floppy
Sincerely
Jan Marek
--
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080