public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/65089] FAIL: gfortran.dg/io_real_boz(2|_[45]).f90 when tested with -fsanitize=address
Date: Thu, 09 Apr 2015 06:39:00 -0000	[thread overview]
Message-ID: <bug-65089-4-kDcLHe7GxU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65089-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65089

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jerry DeLisle from comment #8)
> True, fortran strings are not generally NULL terminated.  However, for
> internal representation between Frontend and library we try to do so for
> safety.  Evidently missed one or don't have it in this case.  Still odd that
> my manual, so to speak, 'for' loop is finding a NULL and counting the
> correct length.  I will do some more digging, probably something "obvious".
> Just not seeing it yet.

Has libgfortran been compiled with -fsanitize=address, or just the testcase?
If the for loop is in the library that has not been instrumented, it is obvious
why it doesn't trigger, while if you call strlen there and it is emitted as a
library call, then it is intercepted by libasan and thus is instrumented.  And
the global variable (string literal) strlen is called on resides in the
executable and is instrumented there.


  parent reply	other threads:[~2015-04-09  6:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 10:07 [Bug fortran/65089] New: " dominiq at lps dot ens.fr
2015-04-03  0:03 ` [Bug fortran/65089] " hp at gcc dot gnu.org
2015-04-03  8:27 ` dominiq at lps dot ens.fr
2015-04-03 20:11 ` jvdelisle at gcc dot gnu.org
2015-04-03 22:25 ` jvdelisle at gcc dot gnu.org
2015-04-03 22:29 ` dominiq at lps dot ens.fr
2015-04-04  8:53 ` dominiq at lps dot ens.fr
2015-04-08 13:42 ` jakub at gcc dot gnu.org
2015-04-09  0:00 ` jvdelisle at gcc dot gnu.org
2015-04-09  6:39 ` jakub at gcc dot gnu.org [this message]
2015-04-09  8:48 ` dominiq at lps dot ens.fr
2015-04-09 12:08 ` jvdelisle at gcc dot gnu.org
2015-04-12  4:19 ` jvdelisle at gcc dot gnu.org
2015-04-12  7:47 ` dominiq at lps dot ens.fr
2015-04-15  1:27 ` jvdelisle at gcc dot gnu.org
2015-04-15  1:58 ` jvdelisle at gcc dot gnu.org
2015-09-07  9:57 ` dominiq at lps dot ens.fr

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=bug-65089-4-kDcLHe7GxU@http.gcc.gnu.org/bugzilla/ \
    --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).