public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94244] New: std::sort corrupts memory
@ 2020-03-20 22:34 markd at kermodei dot com
2020-03-20 23:05 ` [Bug libstdc++/94244] " pinskia at gcc dot gnu.org
2020-03-21 20:19 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: markd at kermodei dot com @ 2020-03-20 22:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94244
Bug ID: 94244
Summary: std::sort corrupts memory
Product: gcc
Version: 4.8.5
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: markd at kermodei dot com
Target Milestone: ---
Created attachment 48076
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48076&action=edit
program source, *.ii, *.s, and makefile
The attach program results in std::sort corrupting memory and SIGSEGVing.
I have had this happen with another program and was never able to find a
solution.
This does not fail on all platforms, however, it happens consistently on RedHat
version
I have access to:
Fails with:
- g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
- g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Works with:
- g++ (MacPorts gcc7 7.5.0_1) 7.5.0
- g++-mp-8 (MacPorts gcc8 8.3.0_5) 8.3.0
- Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/94244] std::sort corrupts memory
2020-03-20 22:34 [Bug c++/94244] New: std::sort corrupts memory markd at kermodei dot com
@ 2020-03-20 23:05 ` pinskia at gcc dot gnu.org
2020-03-21 20:19 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-03-20 23:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94244
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
your compare has an ordering issue.
That is a.tStart <= b.tStart
will cause to return true when a and b point to the same element.
See PR 553.
*** This bug has been marked as a duplicate of bug 553 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/94244] std::sort corrupts memory
2020-03-20 22:34 [Bug c++/94244] New: std::sort corrupts memory markd at kermodei dot com
2020-03-20 23:05 ` [Bug libstdc++/94244] " pinskia at gcc dot gnu.org
@ 2020-03-21 20:19 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-03-21 20:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94244
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
In other words, you have failed to meet the requirement that the comparison is
a strict weak ordering.
https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-21 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 22:34 [Bug c++/94244] New: std::sort corrupts memory markd at kermodei dot com
2020-03-20 23:05 ` [Bug libstdc++/94244] " pinskia at gcc dot gnu.org
2020-03-21 20:19 ` redi 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).