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 libgomp/111413] libgomp >= 13 segfault on loading if environ is NULL
Date: Mon, 18 Sep 2023 09:03:01 +0000	[thread overview]
Message-ID: <bug-111413-4-FTpvL6Hax2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111413-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
   Last reconfirmed|                            |2023-09-18

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 55920
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55920&action=edit
gcc14-pr111413.patch

Untested fix.  Large patch but in the end it is just
--- libgomp/env.c
+++ libgomp/env.c
@@ -2224,6 +2224,7 @@ initialize_env (void)
   none = gomp_get_initial_icv_item (GOMP_DEVICE_NUM_FOR_NO_SUFFIX);
   initialize_icvs (&none->icvs);

+  if (environ)
     for (env = environ; *env != 0; env++)
       {
        if (!startswith (*env, "OMP_"))
plus reindentation.

  reply	other threads:[~2023-09-18  9:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 10:09 [Bug libgomp/111413] New: " silvio at traversaro dot it
2023-09-18  9:03 ` jakub at gcc dot gnu.org [this message]
2023-09-19  7:31 ` [Bug libgomp/111413] " cvs-commit at gcc dot gnu.org
2023-09-19  8:31 ` silvio at traversaro dot it
2023-12-05 16:32 ` cvs-commit 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-111413-4-FTpvL6Hax2@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).