Hello,
I discovered this recently. It it is always reproducible for me on
CentOS 6.4, Fedora 14 - 19, Ubuntu 12.04 (versions 1.23 and 1.26).
CentOS 4 and 5 are ok.
cd /tmp; > empty; echo . > valid; tar cf /dev/null -T empty -T valid
Segmentation fault (core dumped)
Below is ABRT report from Fedora 14:
[Thread debugging using libthread_db enabled]
Core was generated by `tar cf /dev/null -T empty -T valid'.
Program terminated with signal 11, Segmentation fault.
#0 0x0808b3da in _getopt_internal_r (argc=9, argv=0x8652f88,
optstring=0x8652d1c
"-txcdruASGg:nWkUOmpsf:0123456789ML:F:b:iBH:V:aI:jzZJC:T:X:PhK:N:vlRwo?V",
longopts=0x865214c, longind=0x0, long_only=0, d=0xbff7d8a8,
posixly_correct=0) at getopt.c:421
421 getopt.c: No such file or directory.
in getopt.c
Thread 1 (Thread 0xb785f720 (LWP 27502)):
#0 0x0808b3da in _getopt_internal_r (argc=9, argv=0x8652f88,
optstring=0x8652d1c
"-txcdruASGg:nWkUOmpsf:0123456789ML:F:b:iBH:V:aI:jzZJC:T:X:PhK:N:vlRwo?V",
longopts=0x865214c, longind=0x0, long_only=0, d=0xbff7d8a8,
posixly_correct=0) at getopt.c:421
__s1 = 0x0
__result = <value optimized out>
__s2_len = 2
print_errors = 1
#1 0x080788f5 in _getopt_long_r (argc=9, argv=0x8652f88,
options=0x8652d1c
"-txcdruASGg:nWkUOmpsf:0123456789ML:F:b:iBH:V:aI:jzZJC:T:X:PhK:N:vlRwo?V",
long_options=0x865214c, opt_index=0x0, d=0xbff7d8a8) at getopt1.c:54
No locals.
#2 0x08073258 in parser_parse_next (argp=<value optimized out>, argc=8,
argv=0x8652068, flags=8, end_index=0xbff7d9d0, input=0xbff7d9ac) at
argp-parse.c:803
opt = <value optimized out>
err = 0
#3 argp_parse (argp=<value optimized out>, argc=8, argv=0x8652068,
flags=8, end_index=0xbff7d9d0, input=0xbff7d9ac) at argp-parse.c:925
err = <value optimized out>
parser = {argp = 0xbff7d7f0, short_opts = 0x8652d1c
"-txcdruASGg:nWkUOmpsf:0123456789ML:F:b:iBH:V:aI:jzZJC:T:X:PhK:N:vlRwo?V",
long_opts = 0x865214c, opt_data = {rpl_optind = 8, rpl_opterr = 1,
rpl_optopt = -1, rpl_optarg = 0x0, __initialized = 1, __nextchar = 0x0,
__ordering = RETURN_IN_ORDER, __posixly_correct = 0, __first_nonopt = 1,
__last_nonopt = 1}, groups = 0x86520b0, egroup = 0x865211c, child_inputs
= 0x8652140, try_getopt = 1, state = {root_argp = 0xbff7d7f0, argc = 9,
argv = 0x8652f88, next = 8, flags = 8, arg_num = 0, quoted = 0, input =
0xbff7d9ac, child_inputs = 0x0, hook = 0x0, name = 0xbff7f62b "tar",
err_stream = 0x2f7580, out_stream = 0x2f74e0, pstate = 0xbff7d89c},
storage = 0x86520b0}
arg_ebadkey = 0
#4 0x08069dd6 in decode_options (argc=7, argv=0xbff7daa4) at tar.c:2347
idx = <value optimized out>
args = {textual_date = 0x0, wildcards = default_wildcards,
matching_flags = 0, include_anchored = 1073741824, o_option = false,
pax_option = false, backup_suffix_string = 0x0, version_control_string =
0x0, input_files = false, compress_autodetect = 0}
#5 main (argc=7, argv=0xbff7daa4) at tar.c:2654
No locals.
--
Ing. Michal Žejdl
Sokolovská uhelná, právní nástupce, a.s.