public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/65610] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
@ 2015-03-27 18:15 ` burnus at gcc dot gnu.org
2015-03-28 10:28 ` [Bug tree-optimization/65610] [5 Regression] " jakub at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-03-27 18:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Note that the "-fno-sanitize=vptr" is crucial: without it doesn't give an ICE.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
2015-03-27 18:15 ` [Bug sanitizer/65610] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3 burnus at gcc dot gnu.org
@ 2015-03-28 10:28 ` jakub at gcc dot gnu.org
2015-03-28 13:28 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-28 10:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
Component|sanitizer |tree-optimization
Target Milestone|--- |5.0
Summary|Compare debug failure with |[5 Regression] Compare
|-g3 -fsanitize=undefined |debug failure with -g3
|-fno-sanitize=vptr -O3 |-fsanitize=undefined
| |-fno-sanitize=vptr -O3
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems to be a bug somewhere in ipa-polymorphic-call.c.
In particular, it seems noncall_stmt_may_be_vtbl_ptr_store returns different
results between -g0 and -g - the function apparently walks BLOCKs and
apparently with -g we have in there BLOCK_ABSTRACT_ORIGIN of some inlined dtor,
while for -g0 something has optimized the blocks away.
Honza, can you please have a look?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
2015-03-27 18:15 ` [Bug sanitizer/65610] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3 burnus at gcc dot gnu.org
2015-03-28 10:28 ` [Bug tree-optimization/65610] [5 Regression] " jakub at gcc dot gnu.org
@ 2015-03-28 13:28 ` jakub at gcc dot gnu.org
2015-03-28 20:55 ` hubicka at ucw dot cz
` (5 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-28 13:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps one possibility would be even for -g0 preserve those specific BLOCKs
(those satisfying
if (BLOCK_ABSTRACT_ORIGIN (block)
&& TREE_CODE (BLOCK_ABSTRACT_ORIGIN (block)) == FUNCTION_DECL)
{
tree fn = BLOCK_ABSTRACT_ORIGIN (block);
if (flags_from_decl_or_type (fn) & (ECF_PURE | ECF_CONST))
return false;
return (TREE_CODE (TREE_TYPE (fn)) == METHOD_TYPE
&& (DECL_CXX_CONSTRUCTOR_P (fn)
|| DECL_CXX_DESTRUCTOR_P (fn)));
}
).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2015-03-28 13:28 ` jakub at gcc dot gnu.org
@ 2015-03-28 20:55 ` hubicka at ucw dot cz
2015-03-29 0:06 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: hubicka at ucw dot cz @ 2015-03-28 20:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> ---
> Perhaps one possibility would be even for -g0 preserve those specific BLOCKs
> (those satisfying
Yep, we should do that. Who is removing them?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2015-03-28 20:55 ` hubicka at ucw dot cz
@ 2015-03-29 0:06 ` jakub at gcc dot gnu.org
2015-03-30 7:58 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-29 0:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Haven't debugged that part yet.
Looking at decl_maybe_in_construction_p, we'd probably need to treat functions
with DECL_ABSTRACT_ORIGIN being ctor or dtor.
I can look into this on Monday...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2015-03-29 0:06 ` jakub at gcc dot gnu.org
@ 2015-03-30 7:58 ` hubicka at gcc dot gnu.org
2015-03-30 11:38 ` [Bug ipa/65610] " jakub at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-30 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
i guess it is remove_unused_scope_block_p who remove the blocks. I guess
we want to consider blocks as live when BLOCK_ABSTRACT_ORIGIN is function decl,
it is DECL_CXX_CONSTRUCTOR or DESTURCTOR and moreover it is polymorphic, i.e.
method_class_type (TREE_TYPE (fn)) has TYPE_BINFO and that binfo passes
polymorphic_type_binfo_p
We may want to make predicates polymorphic_type_ctor/dtor to test that :)
I will try to look into it tomorrow, but given the timezone, I would not mind
if you beat me :)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ipa/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2015-03-30 7:58 ` hubicka at gcc dot gnu.org
@ 2015-03-30 11:38 ` jakub at gcc dot gnu.org
2015-03-31 2:11 ` jakub at gcc dot gnu.org
2015-03-31 2:57 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-30 11:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 35180
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35180&action=edit
gcc5-pr65610.patch
Untested fix. Not at all sure about the if (!cfun->after_inlining) guard,
dunno when we can call the ipa-polymorphic-call.c stuff, if it can happen also
later on, the guard should be removed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ipa/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2015-03-30 11:38 ` [Bug ipa/65610] " jakub at gcc dot gnu.org
@ 2015-03-31 2:11 ` jakub at gcc dot gnu.org
2015-03-31 2:57 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-31 2:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Mar 30 21:56:02 2015
New Revision: 221781
URL: https://gcc.gnu.org/viewcvs?rev=221781&root=gcc&view=rev
Log:
PR ipa/65610
* ipa-utils.h (inlined_polymorphic_ctor_dtor_block_p): Declare.
* ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p): New
function.
(decl_maybe_in_construction_p, noncall_stmt_may_be_vtbl_ptr_store):
Use it.
* ipa-prop.c (param_type_may_change_p): Likewise.
* tree-ssa-live.c: Include ipa-utils.h and its dependencies.
(remove_unused_scope_block_p): Add in_ctor_dtor_block
argument. Before inlining, preserve
inlined_polymorphic_ctor_dtor_block_p blocks and the outermost block
with FUNCTION_DECL BLOCK_ABSTRACT_ORIGIN inside of them. Adjust
recursive calls.
(remove_unused_locals): Adjust remove_unused_scope_block_p caller.
* g++.dg/ubsan/pr65610.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/ubsan/pr65610.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-polymorphic-call.c
trunk/gcc/ipa-prop.c
trunk/gcc/ipa-utils.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-live.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ipa/65610] [5 Regression] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2015-03-31 2:11 ` jakub at gcc dot gnu.org
@ 2015-03-31 2:57 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-31 2:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65610
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-03-30 21:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-65610-4@http.gcc.gnu.org/bugzilla/>
2015-03-27 18:15 ` [Bug sanitizer/65610] Compare debug failure with -g3 -fsanitize=undefined -fno-sanitize=vptr -O3 burnus at gcc dot gnu.org
2015-03-28 10:28 ` [Bug tree-optimization/65610] [5 Regression] " jakub at gcc dot gnu.org
2015-03-28 13:28 ` jakub at gcc dot gnu.org
2015-03-28 20:55 ` hubicka at ucw dot cz
2015-03-29 0:06 ` jakub at gcc dot gnu.org
2015-03-30 7:58 ` hubicka at gcc dot gnu.org
2015-03-30 11:38 ` [Bug ipa/65610] " jakub at gcc dot gnu.org
2015-03-31 2:11 ` jakub at gcc dot gnu.org
2015-03-31 2:57 ` jakub 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).