Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2007 18:00:45 GMT
From:      Remko Lodder <remko@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/108607: [PATCH] lib/libarchive core dumps on 6.2
Message-ID:  <200701311800.l0VI0jGD004548@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/108607; it has been noted by GNATS.

From: Remko Lodder <remko@FreeBSD.org>
To: Artis Caune <Artis.Caune@latnet.lv>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/108607: [PATCH] lib/libarchive core dumps on 6.2
Date: Wed, 31 Jan 2007 19:00:40 +0100

 Artis Caune wrote:
 After updating all boxes to 6.2, backup scripts don't work:
 > 
 > # tar -r -f /home/backup/pgsql.tar /home/backup/pgsql
 > INTERNAL ERROR: Function 'archive_read_next_header' invoked with archive structure in state 'new', should be in state 'header/data'
 > Segmentation fault: 11 (core dumped)
 > 
 >> How-To-Repeat:
 > # touch file.tar
 > # tar -r -f file.tar /COPYRIGHT
 > 
 >> Fix:
 > 
 > 
 > Patch attached with submission follows:
 > 
 > --- src/lib/libarchive/archive_read.c.orig	Tue Sep  5 08:23:51 2006
 > +++ src/lib/libarchive/archive_read.c	Wed Jan 31 17:23:46 2007
 > @@ -145,6 +145,7 @@
 >  	a->client_skipper = NULL;
 >  	a->client_closer = NULL;
 >  	a->client_data = NULL;
 > +	a->state = ARCHIVE_STATE_HEADER;
 >  
 >  	/* Open data source. */
 >  	if (client_opener != NULL) {
 > 
 As you can read with the -r option, it means append to an
 existing archive, the -c is being used to create a new archive;
 
 When i do that with
 
 # tar -cf /file.tar /etc
 
 I will get a /file.tar with the contents of /etc
 
 # tar -rf /file.tar /COPYRIGHT
 
 will add the COPYRIGHT file to the tarball.
 
 (# tar -r -f file.tar /COPYRIGHT
 tar: Removing leading '/' from member names)
 
 So, from my point of view you are using the wrong flags
 for the wrong kind of thing, i dont think setting the
 state hardcoded in the file is the idea, the state should
 be fetched from the file first.
 
 -- 
 Kind regards,
 
       Remko Lodder               ** remko@elvandar.org
       FreeBSD                    ** remko@FreeBSD.org
 
       /* Quis custodiet ipsos custodes */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701311800.l0VI0jGD004548>