From: Paul Eggert <eggert@cs.ucla.edu>
To: 18361@debbugs.gnu.org, dmantipov@yandex.ru
Subject: bug#18361: New 'sort' implementation can crash Emacs
Date: Fri, 29 Aug 2014 14:24:53 -0700 [thread overview]
Message-ID: <5400EFA5.6090902@cs.ucla.edu> (raw)
The new implementation of 'sort' in the trunk invokes qsort (or
qsort_r), but these functions have undefined behavior if the comparison
function is ill-behaved. Since the comparison predicate is
user-defined, this means a bad user-supplied comparison function could
crash Emacs.
One possible fix would be to build on the proposed patch in Bug#18360,
except to change Emacs to always define its own qsort_r substitute, one
that is known to produce some permutation of the input without crashing
even if the comparison function is ill-behaved.
next reply other threads:[~2014-08-29 21:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 21:24 Paul Eggert [this message]
2014-08-29 22:47 ` bug#18361: New 'sort' implementation can crash Emacs Dmitry Antipov
2014-08-29 23:07 ` Paul Eggert
2014-08-30 5:07 ` Dmitry Antipov
2014-08-30 5:22 ` Paul Eggert
2014-08-30 6:55 ` Dmitry Antipov
2014-08-30 13:44 ` Paul Eggert
2014-08-30 23:05 ` Paul Eggert
2014-08-31 2:50 ` Eli Zaretskii
2014-08-31 4:46 ` Paul Eggert
2014-08-31 15:20 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5400EFA5.6090902@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=18361@debbugs.gnu.org \
--cc=dmantipov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.