[lkml]   [2000]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] removal of "static foo = 0"
Albert D. Cahalan writes:
> Oh, bullshit. We break the C standard left and right already.
> This is the kernel, and the kernel can initialize BSS any damn
> way it feels like initializing it. The kernel isn't ever going
> to be standard C.
> Choosing an initializer that tends to catch unintended reliance
> on zeroed data would be good. Too bad it is too late to fix.

Its not me talking bullshit here, its you. It is totally reasonable
to rely on:

static int foo;

to be zero. If it is not, that is a bug in the C startup code. No
two ways about it. If someone then says "I want to initialise the
BSS to some magic value to catch this reliance" then we are breaking
a lot of peoples expectations. (Least Surprise theory)

To say again, relying on foo to be zero is not a bug.

If you set the BSS to something non-zero, we already know that a lot
will break. But it will break because someone has broken the BSS
initialisation code, not because it is relying on something that is
expected to be standard. By setting the BSS to something non-zero,
you're not telling anyone anything new. About the only response
will be "fix the BSS initialisation".

If you want to try this, then that is up to you. Don't let us
stop you. However, don't expect people to accept patches to
"fix" your self-created problem.

I look forward to your complaints about the disk subsystems,
keyboard, console, and so forth apparantly being broken.
|_____| ------------------------------------------------- ---+---+-
| | Russell King --- ---
| | | | / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:47    [W:1.269 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site