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/105358] [12 Regression] scan* fails on targets without aligned memory allocators.
Date: Mon, 25 Apr 2022 11:19:28 +0000	[thread overview]
Message-ID: <bug-105358-4-KLlqjy7PHl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105358-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Still trying to understand where the problem is.
In work.c (gomp_init_work_share), there are 3 cases, one is ordered == 0,
another one ordered == 1, another one bigger numbers.  The first one doesn't
care,
ordered_team_ids is initialized to inline_ordered_team_ids just to make sure
we don't try to team_free it, isn't really used.  For ordered == 1 case, we
only use the trailing array as array of unsigned and most likely in the darwin9
case not at all, because I expect INLINE_ORDERED_TEAM_IDS_SIZE to be 0 or 4 or
something that small.
For the ordered > 1 case (used when some memory needs to be allocated after the
ordered_teams_ids array and that one should be possibly 8-byte aligned) it adds
extra __alignof__ (long long) - 1 to the size but undoes that if nthreads is
even and inline_ordered_team_ids is at position divisible by 8.

So, guess some question, can you e.g. from dumping DWARF on work.o find out:
sizeof (struct gomp_init_work_share)
offsetof (struct gomp_init_work_share, inline_ordered_team_ids)
?

  parent reply	other threads:[~2022-04-25 11:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-23 12:00 [Bug libgomp/105358] New: " iains at gcc dot gnu.org
2022-04-25  6:52 ` [Bug libgomp/105358] " rguenth at gcc dot gnu.org
2022-04-25  9:04 ` jakub at gcc dot gnu.org
2022-04-25  9:21 ` jakub at gcc dot gnu.org
2022-04-25  9:59 ` iains at gcc dot gnu.org
2022-04-25 11:19 ` jakub at gcc dot gnu.org [this message]
2022-04-25 11:34 ` jakub at gcc dot gnu.org
2022-04-25 11:44 ` iains at gcc dot gnu.org
2022-04-25 11:46 ` iains at gcc dot gnu.org
2022-04-25 11:47 ` jakub at gcc dot gnu.org
2022-04-25 22:19 ` iains at gcc dot gnu.org
2022-04-26  7:15 ` cvs-commit at gcc dot gnu.org
2022-04-26  8:15 ` jakub 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-105358-4-KLlqjy7PHl@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).