public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "potswa at mac dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/45841] [4.6 Regression]: r164529 cris-elf libstdc++ 27_io/basic_filebuf/seekoff/char/2-io.cc
Date: Tue, 05 Oct 2010 00:24:00 -0000	[thread overview]
Message-ID: <20101005002400.eRvJXNoWiW2fQ9yBmGEzmNLh6Bo1x2RMt21Z6KPjVRM@z> (raw)
In-Reply-To: <bug-45841-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45841

--- Comment #16 from David Krauss <potswa at mac dot com> 2010-10-05 00:24:35 UTC ---
(In reply to comment #15)
> r164528:
> ...
> read(4, "1", 1)                         = 1
> lseek(4, 4294967295, SEEK_CUR)          = 4294967303
> write(4, "x", 1)                        = 1
> write(4, "\n", 1)                       = 1
> lseek(4, 0, SEEK_CUR)                   = 4294967305
> read(4, "", 1)                          = 0
> read(4, "", 1)                          = 0
> lseek(4, 0, SEEK_END)                   = 4294967305
> ...
> 
> r164529:
> ...
> read(4, "1", 1)                         = 1
> lseek(4, 0, SEEK_CUR)                   = 8
> lseek(4, 4294967295, SEEK_CUR)          = 4294967303
> write(4, "x", 1)                        = 1
> write(4, "\n", 1)                       = 1
> lseek(4, 0, SEEK_CUR)                   = 4294967305
> read(4, "", 1)                          = 0
> read(4, "", 1)                          = 0
> write(2, "assertion \"", 11assertion ")            = 11

The failure had nothing to do with the additional seek. The excerpts above show
that the added operation didn't move the file pointer… the failure occurred at
the same position as success before the patch.

What the testcase ends up doing is extending the file and then reading past
EOF. That's not illegal behavior and the case as written should still pass
after comparing EOF == EOF, just as it did before my patch.

Hmm, yep, caught a bug in my patch! Thanks!


  parent reply	other threads:[~2010-10-05  0:24 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30 10:14 [Bug libstdc++/45841] New: " hp at gcc dot gnu.org
2010-09-30 10:24 ` [Bug libstdc++/45841] " potswa at mac dot com
2010-09-30 10:25 ` potswa at mac dot com
2010-09-30 10:34 ` paolo.carlini at oracle dot com
2010-09-30 10:47 ` potswa at mac dot com
2010-09-30 11:00 ` paolo.carlini at oracle dot com
2010-09-30 11:10 ` potswa at mac dot com
2010-09-30 11:24 ` paolo.carlini at oracle dot com
2010-09-30 11:35 ` rguenth at gcc dot gnu.org
2010-09-30 14:48 ` hp at gcc dot gnu.org
2010-09-30 17:47 ` rguenth at gcc dot gnu.org
2010-10-01  3:15 ` hp at gcc dot gnu.org
2010-10-01 12:15 ` paolo.carlini at oracle dot com
2010-10-01 12:19 ` potswa at mac dot com
2010-10-01 16:31 ` paolo.carlini at oracle dot com
2010-10-04 23:52 ` [Bug testsuite/45841] " hp at gcc dot gnu.org
2010-10-04 23:59 ` hp at gcc dot gnu.org
2010-10-05  0:24 ` potswa at mac dot com [this message]
2010-10-05  1:58 ` hp at gcc dot gnu.org
2010-10-05  2:58 ` potswa at mac dot com
2010-10-05  4:02 ` hp at gcc dot gnu.org
2010-10-05  9:11 ` [Bug libstdc++/45841] " paolo.carlini at oracle dot com
2010-10-05 17:03 ` hp at gcc dot gnu.org
2010-10-05 17:06 ` paolo.carlini at oracle dot com
2010-10-05 17:24 ` potswa at mac dot com
2010-10-05 17:26 ` potswa at mac dot com
2010-10-05 18:56 ` hp at gcc dot gnu.org
2010-10-05 19:30 ` hp at gcc dot gnu.org
2010-10-05 20:10 ` potswa at mac dot com
2010-10-05 21:13 ` paolo.carlini at oracle dot com
2010-10-05 21:32 ` potswa at mac dot com
2010-10-05 21:51 ` hp at gcc dot gnu.org
2010-10-05 21:59 ` hp at gcc dot gnu.org
2010-10-05 22:29 ` paolo.carlini at oracle dot com
2010-10-05 22:47 ` potswa at mac dot com
2010-10-05 23:16 ` hp at gcc dot gnu.org
2010-10-05 23:29 ` hp at gcc dot gnu.org
2010-10-05 23:31 ` potswa at mac dot com
2010-10-05 23:34 ` paolo.carlini at oracle dot com
2010-10-05 23:38 ` potswa at mac dot com
2010-10-05 23:41 ` paolo.carlini at oracle dot com
2010-10-05 23:47 ` potswa at mac dot com
2010-10-05 23:49 ` paolo.carlini at oracle dot com
2010-10-05 23:52 ` hp at gcc dot gnu.org
2010-10-06  0:17 ` paolo at gcc dot gnu.org
2010-10-07 21:47 ` hp at gcc dot gnu.org
2010-10-07 22:15 ` hp at gcc dot gnu.org

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=20101005002400.eRvJXNoWiW2fQ9yBmGEzmNLh6Bo1x2RMt21Z6KPjVRM@z \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).