public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Werner Tuchan" <tuwn@gmx.net>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin
Date: Thu, 20 Dec 2001 06:46:00 -0000	[thread overview]
Message-ID: <20011220144603.17708.qmail@sources.redhat.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3028 bytes --]

The following reply was made to PR bootstrap/5149; it has been noted by GNATS.

From: "Werner Tuchan" <tuwn@gmx.net>
To: <neil@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<tuwn@gmx.net>,
	<gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin
Date: Thu, 20 Dec 2001 15:45:32 +0100

 Thats the piece of code that loaded the file, this time its libgcc2.c.
 
 cppfiles.c
   388       /* Use mmap if the file is big enough to be worth it (controlled
   389   by MMAP_THRESHOLD) and if we can safely count on there being
   390   at least one readable NUL byte after the end of the file's
   391   contents.  This is true for all tested operating systems when
   392   the file size is not an exact multiple of the page size.  */
 - 393       if (size / pagesize >= MMAP_THRESHOLD
   394    && (size % pagesize) != 0)
   395  {
 - 396    buf = (U_CHAR *) mmap (0, size, PROT_READ, MAP_PRIVATE, inc->fd,
 0);
 - 397    if (buf == (U_CHAR *)-1)
   398      goto perror_fail;
 - 399    inc->mapped = 1;
 - 400  }
   401       else
   402 #endif
 
 
 (gdb) x inc.name
 0x10a3af8:  "../../gcc-20011217/gcc/libgcc2.c"
 
 (gdb) x /s buf + 46170
 0x83a5445a:  "ED_ATEXIT */\n\n#endif /* L_exit */\nÀÀÀ"
 
 (gdb) x /100xb buf + 46170
 0x83a5445a: 0x45 0x44 0x5f 0x41 0x54 0x45 0x58 0x49
 0x83a54462: 0x54 0x20 0x2a 0x2f 0x0a 0x0a 0x23 0x65
 0x83a5446a: 0x6e 0x64 0x69 0x66 0x20 0x2f 0x2a 0x20
 0x83a54472: 0x4c 0x5f 0x65 0x78 0x69 0x74 0x20 0x2a
 0x83a5447a: 0x2f 0x0a 0xc0 0xc0 0xc0 0x00 0xc0 0xc0
 0x83a54482: 0xc0 0x00 0xc0 0xc0 0xc0 0x00 0xc0 0xc0
 0x83a5448a: 0xc0 0x00 0xc0 0xc0 0xc0 0x00 0xc0 0xc0
 0x83a54492: 0xc0 0x00 0xc0 0xc0 0xc0 0x00 0xc0 0xc0
 0x83a5449a: 0xc0 0x00 0x00 0x00 0x00 0x00 0x00 0x00
 0x83a544a2: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
 0x83a544aa: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
 0x83a544b2: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
 0x83a544ba: 0x00 0x00 0x00 0x00
 
 
 -----Ursprüngliche Nachricht-----
 Von: <neil@gcc.gnu.org>
 An: <gcc-bugs@gcc.gnu.org>; <gcc-prs@gcc.gnu.org>; <nobody@gcc.gnu.org>;
 <tuwn@gmx.net>
 Gesendet: Donnerstag, 20. Dezember 2001 01:20
 Betreff: Re: bootstrap/5149: gcc-20011217 reads beyond EOF on cygwin
 
 
 > Synopsis: gcc-20011217 reads beyond EOF on cygwin
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: neil
 > State-Changed-When: Wed Dec 19 16:20:04 2001
 > State-Changed-Why:
 >     Is there any chance you could try and debug this?
 >     I need to know which code path is being taken inside
 >     read_include_file() in cppfiles.c, when it is reading in
 >     the file(s) that cause the problem (e.g. longlong.h).
 >     In particular, we need to be sure that the in-memory
 >     file buffer is properly NUL-terminated.
 >
 >     If you use -v, you will see the command line used to invoke cc1; that
 is what you should try and debug.
 >
 >     Thanks.
 >
 >
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 r=5149
 >
 


             reply	other threads:[~2001-12-20 14:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-20  6:46 Werner Tuchan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-19  4:26 neil
2001-12-21 23:36 Zack Weinberg
2001-12-21 10:56 Neil Booth
2001-12-21  9:26 Christopher Faylor
2001-12-21  6:46 Werner Tuchan
2001-12-20 11:16 Neil Booth
2001-12-20 11:06 Zack Weinberg
2001-12-20 10:36 Neil Booth
2001-12-19 16:20 neil
2001-12-18  3:56 tuwn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011220144603.17708.qmail@sources.redhat.com \
    --to=tuwn@gmx.net \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).