Re: compile-time error in 2.6.0-test9

From: Marco Roeland
Date: Sun Oct 26 2003 - 11:25:31 EST


On Sunday Oktober 26th 2003 at 10:53 uur wsy@xxxxxxxx wrote:

>
> [1.] One line summary of the problem:
>
> compile-time error in fresh, unpatched 2.6.0-test9

Yes, this is a compiler bug in gcc 2.96 you're hitting. Two separate
patches have been posted that fix it (one from Shane Shrybman and one by
me). Here's my version (tested by Norman Diamond):

--- linux-2.6.0-test8/fs/proc/array.c.orig 2003-10-21 16:18:40.000000000 +0200
+++ linux-2.6.0-test8/fs/proc/array.c 2003-10-23 09:30:27.000000000 +0200
@@ -302,6 +302,7 @@
pid_t ppid;
int num_threads = 0;
struct mm_struct *mm;
+ unsigned long long starttime;

state = *get_task_state(task);
vsize = eip = esp = 0;
@@ -343,9 +344,7 @@
read_lock(&tasklist_lock);
ppid = task->pid ? task->real_parent->pid : 0;
read_unlock(&tasklist_lock);
- res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
-%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
+ res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu ",
task->pid,
task->comm,
state,
@@ -355,7 +354,9 @@
tty_nr,
tty_pgrp,
task->flags,
- task->min_flt,
+ task->min_flt);
+ starttime = jiffies_64_to_clock_t(task->start_time - INITIAL_JIFFIES);
+ res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu ",
task->cmin_flt,
task->maj_flt,
task->cmaj_flt,
@@ -367,15 +368,15 @@
nice,
num_threads,
jiffies_to_clock_t(task->it_real_value),
- (unsigned long long)
- jiffies_64_to_clock_t(task->start_time - INITIAL_JIFFIES),
+ starttime,
vsize,
mm ? mm->rss : 0, /* you might want to shift this left 3 */
task->rlim[RLIMIT_RSS].rlim_cur,
mm ? mm->start_code : 0,
mm ? mm->end_code : 0,
mm ? mm->start_stack : 0,
- esp,
+ esp);
+ res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
eip,
/* The signal information here is obsolete.
* It must be decimal for Linux 2.0 compatibility.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/