Gnus development mailing list
 help / color / mirror / Atom feed
From: Steven L Baur <steve@xemacs.org>
Subject: Re: gnus-change-server problems?
Date: 06 Jun 1997 14:36:43 -0700	[thread overview]
Message-ID: <m2g1uvifbo.fsf@altair.xemacs.org> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "06 Jun 1997 19:44:17 +0200"

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Chris Halverson <cdh@CompleteIS.com> writes:
>> > (sort '(nil) '<)
>> > 
>> > Put point after the closing paren.  Press `C-x C-e'.  Does your XEmacs
>> > say "beep" or "(nil)"?
>> 
>> (nil)

> But then I don't understand the backtrace you posted:

> Signaling: (wrong-type-argument number-or-marker-p nil)
>   <(nil nil)
>   sort((nil) <)
>   gnus-move-group-to-server(("alt.collecting.pens-pencils" 3 ((1 . 9531)) ((save 9486) (expire 8963 ... 9126 9130 9133 9142 9342 ... ...) (reply 9300 9486 9513))) (nntp "news.mr.net") (nntp "news.uslink.net"))

> Am I misreading this backtrace?  Doesn't it say that `(sort '(nil) '<)' 
> bugs out?

That's how I read it too.  On the other hand, the sort subr hasn't
been changed in a long time (the code dates from the Lucid days), and
it should be impossible to hit any code where a comparison is done
when it is handed a nil list.  (< nil nil) definitely produces the
same wrong-type-argument error message shown in the backtrace.

Chris, can you possibly manage to get a C backtrace of this error?

Note that the code that catches degenerate lists in XEmacs' list_sort
is identical to the in-line code in Emacs 19.34+ sort.

DEFUN ("sort", Fsort, 2, 2, 0, /*
Sort LIST, stably, comparing elements using PREDICATE.
Returns the sorted list.  LIST is modified by side effects.
PREDICATE is called with two elements of LIST, and should return T
if the first element is \"less\" than the second.
*/
       (list, pred))
{
  return list_sort (list, pred, merge_pred_function);
}

Lisp_Object
list_sort (Lisp_Object list,
           Lisp_Object lisp_arg, 
           int (*pred_fn) (Lisp_Object, Lisp_Object,
                           Lisp_Object lisp_arg))
{
  Lisp_Object front, back;
  Lisp_Object len, tem;
  struct gcpro gcpro1, gcpro2, gcpro3;
  int length;

  front = list;
  len = Flength (list);
  length = XINT (len);
  if (length < 2)
    return list;            <====== A nil list should be caught here.
  ...
-- 
steve@calag.com baur
Unsolicited commercial e-mail will be billed at $250/message.


      reply	other threads:[~1997-06-06 21:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-30 19:09 Chris Halverson
1997-05-31 11:40 ` Lars Magne Ingebrigtsen
1997-06-02 10:46   ` Steven L Baur
1997-06-02 14:47     ` Hrvoje Niksic
1997-06-02 15:07     ` Chris Halverson
1997-06-06  3:26       ` Lars Magne Ingebrigtsen
1997-06-06 14:34         ` Chris Halverson
1997-06-06 17:44           ` Lars Magne Ingebrigtsen
1997-06-06 21:36             ` Steven L Baur [this message]

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=m2g1uvifbo.fsf@altair.xemacs.org \
    --to=steve@xemacs.org \
    /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.
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 NNTP newsgroup(s).