From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Mon, 19 Nov 2007 10:14:52 +0000 From: "Douglas A. Gwyn" Message-ID: <473E4CC5.9FF9EDDA@null.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <473CA225.86119D3C@null.net>, Subject: Re: [9fans] Bounds checking bug ifcall(2) functions Topicbox-Message-UUID: 011a9ad2-ead3-11e9-9d60-3106f5b1d025 erik quanstrom wrote: > i don't think it means you have to allocate an extra byte. there's > no requirement that you may indirect the "one-past the end" address. No, but (a) the arithmetic has to work properly, including relations like "p < q", and on some architectures merely loading a past-the-segment-end address into an address register can cause an invalid-address trap. Thus, the C implementation when it lays out the data objects in segments may have to make sure that the segment contains an extra unused byte at the end, just so its address will be valid.