public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vital.had at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/107590] __atomic_test_and_set broken on PowerPC
Date: Wed, 09 Nov 2022 16:05:39 +0000	[thread overview]
Message-ID: <bug-107590-4-O2cU4hpb64@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107590-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Sergey Fedorov <vital.had at gmail dot com> ---
(In reply to Andrew Pinski from comment #2)
> >Reason: 259 at address: 0x00003109
> 
> Yes that does seem like an alignment disagreement.
> 
> I suspect the code is broken for allocation and it is allocating unaligned
> structs.

The code in Boost shared pointer tests looks pretty simple. Since the bus error
happens on those, no need to look into i2pd case.
I don’t really know how alignment works there, but hopefully someone can look
at that.

But the error was reproducible on several tests plus i2pd itself. All fixed by
switching to Boost own atomics. I am not qualified to judge if the code is
broken, but this looks like it is worth investigation.

> Also inside gdb can you do the following:
> 
> disassemble $pc-0x10 $pc+0x10
> info registers

I could try that tomorrow, provided an ancient GBD we have on PPC supports
that.

  parent reply	other threads:[~2022-11-09 16:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 15:33 [Bug target/107590] New: " vital.had at gmail dot com
2022-11-09 15:42 ` [Bug target/107590] " pinskia at gcc dot gnu.org
2022-11-09 15:48 ` pinskia at gcc dot gnu.org
2022-11-09 16:05 ` vital.had at gmail dot com [this message]
2022-11-09 16:36 ` pinskia at gcc dot gnu.org
2022-11-09 16:40 ` iains at gcc dot gnu.org
2022-11-09 16:52 ` pinskia at gcc dot gnu.org
2022-11-10 13:19 ` pdimov at gmail dot com
2022-11-10 16:56 ` pinskia at gcc dot gnu.org
2022-11-10 17:13 ` pdimov at gmail dot com
2022-11-10 18:14 ` vital.had at gmail dot com
2022-11-10 18:16 ` vital.had at gmail dot com
2022-11-10 18:24 ` vital.had at gmail dot com
2022-11-10 22:20 ` pinskia at gcc dot gnu.org
2022-11-10 23:02 ` iains at gcc dot gnu.org
2022-11-10 23:24 ` vital.had at gmail dot com
2024-01-24 13:21 ` vital.had at gmail dot com

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-107590-4-O2cU4hpb64@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).