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 middle-end/64922] runtime error: member call on misaligned address for type 'struct _Rep'
Date: Tue, 03 Feb 2015 20:04:00 -0000	[thread overview]
Message-ID: <bug-64922-4-cZHVUylBFR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64922-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-03
                 CC|                            |hubicka at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Goes away with -fno-devirtualize or -fno-devirtualize-speculatively.
Looking at the dumps, after IPA we have:
  [pol6.C:39:3] Head::parse (_33, _30);
call (looks fine), but instead of the 3 expected
  [pol6.C:39:3] Code_Block::parse (_36, _30);
  [pol6.C:39:3] Code_Block::parse (_36, _30);
  [pol6.C:39:3] Code_Block::parse (_36, _30);
calls that show e.g. with -fno-devirtualize-speculatively we instead have:
  [pol6.C:39:3] __builtin_unreachable (_36, _30);
  [pol6.C:39:3] __builtin_unreachable (_36, _30);
  [pol6.C:39:3] __builtin_unreachable (_36, _30);
and no wonder everything goes wrong afterwards.
I don't see why IPA devirtualization thinks something is wrong on the
Code_Block::parse calls.  And, because for these __builtin_unreachable calls
IPA doesn't strip the undesirable arguments, it isn't transformed even with
-fsanitize=undefined into __ubsan_handle_unreachable (), which would make it
far easier to figure this out.

Honza, can you please have a look?


  parent reply	other threads:[~2015-02-03 20:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 16:19 [Bug middle-end/64922] New: " mpolacek at gcc dot gnu.org
2015-02-03 16:21 ` [Bug middle-end/64922] " mpolacek at gcc dot gnu.org
2015-02-03 16:23 ` mpolacek at gcc dot gnu.org
2015-02-03 16:59 ` jakub at gcc dot gnu.org
2015-02-03 20:04 ` jakub at gcc dot gnu.org [this message]
2015-02-04 17:53 ` [Bug middle-end/64922] [5 Regression] " hubicka at gcc dot gnu.org
2015-02-04 18:39 ` hubicka at gcc dot gnu.org
2015-02-04 18:43 ` jakub at gcc dot gnu.org
2015-02-04 20:06 ` jakub at gcc dot gnu.org
2015-02-04 20:09 ` jakub at gcc dot gnu.org
2015-02-04 20:10 ` jakub at gcc dot gnu.org
2015-02-04 20:29 ` hubicka at gcc dot gnu.org
2015-02-04 21:55 ` hubicka at gcc dot gnu.org
2015-02-04 22:00 ` hubicka at gcc dot gnu.org
2015-02-04 23:00 ` hubicka at gcc dot gnu.org
2015-02-05 10:10 ` 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-64922-4-cZHVUylBFR@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).