public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C
@ 2020-03-21 14:31 dcb314 at hotmail dot com
  2020-03-21 15:15 ` [Bug c++/94250] " xerofoify at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2020-03-21 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94250
           Summary: valgrind error for ./g++.dg/ipa/remref-1.C
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For testsuite file ./g++.dg/ipa/remref-1.C, compiled by recent trunk
in a valgrind version and compiler flag -O2, does this:

==1825381== Invalid read of size 2
==1825381==    at 0x853A7C: symtab_node::clone_reference(ipa_ref*, gimple*)
(symtab.c:712)
==1825381==    by 0xA4F665: ipa_edge_args_sum_t::duplicate(cgraph_edge*,
cgraph_edge*, ipa_edge_args*, ipa_edge_args*) (ipa-prop.c:4226)
==1825381==    by 0xA58061:
call_summary<ipa_edge_args*>::symtab_duplication(cgraph_edge*, cgraph_edge*,
void*) (symbol-summary.h:737)
==1825381==    by 0x85CBD3: call_edge_duplication_hooks (cgraph.c:450)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/94250] valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
@ 2020-03-21 15:15 ` xerofoify at gmail dot com
  2020-03-21 15:20 ` xerofoify at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: xerofoify at gmail dot com @ 2020-03-21 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

Nicholas Krause <xerofoify at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mliska at suse dot cz,
                   |                            |xerofoify at gmail dot com

--- Comment #1 from Nicholas Krause <xerofoify at gmail dot com> ---
After looking through the git history that last time this functions in your
trace were changed is by commit id,
db30281f0b2ff6dfc0c4146291baf020a27e4065. Martin Liska  was the original
committer so he should comment on this.
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=db30281f0b2ff6dfc0c4146291baf020a27e4065

However this was changed:
summary->duplicate (edge1, edge2, edge1_summary,
                  summary->get_create (edge2));

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/94250] valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
  2020-03-21 15:15 ` [Bug c++/94250] " xerofoify at gmail dot com
@ 2020-03-21 15:20 ` xerofoify at gmail dot com
  2020-03-21 17:32 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: xerofoify at gmail dot com @ 2020-03-21 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Nicholas Krause <xerofoify at gmail dot com> ---
(In reply to Nicholas Krause from comment #1)
> After looking through the git history that last time this functions in your
> trace were changed is by commit id,
> db30281f0b2ff6dfc0c4146291baf020a27e4065. Martin Liska  was the original
> committer so he should comment on this.
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;
> h=db30281f0b2ff6dfc0c4146291baf020a27e4065
> 
> However this was changed:
> summary->duplicate (edge1, edge2, edge1_summary,
>                   summary->get_create (edge2));

and it appears to be assuming based on the above lines:
if (summary->m_initialize_when_cloning)
 edge1_summary = summary->get_create (edge1);
else
 edge1_summary = summary->get (edge1);

That this can never occur for edge2. Martin is edge2 assumed to be good by this
comment?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/94250] valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
  2020-03-21 15:15 ` [Bug c++/94250] " xerofoify at gmail dot com
  2020-03-21 15:20 ` xerofoify at gmail dot com
@ 2020-03-21 17:32 ` marxin at gcc dot gnu.org
  2020-03-21 17:36 ` [Bug ipa/94250] [10 Regression] ]valgrind " marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-21 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-03-21
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
A nice catch David! I've got a patch for it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ipa/94250] [10 Regression] ]valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2020-03-21 17:32 ` marxin at gcc dot gnu.org
@ 2020-03-21 17:36 ` marxin at gcc dot gnu.org
  2020-03-21 17:44 ` [Bug ipa/94250] [10 Regression] valgrind " dcb314 at hotmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-21 17:36 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.0
          Component|c++                         |ipa
            Summary|valgrind error for          |[10 Regression] ]valgrind
                   |./g++.dg/ipa/remref-1.C     |error for
                   |                            |./g++.dg/ipa/remref-1.C

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ipa/94250] [10 Regression] valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2020-03-21 17:36 ` [Bug ipa/94250] [10 Regression] ]valgrind " marxin at gcc dot gnu.org
@ 2020-03-21 17:44 ` dcb314 at hotmail dot com
  2020-03-21 17:46 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2020-03-21 17:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Martin Liška from comment #3)
> A nice catch David! I've got a patch for it.

Thanks. I should also perhaps mention that testsuite file
./g++.dg/ipa/remref-2.C has the same problem. It would be
wise to ensure your patch fixes both.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ipa/94250] [10 Regression] valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2020-03-21 17:44 ` [Bug ipa/94250] [10 Regression] valgrind " dcb314 at hotmail dot com
@ 2020-03-21 17:46 ` marxin at gcc dot gnu.org
  2020-03-23  7:57 ` cvs-commit at gcc dot gnu.org
  2020-03-23  7:58 ` marxin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-21 17:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to David Binderman from comment #4)
> (In reply to Martin Liška from comment #3)
> > A nice catch David! I've got a patch for it.
> 
> Thanks. I should also perhaps mention that testsuite file
> ./g++.dg/ipa/remref-2.C has the same problem. It would be
> wise to ensure your patch fixes both.

Yes, the patch covers both files. It's quite clear goes wrong there.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ipa/94250] [10 Regression] valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2020-03-21 17:46 ` marxin at gcc dot gnu.org
@ 2020-03-23  7:57 ` cvs-commit at gcc dot gnu.org
  2020-03-23  7:58 ` marxin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-23  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:2fa4b1ffd6e4058e53b3a486494b00098ee1bf63

commit r10-7327-g2fa4b1ffd6e4058e53b3a486494b00098ee1bf63
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Mar 23 08:57:06 2020 +0100

    Save ref->speculative_id before clone_reference.

            PR ipa/94250
            * symtab.c (symtab_node::clone_references): Save speculative_id
            as ref may be overwritten by create_reference.
            (symtab_node::clone_referring): Likewise.
            (symtab_node::clone_reference): Likewise.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ipa/94250] [10 Regression] valgrind error for ./g++.dg/ipa/remref-1.C
  2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2020-03-23  7:57 ` cvs-commit at gcc dot gnu.org
@ 2020-03-23  7:58 ` marxin at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-23  7:58 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-03-23  7:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-21 14:31 [Bug c++/94250] New: valgrind error for ./g++.dg/ipa/remref-1.C dcb314 at hotmail dot com
2020-03-21 15:15 ` [Bug c++/94250] " xerofoify at gmail dot com
2020-03-21 15:20 ` xerofoify at gmail dot com
2020-03-21 17:32 ` marxin at gcc dot gnu.org
2020-03-21 17:36 ` [Bug ipa/94250] [10 Regression] ]valgrind " marxin at gcc dot gnu.org
2020-03-21 17:44 ` [Bug ipa/94250] [10 Regression] valgrind " dcb314 at hotmail dot com
2020-03-21 17:46 ` marxin at gcc dot gnu.org
2020-03-23  7:57 ` cvs-commit at gcc dot gnu.org
2020-03-23  7:58 ` marxin 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).