From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3193 invoked by alias); 3 Feb 2015 20:04:32 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3109 invoked by uid 48); 3 Feb 2015 20:04:28 -0000 From: "jakub at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority bug_status cf_reconfirmed_on cc target_milestone everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00256.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64922 Jakub Jelinek 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 --- 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?