public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/19361] Invalid comparison functions
[not found] <bug-19361-4717@http.sourceware.org/bugzilla/>
@ 2020-04-07 12:40 ` ssbssa at sourceware dot org
2020-04-07 18:28 ` tromey at sourceware dot org
2020-04-07 20:06 ` tetra2005 at gmail dot com
2 siblings, 0 replies; 3+ messages in thread
From: ssbssa at sourceware dot org @ 2020-04-07 12:40 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=19361
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at sourceware dot org
--- Comment #2 from Hannes Domani <ssbssa at sourceware dot org> ---
Both functions were changed to std::sort, but I'm not sure if the symmetry
requirements were fixed with this.
compare_processes:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=b129dcac882da87767cb863ad8b2572f90e9e5bc
qsort_cmp:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=39ef2f6256737db92f5d60fa201fe0b301bb8100
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/19361] Invalid comparison functions
[not found] <bug-19361-4717@http.sourceware.org/bugzilla/>
2020-04-07 12:40 ` [Bug gdb/19361] Invalid comparison functions ssbssa at sourceware dot org
@ 2020-04-07 18:28 ` tromey at sourceware dot org
2020-04-07 20:06 ` tetra2005 at gmail dot com
2 siblings, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2020-04-07 18:28 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=19361
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
The linux-osdata.c code looks ok now.
It's hard to say if the objfiles.c code is totally correct or not.
Will std::sort compare an object with itself?
Anyway it would be fine to apply an updated version of that patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/19361] Invalid comparison functions
[not found] <bug-19361-4717@http.sourceware.org/bugzilla/>
2020-04-07 12:40 ` [Bug gdb/19361] Invalid comparison functions ssbssa at sourceware dot org
2020-04-07 18:28 ` tromey at sourceware dot org
@ 2020-04-07 20:06 ` tetra2005 at gmail dot com
2 siblings, 0 replies; 3+ messages in thread
From: tetra2005 at gmail dot com @ 2020-04-07 20:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=19361
--- Comment #4 from Yuri Gribov <tetra2005 at gmail dot com> ---
(In reply to Tom Tromey from comment #3)
> The linux-osdata.c code looks ok now.
Yes, looks good except maybe for ...
> Will std::sort compare an object with itself?
... as I've heard rumors that std::sort _can_ compare object to itself (never
seen a proof though).
> It's hard to say if the objfiles.c code is totally correct or not.
I think the code in objfiles.c is still violating ordering axioms. E.g. if
objfile1->separate_debug_objfile == objfile2
then sort_cmp(sect1, sect2) and sort_cmp(sect2, sect1) will both return false
which is a contradiction. Some implementations of sort return erratic results
in such circumstances.
Sadly I can't rerun my tool on gdb now as it's limited to qsort (std::sort
checking requires instrumentation in compiler...).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-07 20:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-19361-4717@http.sourceware.org/bugzilla/>
2020-04-07 12:40 ` [Bug gdb/19361] Invalid comparison functions ssbssa at sourceware dot org
2020-04-07 18:28 ` tromey at sourceware dot org
2020-04-07 20:06 ` tetra2005 at gmail dot com
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).