public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/96486] get_environment_variable crashes for environment variables that are empty strings
Date: Fri, 07 Aug 2020 21:19:47 +0000	[thread overview]
Message-ID: <bug-96486-4-iswr8aAJHh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96486-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #24 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Aug 07, 2020 at 08:35:49PM +0000, jussilehtola at fedoraproject dot org
wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96486
> 
> --- Comment #21 from Susi Lehtola <jussilehtola at fedoraproject dot org> ---
> to repeat: libgfortran crashes when you try to read an environment variable
> that is an empty string, in the case you have preallocated an array that is the
> proper size i.e. zero characters.

to repeat: I cannot reproduce your issue.  It does not crash.
It exits with a runtime error.

% setenv HOSTNAME
% gfcx -o z b.f90
% ./z
Fortran runtime error: Zero-length string passed as value to
get_environment_variable.

That's it.  No crash.

  parent reply	other threads:[~2020-08-07 21:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 16:03 [Bug fortran/96486] New: get_environment_variable fails for zero-length variables jussilehtola at fedoraproject dot org
2020-08-05 16:06 ` [Bug fortran/96486] get_environment_variable fails for zero-length values kargl at gcc dot gnu.org
2020-08-05 16:07 ` dominiq at lps dot ens.fr
2020-08-05 16:07 ` dominiq at lps dot ens.fr
2020-08-05 16:42 ` jussilehtola at fedoraproject dot org
2020-08-05 16:43 ` jussilehtola at fedoraproject dot org
2020-08-05 17:36 ` kargl at gcc dot gnu.org
2020-08-05 17:43 ` kargl at gcc dot gnu.org
2020-08-05 17:49 ` kargl at gcc dot gnu.org
2020-08-05 17:53 ` jussilehtola at fedoraproject dot org
2020-08-05 18:00 ` kargl at gcc dot gnu.org
2020-08-05 18:14 ` jussilehtola at fedoraproject dot org
2020-08-05 18:33 ` kargl at gcc dot gnu.org
2020-08-06  8:03 ` markeggleston at gcc dot gnu.org
2020-08-06  8:42 ` jussilehtola at fedoraproject dot org
2020-08-06 15:56 ` sgk at troutmask dot apl.washington.edu
2020-08-06 16:01 ` sgk at troutmask dot apl.washington.edu
2020-08-06 20:33 ` jussilehtola at fedoraproject dot org
2020-08-07  0:17 ` sgk at troutmask dot apl.washington.edu
2020-08-07  3:02 ` kargl at gcc dot gnu.org
2020-08-07 13:14 ` jussilehtola at fedoraproject dot org
2020-08-07 15:34 ` sgk at troutmask dot apl.washington.edu
2020-08-07 20:35 ` jussilehtola at fedoraproject dot org
2020-08-07 20:36 ` [Bug fortran/96486] get_environment_variable crashes for environment variables that are empty strings jussilehtola at fedoraproject dot org
2020-08-07 20:42 ` jussilehtola at fedoraproject dot org
2020-08-07 21:19 ` sgk at troutmask dot apl.washington.edu [this message]
2020-08-07 21:55 ` schwab@linux-m68k.org
2020-08-07 22:13 ` sgk at troutmask dot apl.washington.edu
2020-08-07 22:22 ` harald at gigawatt dot nl
2020-08-08 15:49 ` jussilehtola at fedoraproject dot org
2020-08-24 10:13 ` cvs-commit at gcc dot gnu.org
2020-08-24 11:36 ` cvs-commit at gcc dot gnu.org
2020-08-24 13:51 ` cvs-commit at gcc dot gnu.org
2020-08-24 14:05 ` markeggleston 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=bug-96486-4-iswr8aAJHh@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).