pointer comparison breaks Solaris' qsort

Felix Lee felix.1@canids.net
Tue Jun 8 11:18:00 GMT 2004


Jakub Jelinek <jakub@redhat.com>:
> That is a Solaris bug then.
> http://www.opengroup.org/onlinepubs/009695399/functions/qsort.html

but that document also requires the comparison function be
consistent.  it's not clear to me that qsort behavior is defined
if you give it a comparison function that isn't a total ordering.
(I remember 4.2 BSD's qsort also crashed if you used rand() as a
comparison function.)

whether or not there's a bug in qsort, elflink is using qsort in
a buggy way, so it should be fixed.
--



More information about the Binutils mailing list