Date: Sun, 31 Jan 1999 10:20:01 -0800 (PST) From: Sakari Jalovaara <sakari@regex.fi> To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/9407: "make kernel" yields buggy kernel in ceratin cases (ld bug?) Message-ID: <199901311820.KAA59371@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/9407; it has been noted by GNATS.
From: Sakari Jalovaara <sakari@regex.fi>
To: freebsd-gnats-submit@freebsd.org, olwi@icyb.kiev.ua
Cc:
Subject: Re: kern/9407: "make kernel" yields buggy kernel in ceratin cases (ld bug?)
Date: Sun, 31 Jan 1999 20:16:06 +0200
> [changing the name of a variable produces very different
> kernels, one of which crashes]
'cmp -l kernel.IRQ kernel.irq' probably produces lots of output
because some sort of symbol table hashing/sorting/whatever in 'ld'.
Compile the following:
#include <stdio.h>
int aa;
int bb;
int main (void)
{
printf ("%d\n", &aa < &bb);
return 0;
}
cc tst.c
mv a.out a.out-bb
<edit tst.c and change 'bb's to 'zz'>
cc tst.c
cmp -l a.out a.out-bb
-- gives more than four bytes worth of output.
Also, when you rename 'bb' to 'zz' in the above program, the output of
the program changes (at least on 4.0-current/ELF it does -- for other
versions of 'ld' some other name than 'zz' may do this.)
A more likely explanation than an ld bug is that either the patch or
the original sio.c has a bug whose behavior is changed when objects
are re-ordered in memory. For a first guess, I'd try placing
assert (xxx >= 0 && xxx < NSIOTOT);
statements wherever SameIRQ[xxx] is accessed.
++sja
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901311820.KAA59371>
