Compile-time error with gcc-4.3 on sparc64
Hi,
I get the following error compiling latest kernel from git on sparc64 using gcc-4.3:
CC arch/sparc64/kernel/signal.o
cc1: warnings being treated as errors arch/sparc64/kernel/signal.c: En la función 'do_notify_resume':include/asm/uaccess.h:233: error: el subíndice de la matriz está por arriba de los límites de la matriz
make[1]: *** [arch/sparc64/kernel/signal.o] Error 1
make: *** [arch/sparc64/kernel] Error 2
("On function 'do_notify resume: error: matrix subindex is over matrix limits")
Compiling with gcc-4.2 it doesn't fail, neither a warning.
From: "David Martin" <[email protected]>
Date: Wed, 9 Jan 2008 10:31:45 +0100
Please report sparc problems to the Sparc mailing list, [email protected], thanks.
Quoted 11 lines
I get the following error compiling latest kernel from git on sparc64 using gcc-4.3:
CC
arch/sparc64/kernel/signal.o
cc1: warnings being treated as errorsarch/sparc64/kernel/signal.c: En la función 'do_notify_resume':include/asm/uaccess.h:233: error: el subíndice de la matriz está por arriba de los límites de la matriz
make[1]: *** [arch/sparc64/kernel/signal.o] Error 1
make: *** [arch/sparc64/kernel] Error 2
Quoted 1 line
("On function '
do_notifyresume: error: matrix subindex is over matrix limits")
I think you mean "array" instead of "matrix" in your translation.
In fact, you should rerun should build failures with "LANG=C" for the benefit of people reading your report.
Something is very wrong with the compiler, do_notify_resume() reads:
void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, int restart_syscall,
unsigned long thread_info_flags)
{
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
do_signal(regs, orig_i0, restart_syscall);
}uaccess.h, line 233 is:
static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long size)
{
unsigned long ret = ___copy_to_user(to, from, size);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^copy_to_user() isn't being called in do_notify_resume() at all.
Perhaps it's probably warning about some call to copy_to_user() that results from the inline expansion of do_signal() and all sub-calls.
But it's a bug that GCC isn't indicating exactly where the problem is, and in what specific function. My guess is that it's losing context during all of the inline expansions.