GNU bug report logs -
#18354
24.4.50; vector sorting on darwin broken
Previous Next
Reported by: Jordon Biondo <jordonbiondo <at> gmail.com>
Date: Fri, 29 Aug 2014 15:36:01 UTC
Severity: normal
Found in version 24.4.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18354 in the body.
You can then email your comments to 18354 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18354
; Package
emacs
.
(Fri, 29 Aug 2014 15:36:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jordon Biondo <jordonbiondo <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 29 Aug 2014 15:36:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Sorting vectors on a DARWIN system now segfaults due to a difference in
the order in which arguments are passed. I believe this is also the case
on bsd and others.
(sort [1 4 2] '<) ;; => seg fault
I have included my fix for my DARWIN system. I cannot test
on bsd and other. So I think it needs to be hashed out more for full
portability, but this works for my single use case.
Thank You.
*** fns.c 2014-08-29 11:02:30.000000000 -0400
--- newfns.c 2014-08-29 11:02:25.000000000 -0400
*************** static Lisp_Object sort_vector_predicate
*** 1885,1891 ****
static int
#ifdef HAVE_QSORT_R
! sort_vector_compare (const void *p, const void *q, void *arg)
#else
sort_vector_compare (const void *p, const void *q)
#endif /* HAVE_QSORT_R */
--- 1885,1895 ----
static int
#ifdef HAVE_QSORT_R
! #ifdef DARWIN_OS
! sort_vector_compare (void *arg, const void *p, const void *q)
! #else
! sort_vector_compare (const void *p, const void *q, const void *arg)
! #endif
#else
sort_vector_compare (const void *p, const void *q)
#endif /* HAVE_QSORT_R */
*************** sort_vector (Lisp_Object vector, Lisp_Ob
*** 1928,1934 ****
--- 1932,1942 ----
/* Setup predicate and sort. */
#ifdef HAVE_QSORT_R
+ #ifdef DARWIN_OS
+ qsort_r (v, len, word_size, (void *) &predicate, sort_vector_compare);
+ #else
qsort_r (v, len, word_size, sort_vector_compare, (void *) &predicate);
+ #endif
#else
sort_vector_predicate = predicate;
qsort (v, len, word_size, sort_vector_compare);
In GNU Emacs 24.4.50.28 (x86_64-apple-darwin13.2.0, NS appkit-1265.20 Version 10.9.3 (Build 13D65))
of 2014-08-29 on kerbin
Configured using:
`configure --with-ns'
Configured features:
IMAGEMAGICK ACL LIBXML2 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
ESC [ > 0 ; 9 5 ; 0 c ESC x r e p o r TAB RET
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
/Users/jordon/src/emacs/lisp/leim/quail/tibetan hides /Users/jordon/src/emacs/lisp/language/tibetan
/Users/jordon/src/emacs/lisp/leim/quail/thai hides /Users/jordon/src/emacs/lisp/language/thai
/Users/jordon/src/emacs/lisp/leim/quail/slovak hides /Users/jordon/src/emacs/lisp/language/slovak
/Users/jordon/src/emacs/lisp/leim/quail/lao hides /Users/jordon/src/emacs/lisp/language/lao
/Users/jordon/src/emacs/lisp/leim/quail/japanese hides /Users/jordon/src/emacs/lisp/language/japanese
/Users/jordon/src/emacs/lisp/leim/quail/indian hides /Users/jordon/src/emacs/lisp/language/indian
/Users/jordon/src/emacs/lisp/leim/quail/hebrew hides /Users/jordon/src/emacs/lisp/language/hebrew
/Users/jordon/src/emacs/lisp/leim/quail/greek hides /Users/jordon/src/emacs/lisp/language/greek
/Users/jordon/src/emacs/lisp/leim/quail/georgian hides /Users/jordon/src/emacs/lisp/language/georgian
/Users/jordon/src/emacs/lisp/leim/quail/ethiopic hides /Users/jordon/src/emacs/lisp/language/ethiopic
/Users/jordon/src/emacs/lisp/leim/quail/czech hides /Users/jordon/src/emacs/lisp/language/czech
/Users/jordon/src/emacs/lisp/leim/quail/cyrillic hides /Users/jordon/src/emacs/lisp/language/cyrillic
Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils xterm time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)
Memory information:
((conses 16 82723 5894)
(symbols 48 17976 0)
(miscs 40 33 99)
(strings 32 11516 4325)
(string-bytes 1 293393)
(vectors 16 7607)
(vector-slots 8 343947 26707)
(floats 8 64 289)
(intervals 56 154 0)
(buffers 976 11))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18354
; Package
emacs
.
(Fri, 29 Aug 2014 16:26:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 18354 <at> debbugs.gnu.org (full text, mbox):
On 08/29/2014 07:24 PM, Jordon Biondo wrote:
> Sorting vectors on a DARWIN system now segfaults due to a difference in
> the order in which arguments are passed. I believe this is also the case
> on bsd and others.
Hopefully should be fixed in r117769. Verified on FreeBSD 10.0.
Someday I'll think about wrapping all of that mess in sysdep.c.
Dmitry
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18354
; Package
emacs
.
(Fri, 29 Aug 2014 16:48:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 18354 <at> debbugs.gnu.org (full text, mbox):
On Aug 29, 2014, at 12:24 PM, Dmitry Antipov <dmantipov <at> yandex.ru> wrote:
> Hopefully should be fixed in r117769. Verified on FreeBSD 10.0.
>
> Someday I'll think about wrapping all of that mess in sysdep.c.
Great, thank you, tests are passing on darwin system.
Jordon
bug closed, send any further explanations to
18354 <at> debbugs.gnu.org and Jordon Biondo <jordonbiondo <at> gmail.com>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 29 Aug 2014 19:17:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 27 Sep 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 355 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.