From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/77467 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.general Subject: Re: Debugger entered--Lisp error: (overflow-error "13419098521433281274") Date: Wed, 02 Mar 2011 21:36:23 +0100 Message-ID: <87oc5ti7js.fsf@member.fsf.org> References: <87lj0x4k59.fsf@fastmail.fm> <87lj0x72ce.fsf@member.fsf.org> <87aahdmg51.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1299098199 13014 80.91.229.12 (2 Mar 2011 20:36:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Mar 2011 20:36:39 +0000 (UTC) Cc: ding@gnus.org To: Ted Zlatanov Original-X-From: ding-owner+M25790@lists.math.uh.edu Wed Mar 02 21:36:34 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pusme-0006My-6Q for ding-account@gmane.org; Wed, 02 Mar 2011 21:36:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Pusmb-0008Dh-RD; Wed, 02 Mar 2011 14:36:29 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Pusma-0008DK-Ba for ding@lists.math.uh.edu; Wed, 02 Mar 2011 14:36:28 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PusmZ-0004iX-1A for ding@lists.math.uh.edu; Wed, 02 Mar 2011 14:36:28 -0600 Original-Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PusmY-0004gn-1z for ding@gnus.org; Wed, 02 Mar 2011 21:36:26 +0100 Original-Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 4E6F0203C9; Wed, 2 Mar 2011 15:36:25 -0500 (EST) Original-Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 02 Mar 2011 15:36:25 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:references:date:in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=Ykqo8MaAHMDySo7zv+c5w4XMJqo=; b=WbefDYSOp5OvF8cE0/fqSXcrJJ0yVPAFxynw0kMizCHuePEhhJ4Dto1jf1UwKLwzUEymZi11By9MleY5wP6KUclYZD7G8dm89VwwhzhwBL52kbJ76bTj3abFuGv4uGQqtEz3x06a0JCnv92Ti+MuJ1GsOEGKo3nIzjMqht/EtUc= X-Sasl-enc: Yw1PwupVUsy3c+kccU3w4J4QQaZE72XTYZ4zZzFK6VNz 1299098184 Original-Received: from thinkpad (95-88-32-105-dynip.superkabel.de [95.88.32.105]) by mail.messagingengine.com (Postfix) with ESMTPA id 7732B44376A; Wed, 2 Mar 2011 15:36:24 -0500 (EST) In-Reply-To: <87aahdmg51.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 02 Mar 2011 14:17:14 -0600") User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:77467 Archived-At: Ted Zlatanov writes: Hi Ted, > TH> Here's the offending code: > TH> (while (re-search-forward "^\\* [0-9]+ FETCH " start t) > TH> (setq elems (read (current-buffer))) > TH> (push (cons (cadr (memq 'UID elems)) > TH> (cadr (memq 'FLAGS elems))) > TH> articles)) > > TH> Of course, it is convenient to `read' the complete list in lines like > > TH> * 2971 FETCH (FLAGS (%Recent) UID 12509 MODSEQ (13419098521433281274)) > > TH> but it fails for large numbers. And if the RFC says those are 64bit > TH> unsigned ints, well, then Gnus has to handle those. > > Gnus has no way to do it when Emacs can't. The calc package has some > facilities for big numbers but yeah, (read) will not DTRT with input > like that. I've asked for it on emacs-devel. > > To fix it now, I would replace such large numbers with a truncated > version, which can be done safely with a regex before the reader sees > the input. But I'll let Lars decide, he knows that code best. But that huge number is not used by gnus, anyway. It is `read' but only the UID and FLAGS values are saved. So IMHO, the proper fix is to put a condition-case around the `read' that picks the UID and FLAGS with string-matching if an overflow-error occurs. Bye, Tassilo -- Sent from my Emacs