From: Matthew Carter <m@ahungry.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 19799@debbugs.gnu.org
Subject: bug#19799: Tangentally related to eww-mode Invalid Date bug just filed
Date: Sun, 08 Feb 2015 15:25:23 -0500 [thread overview]
Message-ID: <87lhk8b170.fsf@ahungry.com> (raw)
In-Reply-To: <54D7B8F4.6090505@cs.ucla.edu> (Paul Eggert's message of "Sun, 08 Feb 2015 11:28:52 -0800")
Paul Eggert <eggert@cs.ucla.edu> writes:
>> Would it be better to rework #'date-to-time to handle future dates in a
>> more graceful manner on 32-bit machines, or to have eww-mode ignore
>> triggers that cause it to parse dates it cannot handle?
>
> There is a variant of date-to-time that refuses to throw an error on
> out-of-range dates, namely safe-date-to-time. But I'm still puzzled
> as to why you're getting this error. date-to-time is supposed to
> throw a "Specified time is not representable" for out-of-range dates,
> but for you it's throwing some other error. Can you debug why that is
> happening?
>
> What happens when you run the following in your *scratch* buffer?
>
> (date-to-time "Mon, 06 Mar 2130 20:55:03 GMT")
>
> On my platform (Fedora 21 x86) if I type C-j after that, the debugger
> is entered with this backtrace:
>
> Debugger entered--Lisp error: (error . "Specified time is not representable")
> signal(error "Specified time is not representable")
> apply(signal (error "Specified time is not representable"))
> (if (equal err overflow-error) (apply (quote signal) err) (condition-case err$
> (let ((overflow-error (quote (error "Specified time is not representable"))))$
> (condition-case err (apply (quote encode-time) (parse-time-string date)) (err$
> date-to-time("Mon, 06 Mar 2130 20:55:03 GMT")
> ...
>
> What happens on your platform?
>
> Also, what is your platform? What does (emacs-version) return, for starters?
>
This is on an i686 machine - the eval returns:
Debugger entered--Lisp error: (error "Invalid date: Mon, 06 Mar 2130 20:55:03 GMT")
signal(error ("Invalid date: Mon, 06 Mar 2130 20:55:03 GMT"))
error("Invalid date: %s" "Mon, 06 Mar 2130 20:55:03 GMT")
byte-code("\300\301\302\217\207" [nil (byte-code "\301\302\303\304^H!!\"\207" [date apply encode-time parse-time-string time$
date-to-time("Mon, 06 Mar 2130 20:55:03 GMT")
eval((date-to-time "Mon, 06 Mar 2130 20:55:03 GMT") nil)
eval-last-sexp-1(t)
eval-last-sexp(t)
eval-print-last-sexp(nil)
call-interactively(eval-print-last-sexp nil nil)
command-execute(eval-print-last-sexp)
The version is:
GNU Emacs 24.4.1 (i686-pc-linux-gnu, GTK+ Version 3.14.7) of 2015-01-17 on bisson
Anything up to 2038 will work without issue. I had read OpenBSD fixed
the 2038 date issue using 'long long int' instead of 'time_t' for dates
in the codebase on 32 bit machines.
I think eww-mode should not fail to load subsequent pages though, even
if a cookie date is bad (bad cookies should not halt further page
requests), so maybe eww-mode just needs to catch the thrown error?
--
Matthew Carter (m@ahungry.com)
http://ahungry.com
next prev parent reply other threads:[~2015-02-08 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 5:15 bug#19799: Tangentally related to eww-mode Invalid Date bug just filed Matthew Carter
2015-02-08 19:28 ` Paul Eggert
2015-02-08 20:25 ` Matthew Carter [this message]
2015-02-09 2:45 ` bug#19798: 24.4; eww-mode error in process sentinel 'Invalid date' when receiving a valid date Paul Eggert
2015-02-09 2:50 ` bug#19799: Tangentally related to eww-mode Invalid Date bug just filed Paul Eggert
2015-02-09 3:14 ` Matthew Carter
2015-02-09 6:29 ` bug#19798: " Paul Eggert
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=87lhk8b170.fsf@ahungry.com \
--to=m@ahungry.com \
--cc=19799@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/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.