public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin
@ 2001-12-21 11:56 Polley Christopher W
  0 siblings, 0 replies; 3+ messages in thread
From: Polley Christopher W @ 2001-12-21 11:56 UTC (permalink / raw)
  To: cygwin; +Cc: Werner Tuchan


> -----Original Message-----
> From:	Christopher Faylor [SMTP:cgf@redhat.com]
> On Fri, Dec 21, 2001 at 03:42:14PM +0100, Werner Tuchan wrote:
> >> Weird.  The bytes after EOF are a mixture of NULs and 0xc0.  Is 0xc0
> >> of special significance in Windows?  Is your version of cygwin the
AFAIR, I once read in the book "Code Complete..." by Steve McConnell (a MS
programmer from the pre-windows days) a recommendation to set uninitialized
pointers and memory to a known value (I think he used 0xcccccccc for
pointers and C0 for buffers) to aid in finding bugs of using unitinialized
data areas.  My limited experience with the MS debugger leads me to believe
that this is a practice [at least some of] the MS kernel developers follow.
(BTW, he also advocated setting allocated blocks to another known value
immediately before freeing them, for a similar reason)

Warm Regards,
Chris




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin
  2001-12-21 10:48       ` Christopher Faylor
@ 2001-12-21 11:01         ` Neil Booth
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Booth @ 2001-12-21 11:01 UTC (permalink / raw)
  To: Werner Tuchan, neil, gcc-bugs, gcc-gnats, cygwin

Christopher Faylor wrote:-

> Can I ask why we'd be reading beyond EOF?  Is it guaranteed that bytes beyond
> EOF will be zero on UNIX?

This was discussed in September (see thread in gcc@ entitled "Bumming
cycles out of parse_identifier").  It was decided that all known
current Unix implementations have zeros until the next page boundary.
Assuming EOF is indicated by a NUL is used as a lexer optimization.

Neil.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin
       [not found]     ` <002b01c18a2d$aeb7d850$fb4d0ed4@softron.de>
@ 2001-12-21 10:48       ` Christopher Faylor
  2001-12-21 11:01         ` Neil Booth
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Faylor @ 2001-12-21 10:48 UTC (permalink / raw)
  To: Werner Tuchan; +Cc: Neil Booth, neil, gcc-bugs, gcc-gnats, cygwin

On Fri, Dec 21, 2001 at 03:42:14PM +0100, Werner Tuchan wrote:
>> Weird.  The bytes after EOF are a mixture of NULs and 0xc0.  Is 0xc0
>> of special significance in Windows?  Is your version of cygwin the
>> latest?  I recall some talk about mmap bugs in cygwin.
>
>The cygwin version is pretty recent. Two weeks old or so. The data after EOF
>is only garbage. I've seen different values than 0x0 or 0xc0 in the error
>messages. Windows propably doesn't clear the page before mapping the file
>onto it. There is likely a different behaviour here between Windows ME and
>NT.

Can I ask why we'd be reading beyond EOF?  Is it guaranteed that bytes beyond
EOF will be zero on UNIX?

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-12-21 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-21 11:56 bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin Polley Christopher W
     [not found] <20011220002004.23509.qmail@sources.redhat.com>
     [not found] ` <000701c18964$fad2d2e0$fb4d0ed4@softron.de>
     [not found]   ` <20011220183323.B3065@daikokuya.demon.co.uk>
     [not found]     ` <002b01c18a2d$aeb7d850$fb4d0ed4@softron.de>
2001-12-21 10:48       ` Christopher Faylor
2001-12-21 11:01         ` Neil Booth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).