bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#258: marked as done ([22.2]: visiting boost_1_35_0.tar.bz2 causes a


From: Emacs bug Tracking System
Subject: bug#258: marked as done ([22.2]: visiting boost_1_35_0.tar.bz2 causes an error)
Date: Sun, 25 May 2008 06:55:05 -0700

Your message dated Sun, 25 May 2008 09:49:29 -0400
with message-id <address@hidden>
and subject line Re: bug#258: [22.2]: visiting boost_1_35_0.tar.bz2 causes an 
error
has caused the Emacs bug report #258,
regarding [22.2]: visiting boost_1_35_0.tar.bz2 causes an error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact address@hidden
immediately.)


-- 
258: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=258
Emacs Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [22.2]: visiting boost_1_35_0.tar.bz2 causes an error Date: Fri, 16 May 2008 11:51:48 +0100

In GNU Emacs 22.2.1 (sparc-sun-solaris2.8, Motif Version 2.1.0)
 of 2008-03-28 on risksun2
Windowing system distributor `Hummingbird Ltd.', version 11.0.100015
configured using `configure  '--x-includes=/usr/openwin/include:/usr/dt/include:/usr/local/include:/usr/local/X11/include' '--x-libraries=/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/X11/lib' '--with-x-toolkit=motif''

This report is going to be annoying, because http://downloads.sourceforge.net/boost/boost_1_35_0.tar.bz2?modtime=1206795398&big_mirror=0 is a 22M file.  Sorry.  This also applies to 22.1.

If I download the file, then visiting it under emacs -Q gives me:

Debugger entered--Lisp error: (args-out-of-range -256589311 -256588799)
  buffer-substring(-256589311 -256588799)
  (tar-header-block-tokenize (buffer-substring pos (+ pos 512)))
  (setq tokens (tar-header-block-tokenize (buffer-substring pos ...)))
  (eq (quote empty-tar-block) (setq tokens (tar-header-block-tokenize ...)))
  (not (eq (quote empty-tar-block) (setq tokens ...)))
  (and (<= (+ pos 512) (point-max)) (not (eq ... ...)))
  (while (and (<= ... ...) (not ...)) (setq pos (+ pos 512)) (progress-reporter-update progress-reporter pos) (if (memq ... ...) (setq pos ...)) (let (...) (if ... ...) (push ... result) (and ... ... ...)))

  (let* ((result ...) (pos ...) (progress-reporter ...) tokens) (while (and ... ...) (setq pos ...) (progress-reporter-update progress-reporter pos) (if ... ...) (let ... ... ... ...)) (make-local-variable (quote tar-parse-info)) (setq tar-parse-info (nreverse result)) (if (eq tokens ...) (progress-reporter-done progress-reporter) (message "Warning: premature EOF parsing tar file")))

  (let ((modified ...)) (set-buffer-multibyte nil) (let* (... ... ... tokens) (while ... ... ... ... ...) (make-local-variable ...) (setq tar-parse-info ...) (if ... ... ...)) (set-buffer-multibyte default-enable-multibyte-characters) (goto-char (point-min)) (let (...) (let ... ...) (narrow-to-region ... ...) (set ... ...) (goto-char ...) (restore-buffer-modified-p modified)))

  tar-summarize-buffer()
  tar-mode()
  set-auto-mode-0(tar-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer boost_1_35_0.tar.bz2> "~/ftp/boost_1_35_0.tar.bz2" nil nil "~/ftp/boost_1_35_0.tar.bz2" (1855815 71344173))

  find-file-noselect("/homedev/marshals/ftp/boost_1_35_0.tar.bz2" nil nil nil)
  find-file("/homedev/marshals/ftp/boost_1_35_0.tar.bz2")
  dired-advertised-find-file()
  call-interactively(dired-advertised-find-file)

The transition of pos to a negative value happens here in tar-summarize-buffer:

          (and (null (tar-header-link-type tokens))
               (> size 0)
               (setq pos
                     (+ pos 512 (ash (ash (1- size) -9) 9)) ; this works
                                        ;(+ pos (+ size (- 512 (rem (1- size) 512)))) ; this doesn't
                     ))

After many iterations of the enclosing loop, but before the above form, pos=49390081 and size=230891239. 
After the above form, pos=-256589311.

The dubious value of size has come from this value of tokens in the enclosing loop:

["boost_1_35_0/doc/html/boost/xpressive/op/insert/result_This(Cont,It,Size,Value),typename disable_if" 17363925 16815366 6377612 230891239 (1040640 53316) 548 nil "" nil nil nil 0 0]

If it is any help, the value of tokens in the previous iteration of the loop is:

[././@LongLink 0 0 0 151 (0 0) 4530 28  t  root 0 0]

If it is any help, there are no files of size 230891239 in the tar.
Solaris "tar -tf" does list many @LongLink files, whereas GNU "tar -tf" does not. 
Solaris tar extracts a file named "boost_1_35_0/doc/html/boost/xpressive/op/insert/result_This(Cont,It,Value),typename disable_if_ mpl_", whereas GNU tar extracts it as "boost_1_35_0/doc/html/boost/xpressive/op/insert/result_This(Cont,It,Value),typename disable_if_ mpl__or__ is_integral_ UNCVREF(It)_,is_same_ UNCVREF(It),UNCVREF(Value)_ _ ___type__id1001524.html", ie, Solaris tar truncates the file name (not file contents).  Emacs tar-mode apparently truncates the file name further.

So it is an "unusual" tar.  There is no difference between the download site's gzip and bzip tars.

I'm guessing that it is a valid tar though.  Emacs should be able to parse it or fail gracefully.

Simon.



"Misys" is the trade name for Misys plc (registered in England and Wales). Registration Number: 01360027. Registered office: Burleigh House, Chapel Oak, Salford Priors, Evesham WR11 8SP. For a list of Misys group operating companies please go to http://www.misys.com/html/about_us/group_operating_companies/. This email and any attachments have been scanned for known viruses using multiple scanners.
 
We believe that this email and any attachments are virus free, however the recipient must take full responsibility for virus checking. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and Misys plc. Please refer to the executed contract between you and the relevant member of the Misys group for the identity of the contracting party with which you are dealing. 

   


--- End Message ---
--- Begin Message --- Subject: Re: bug#258: [22.2]: visiting boost_1_35_0.tar.bz2 causes an error Date: Sun, 25 May 2008 09:49:29 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
I've just installed the patch belwo into the 22 branch.
It seems to fix this problem,


        Stefan


--- tar-mode.el.~1.108.2.5.~    2008-01-31 22:09:37.000000000 -0500
+++ tar-mode.el 2008-05-25 09:47:33.000000000 -0400
@@ -421,6 +421,16 @@
                                  (tar-header-block-tokenize
                                   (buffer-substring pos (+ pos 512)))))))
         (setq pos (+ pos 512))
+        (when (equal (tar-header-name tokens) "././@LongLink")
+          ;; This is a GNU Tar long-file-name header.
+          (let* ((size (tar-header-size tokens))
+                 ;; -1 so as to strip the terminating 0 byte.
+                 (name (buffer-substring pos (+ pos size -1))))
+            (setq pos (+ pos (ash (ash (+ 511 size) -9) 9)))
+            (setq tokens (tar-header-block-tokenize
+                          (buffer-substring pos (+ pos 512))))
+            (tar-setf (tar-header-name tokens) name)
+            (setq pos (+ pos 512))))
         (progress-reporter-update progress-reporter pos)
         (if (memq (tar-header-link-type tokens) '(20 55))
             ;; Foo.  There's an extra empty block after these.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]