diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-08-04 14:26:35 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-08-04 18:22:02 +0300 |
commit | 26538c9bfc5fd726d625bef5fa3f08212d50173a (patch) | |
tree | be2e826b9842dd24c6953f9ad5a0dfcf3c3f7f26 /THANKS | |
parent | 8a834dfa1037758cb42123fd710048cebdc13e7b (diff) | |
download | tar-26538c9bfc5fd726d625bef5fa3f08212d50173a.tar.gz |
Reduce memory consuption when handling the -T option.
The commit cdb27293 made the -T option more flexible, but
incurred a very considerable memory overhead by storing
all file names in the argument array. In case of very
big file lists this caused tar to run out of memory. This
was reported by Christian Wetzel <wetzel@phoenix-pacs.de>
on March 14, 2013
(http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00018.html).
On the other hand, Michal Žeidl discovered that tar misfunctioned
when given empty file lists or lists with the trailing newline
misssing in the last entry. This was reported by Pavel Raiskup
on July 23
(http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00009.html and
msg00010.html).
This change fixes both issues.
* src/common.h (name_add_file,request_stdin): New prototype.
(more_options): New prototype.
* src/names.c (NELT_FILE): New entry type.
(name_elt) <file>: New union member.
(name_add_file): New function.
(read_name_from_file): New function, a rewrite of
the same function from tar.c
(read_next_name,copy_name): New static functions.
(name_next_elt): Handle NELT_FILE entries.
* src/tar.c (request_stdin): Make extern.
(read_name_from_file,add_file_id)
(update_argv): Removed.
(parse_opt): Change handling of the -T option.
(more_options): New function.
* tests/T-null.at: Rewrite test.
* tests/T-zfile.at: New file.
* tests/T-nonl.at: New file.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likewise.
* THANKS: Update.
Diffstat (limited to 'THANKS')
-rw-r--r-- | THANKS | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -91,6 +91,7 @@ Christian Kirsch ck@held.mind.de Christian Laubscher christian.laubscher@tiscalinet.ch Christian T. Dum ctd@mpe-garching.mpg.de Christian von Roques roques@pond.sub.org +Christian Wetzel wetzel@phoenix-pacs.de Christoph Litauer litauer@mailhost.uni-koblenz.de Christophe Colle colle@krtkg1.rug.ac.be Christophe Kalt Christophe.Kalt@kbcfp.com @@ -350,6 +351,7 @@ Michael P Urban urban@cobra.jpl.nasa.gov Michael Schmidt michael@muc.de Michael Schwingen m.schwingen@stochastik.rwth-aachen.de Michael Smolsky fnsiguc@astro.weizmann.ac.il +Michal Žejdl zejdl@suas.cz Mike Muuss mike@brl.mil Mike Nolan nolan@lpl.arizona.edu Mike Rogers mike@demon.net |