Uninitialized static int counters?

Jerry Feldman gaf at blu.org
Sat Feb 7 11:55:20 EST 2009


On 02/07/2009 10:55 AM, Michael ODonnell wrote:
> I suspect that whoever added that code to the kernel cribbed it
> from elsewhere without understanding (or maybe not caring whether
> they understood) it.  At any rate, I wasn't concerned about that
> do-while(0) construct so much as the apparent randomness of allowing
> the past behavior of other processes to determine whether the kernel
> will utter a complaint about the current process's behavior.  That,
> BTW, is what was in my head when I used the term "Uninitialized"
> in my Subject: line, arguably a poor choice of words.
Probably, but the main issue that you ascribed to Brazilians was the 
real issue in that when the signed int goes negative, there will be a 
lot of messages. Some kernel developer threw probably that in without 
too much thought. Additionally, I'm not sure if kernel printfs are 
enabled in production kernels. I forget how they are configured, so it 
is possible that no-one will ever see the message.

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20090207/e535587e/attachment.bin 


More information about the gnhlug-discuss mailing list