Question about tar v1.28

Douglas Coup dacoup2@yahoo.com
Tue Mar 8 15:43:00 GMT 2016


Hello Cygwin community. 

I'm observing some unusual behavior with tar v1.28, running as part of 
32-bit Cygwin on a Windows 10 machine. 

It's probably best if I just walk through a couple of steps to demonstrate. 

$ tar cvf dac.tar * 
file1.txt 
file2.txt 
HelloWorld.c 

So I can create a .tar file with three text files in it.  The first two 
are empty, created with the "touch" command. 

$ tar tf dac.tar 
file1.txt 
file2.txt 
HelloWorld.c 

Displaying the contents of this .tar file works fine. 

$ gcc -o HelloWorld HelloWorld.c 
$ ls 
dac.tar  file1.txt  file2.txt  HelloWorld.c  HelloWorld.exe 
$ rm dac.tar 
$ tar cvf dac.tar * 
file1.txt 
file2.txt 
HelloWorld.c 
HelloWorld.exe 

So I can apparently create a .tar file with the three text files and the 
.exe produced by compiling the C program. 

$ tar tf dac.tar 
file1.txt 
file2.txt 
HelloWorld.c 
tar: Skipping to next header 
tar: A lone zero block at 12 
tar: Exiting with failure status due to previous errors 

But when I try to view the contents of this .tar file, tar seems to have 
trouble with the .exe file. 

$ mv HelloWorld.exe dac.exe 
$ rm dac.tar 
$ tar cvf dac.tar * 
dac.exe 
file1.txt 
file2.txt 
HelloWorld.c 
$ tar tf dac.tar 
dac.exe 
tar: Skipping to next header 
tar: Exiting with failure status due to previous errors 


If I rename HelloWorld.exe to a name that collates before file1.txt, 
then "tar tf" stops at the .exe file. 

The behavior is the same if I try to extract the archive with "tar 
xvf".  In that case a dac.exe does get extracted, but trying to run it 
gets a segmentation fault (the program just prints "Hello world"). 

$ tar --version 
tar (GNU tar) 1.28 
Packaged by Cygwin (1.28-1) 
Copyright (C) 2014 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law. 

Written by John Gilmore and Jay Fenlason. 


A similar sequence on a Windows 8.1 machine running tar v1.27.1 does not 
produce this problem. 

Is there an additional option that needs to be specified for tar v1.28 
if an archive includes files like .exe files? 

I can try downgrading to v1.27, but I thought I'd see if anyone has any 
insights first. 


The output of a cygcheck command is attached.

Note that I do subscribe to the mailing list under a different email address.  I tried to send this message using that address, but I got back an error 552 (span score exceeded threshold)

Regards, 


Douglas Coup 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 31246 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160308/6349b446/attachment.obj>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list