On 10/11/11 05:16, Maciej K. wrote: > I encounter problem adding directory to archive with tar, version 1.26 on > FreeBSD7/amd64: > > $ gtar --create --file=test.tar test > > gtar: test/: Cannot savedir: Invalid argument > Segmentation fault (core dumped) > > Adding a single file to archive works fine as well as running the same > command on 32-bit machine. > > Some output from ktrace/kdump: > > 33156 gtar CALL getdirentries(0,0,0,0x710068) > 33156 gtar RET getdirentries -1 errno 22 Invalid argument
Could be anything. My guess is that it's a C library bug, as those arguments to getdirentries look bogus. Perhaps fdopendir doesn't work properly? You might want to look into it further, with a debugger. Also, please see the fdopendir bug in FreeBSD 8 that is documented in <http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00052.html>. Presumably the same bug is in FreeBSD 7. Is fdopendir declared on your platform? If not, perhaps tar should not use fdopendir when it's not declared.
