[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2020-02-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #11 from Jonathan Wakely  ---
Yes, I should add it there.

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2020-02-25 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #10 from Romain Geissler  ---
Ok, I was not sure whether it was more important to have a given major branch
(ie all gcc 9 releases) consistent or favor compatibility with the biggest
number of gcc releases (cross branches). You replied to that.

Do you think this shall be somehow be listed as a known issue in the gcc 9
release notes https://gcc.gnu.org/gcc-9/changes.html ?

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2020-02-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #9 from Jonathan Wakely  ---
(In reply to Romain Geissler from comment #8)
> Sorry to jump back into this old bug, but isn't it a issue that this was
> backported to gcc 9 after some releases of gcc 9 were in the wild yet ?

Yes. The choice was to accept a break and say "starting with GCC 9 there's an
ABI break, nothing before 9 is compatible with anything after that" or to
consider 9.1.0 and 9.2.0 to be buggy and fix the mistake for 9.3.0.


> I mean, someone having built some binaries with gcc 9.1.0 or 9.2.0, mixing
> it later with a binary built with the upcoming gcc 9.3.0 will also see a
> similar crash, no ? I think (but I am not sure yet) this is actually
> happening to me (although I am not using gcc releases, but directly compile
> from git from gcc-9-branch, so I understand my right to complain is low, if
> not non legit at all). What is advocated in this case, that all binaries
> build with gcc 9.1.0 or 9.2.0 shall be rebuilt as well ? Or is there any way
> that somehow the gcc 9 branch (and not gcc 10 one) can support both ABIs to
> cope with past mistakes ?

I'm not aware of any way to make that work.

Once GCC 9.3.0 is released the solution is to upgrade to 9.3.0 and consider
9.1.0 and 9.2.0 to have a bug. If that bug affects you, you'll need to rebuild
code built with those versions.

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2020-02-25 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

Romain Geissler  changed:

   What|Removed |Added

 CC||romain.geissler at amadeus dot 
com

--- Comment #8 from Romain Geissler  ---
Hi Jonathan,

Sorry to jump back into this old bug, but isn't it a issue that this was
backported to gcc 9 after some releases of gcc 9 were in the wild yet ?

I mean, someone having built some binaries with gcc 9.1.0 or 9.2.0, mixing it
later with a binary built with the upcoming gcc 9.3.0 will also see a similar
crash, no ? I think (but I am not sure yet) this is actually happening to me
(although I am not using gcc releases, but directly compile from git from
gcc-9-branch, so I understand my right to complain is low, if not non legit at
all). What is advocated in this case, that all binaries build with gcc 9.1.0 or
9.2.0 shall be rebuilt as well ? Or is there any way that somehow the gcc 9
branch (and not gcc 10 one) can support both ABIs to cope with past mistakes ?

Cheers,
Romain

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-11-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Fri Nov 22 12:36:18 2019
New Revision: 278614

URL: https://gcc.gnu.org/viewcvs?rev=278614&root=gcc&view=rev
Log:
PR libstdc++/92267 fix ABI change in deque iterators

Defaulting the copy constructor on its first declaration made it change
from user-provided (and non-trivial) to implicitly-defined (and
trivial). This caused an ABI incompatibility between GCC 8 and GCC 9,
where functions taking a deque iterator disagree on the argument passing
convention.

Backport from mainline
2019-10-29  Jonathan Wakely  

PR libstdc++/92267
* include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)):
Do not define as defaulted.
* testsuite/23_containers/deque/types/92267.cc: New test.

Added:
   
branches/gcc-9-branch/libstdc++-v3/testsuite/23_containers/deque/types/92267.cc
Modified:
branches/gcc-9-branch/libstdc++-v3/ChangeLog
branches/gcc-9-branch/libstdc++-v3/include/bits/stl_deque.h

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-11-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jonathan Wakely  ---
Done!

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-11-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #5 from Marek Polacek  ---
Can this be backported to 9 now, please?

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #2 from Jonathan Wakely  ---
Seems to be due to r260380

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

--- Comment #1 from Jonathan Wakely  ---
Preprocessing with GCC 8 and then compiling with GCC 9 doesn't crash, so it's
due to a change in libstdc++ headers.

[Bug libstdc++/92267] [9 Regression] crash with a cppunit test case (built by GCC 9) and cpptest (built with GCC 8)

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92267

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||ABI
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-10-29
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
Summary|crash with a cppunit test   |[9 Regression] crash with a
   |case (built by GCC 9) and   |cppunit test case (built by
   |cpptest (built with GCC 8)  |GCC 9) and cpptest (built
   ||with GCC 8)
 Ever confirmed|0   |1