public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "uweigand at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/21594] FAIL: gfortran.dg/eoshift.f90  -O0  execution test
Date: Fri, 27 May 2005 16:06:00 -0000	[thread overview]
Message-ID: <20050527160545.21213.qmail@sourceware.org> (raw)
In-Reply-To: <20050515210841.21594.danglin@gcc.gnu.org>


------- Additional Comments From uweigand at gcc dot gnu dot org  2005-05-27 16:05 -------
I'm seeing the failure on s390 as well.  What appears to happen is that
the main program calls the library routine

static void
eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
          int shift, const char * pbound, int which)

with a correctly set up 'ret' array descriptor, but after the routine
returns, the ret->data pointer has been clobbered to NULL.  The main
routine then segfaults when accessing data via that pointer.

The pointer is clobbered by the memcpy in line 165:
      while (n--)
        {
          memcpy (dest, pbound, size);
          dest += roffset;
        }
which is presumably not intended to overwrite the descriptor.  I'm 
assuming this is some sort of buffer overflow bug ...

-- 


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


  parent reply	other threads:[~2005-05-27 16:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-15 21:08 [Bug fortran/21594] New: " danglin at gcc dot gnu dot org
2005-05-19 16:31 ` [Bug fortran/21594] " tobi at gcc dot gnu dot org
2005-05-19 16:51 ` pinskia at gcc dot gnu dot org
2005-05-19 19:35 ` tobi at gcc dot gnu dot org
2005-05-19 22:22 ` tkoenig at gcc dot gnu dot org
2005-05-19 22:28 ` pinskia at gcc dot gnu dot org
2005-05-19 23:10 ` dave at hiauly1 dot hia dot nrc dot ca
2005-05-27 16:06 ` uweigand at gcc dot gnu dot org [this message]
2005-06-13 22:37 ` cvs-commit at gcc dot gnu dot org
2005-06-14 10:36 ` uweigand at gcc dot gnu dot org
2005-06-22 11:41 ` tkoenig at gcc dot gnu dot org
2005-06-23 20:22 ` tobi at gcc dot gnu dot org
2005-06-27  9:53 ` tkoenig at gcc dot gnu dot org
2005-07-07 22:02 ` cvs-commit at gcc dot gnu dot org
2005-07-07 22:04 ` [Bug fortran/21594] [4.0 only] " tkoenig at gcc dot gnu dot org
2005-07-14 21:18 ` cvs-commit at gcc dot gnu dot org
2005-07-14 21:19 ` tkoenig at gcc dot gnu dot org
2005-07-14 21:21 ` tkoenig at gcc dot gnu dot org
2005-07-14 21:47 ` tkoenig at gcc dot gnu dot org
2005-08-10 20:32 ` tkoenig at gcc dot gnu dot 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=20050527160545.21213.qmail@sourceware.org \
    --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).