public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures
@ 2015-03-23 8:07 trippels at gcc dot gnu.org
2015-03-23 8:26 ` [Bug debug/65521] " trippels at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-23 8:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
Bug ID: 65521
Summary: [5 Regression] nondeterministic -fcompare-debug
failures
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
Host: powerpc64le-unknown-linux-gnu
Target: powerpc64le-unknown-linux-gnu
Build: powerpc64le-unknown-linux-gnu
on ppc64le I get nondeterministic -fcompare-debug failures during Linux
kernel build, e.g:
% gcc -c -fcompare-debug -std=gnu89 -O2 ipmi_watchdog.i
gcc: error: ipmi_watchdog.i: -fcompare-debug failure
% gcc -c -fcompare-debug -std=gnu89 -O2 ipmi_watchdog.i
% gcc -c -fcompare-debug -std=gnu89 -O2 ipmi_watchdog.i
gcc: error: ipmi_watchdog.i: -fcompare-debug failure
% diff -u ipmi_watchdog.gkd ipmi_watchdog.gk.gkd
--- ipmi_watchdog.gkd 2015-03-23 07:51:04.510095107 +0000
+++ ipmi_watchdog.gk.gkd 2015-03-23 07:51:05.100104842 +0000
@@ -90,7 +90,7 @@
Declarations used by panic_smi_free, sorted by DECL_UID:
0: static void panic_recv_free (struct ipmi_recv_msg *);
-;; Function panic_smi_free (panic_smi_free, funcdef_no=1412, cgraph_uid=1422,
symbol_order=1513)
+;; Function panic_smi_free (panic_smi_free, funcdef_no=1408, cgraph_uid=1422,
symbol_order=1513)
(note # 0 0 NOTE_INSN_DELETED)
(note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK)
@@ -531,7 +531,7 @@
Declarations used by heartbeat_free_smi, sorted by DECL_UID:
0: static void heartbeat_free_recv (struct ipmi_recv_msg *);
-;; Function heartbeat_free_smi (heartbeat_free_smi, funcdef_no=1408,
cgraph_uid=1426, symbol_order=1526)
+;; Function heartbeat_free_smi (heartbeat_free_smi, funcdef_no=1412,
cgraph_uid=1426, symbol_order=1526)
(note # 0 0 NOTE_INSN_DELETED)
(note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
@ 2015-03-23 8:26 ` trippels at gcc dot gnu.org
2015-03-23 9:30 ` trippels at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-23 8:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 35102
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35102&action=edit
unreduced testcase
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
2015-03-23 8:26 ` [Bug debug/65521] " trippels at gcc dot gnu.org
@ 2015-03-23 9:30 ` trippels at gcc dot gnu.org
2015-03-23 9:31 ` [Bug ipa/65521] " trippels at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-23 9:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 35104
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35104&action=edit
testcase for x86_64
Also happens on x86_64:
% gcc -c -fcompare-debug -std=gnu89 -O2 hooks.i
gcc: error: hooks.i: -fcompare-debug failure
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
2015-03-23 8:26 ` [Bug debug/65521] " trippels at gcc dot gnu.org
2015-03-23 9:30 ` trippels at gcc dot gnu.org
@ 2015-03-23 9:31 ` trippels at gcc dot gnu.org
2015-03-23 9:43 ` trippels at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-23 9:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-23
CC| |marxin at gcc dot gnu.org
Component|debug |ipa
Target Milestone|--- |5.0
Ever confirmed|0 |1
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I suspect r221576 is responsible for this issue, because -fno-ipa-icf "fixes"
the problem.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2015-03-23 9:31 ` [Bug ipa/65521] " trippels at gcc dot gnu.org
@ 2015-03-23 9:43 ` trippels at gcc dot gnu.org
2015-03-23 9:44 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-23 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
struct socket {
int sk;
};
selinux_task_getioprio(struct task_struct *p) {
return current_has_perm(p, 256UL);
}
selinux_task_getscheduler(struct task_struct *p) {
return current_has_perm(p, 256UL);
}
selinux_socket_getsockname(struct socket *sock) {
return sock_has_perm(get_current(), &sock->sk, 16UL);
}
selinux_socket_getpeername(struct socket *sock) {
return sock_has_perm(get_current(), &sock->sk, 16UL);
}
selinux_ops() { security_module_enable(selinux_ops); }
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2015-03-23 9:43 ` trippels at gcc dot gnu.org
@ 2015-03-23 9:44 ` rguenth at gcc dot gnu.org
2015-03-23 9:46 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-23 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Feels like hashing of pointers and walking hash-tables where ordering changes
code-generation (well, DECL_UID in this case). That's a no-no, of course
(think address-space randomization).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2015-03-23 9:44 ` rguenth at gcc dot gnu.org
@ 2015-03-23 9:46 ` jakub at gcc dot gnu.org
2015-03-23 9:57 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-23 9:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
But even hashing DECL_UIDs rather than hashing pointers is a no-go here,
pointers can be arbitrary, for DECL_UIDs we at least have the guarantee that -g
and -g0 DECL_UIDs compare the same, but there can be bigger gaps in between
them for -g. Dunno if symtab_node's order field can be used reliably for this
or not (or it could hash ->name () string).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (5 preceding siblings ...)
2015-03-23 9:46 ` jakub at gcc dot gnu.org
@ 2015-03-23 9:57 ` jakub at gcc dot gnu.org
2015-03-23 10:31 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-23 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 35105
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35105&action=edit
gcc5-pr65521.patch
This fixes this for me. But I haven't done any in-depth analysis whether the
symtab order fields are always identical between -g and -g0.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (6 preceding siblings ...)
2015-03-23 9:57 ` jakub at gcc dot gnu.org
@ 2015-03-23 10:31 ` jakub at gcc dot gnu.org
2015-03-23 10:34 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-23 10:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Though, judging from the fact that we print symtab_node::order into the
-fdump-final-insns= dumps:
;; Function selinux_ops (selinux_ops, funcdef_no=4, cgraph_uid=4,
symbol_order=4)
it should be ok (otherwise we'd have -fcompare-debug failures already).
For functions we could also use node->uid (either just that, or hash in both),
but we don't have those in the varpool.
So, I think I'll just add the testcase into the testsuite and bootstrap/regtest
this.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (7 preceding siblings ...)
2015-03-23 10:31 ` jakub at gcc dot gnu.org
@ 2015-03-23 10:34 ` jakub at gcc dot gnu.org
2015-03-23 15:37 ` jakub at gcc dot gnu.org
2015-03-23 15:42 ` trippels at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-23 10:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35105|0 |1
is obsolete| |
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 35106
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35106&action=edit
gcc5-pr65521.patch
Patch I'm going to bootstrap/regtest.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (8 preceding siblings ...)
2015-03-23 10:34 ` jakub at gcc dot gnu.org
@ 2015-03-23 15:37 ` jakub at gcc dot gnu.org
2015-03-23 15:42 ` trippels at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-23 15:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Mar 23 15:17:20 2015
New Revision: 221596
URL: https://gcc.gnu.org/viewcvs?rev=221596&root=gcc&view=rev
Log:
PR ipa/65521
* ipa-icf.c (sem_item::update_hash_by_addr_refs): Hash
ultimate_alias_target ()->order ints instead of
ultimate_alias_target () pointers.
* gcc.dg/pr65521.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr65521.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-icf.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/65521] [5 Regression] nondeterministic -fcompare-debug failures
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
` (9 preceding siblings ...)
2015-03-23 15:37 ` jakub at gcc dot gnu.org
@ 2015-03-23 15:42 ` trippels at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-23 15:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65521
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed. Thanks!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-03-23 15:30 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23 8:07 [Bug debug/65521] New: [5 Regression] nondeterministic -fcompare-debug failures trippels at gcc dot gnu.org
2015-03-23 8:26 ` [Bug debug/65521] " trippels at gcc dot gnu.org
2015-03-23 9:30 ` trippels at gcc dot gnu.org
2015-03-23 9:31 ` [Bug ipa/65521] " trippels at gcc dot gnu.org
2015-03-23 9:43 ` trippels at gcc dot gnu.org
2015-03-23 9:44 ` rguenth at gcc dot gnu.org
2015-03-23 9:46 ` jakub at gcc dot gnu.org
2015-03-23 9:57 ` jakub at gcc dot gnu.org
2015-03-23 10:31 ` jakub at gcc dot gnu.org
2015-03-23 10:34 ` jakub at gcc dot gnu.org
2015-03-23 15:37 ` jakub at gcc dot gnu.org
2015-03-23 15:42 ` trippels at gcc dot gnu.org
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).