On Tue, Feb 28, 2006 at 12:47:22AM +0100, Andi Kleen wrote:
> I remember asking rth about this at some point and IIRC
> he expressed doubts if it would actually do what expected. Richard?
It's a bit dicey to be sure. GCC may or may not be able to look
through the size of the array and not kill things beyond it. If
one could be *sure* of some actual maximum index, this would be
fine, but I don't think you can.
One could reasonably argue that if you used a structure with a
flexible array member, that GCC could not look through that. But
again I'm not 100% positive this is handled properly.
I think the best argument for simply leaving things with a memory
clobber is that these are atomic operations, and are on occasion
used as locks, or parts of locks.
r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]