Lasse Kliemann | 23 Apr 2009 14:03

diff segfaults with 2009-01-05

Using schily-dist pre5 and gcc 4.1.2 on Linux 2.6.27.21.

$ smake COPTX=-O0 CFLAGS=-O0

$ ./star/OBJ/i686-linux-cc/star -version
star: star 1.5 (i686-pc-linux-gnu)
Options: find fflags remote

$ ./star/OBJ/i686-linux-cc/star -c -diff -C a b c
Segmentation fault

It's the same with several other recent versions.

The error ist _not_ present in 2008-11-02.
It _is_ present in 2009-01-05.

So it looks like it crept in between 2008-11-02 and 2009-01-05.
_______________________________________________
Star-users mailing list
Star-users <at> lists.berlios.de
https://lists.berlios.de/mailman/listinfo/star-users
Joerg Schilling | 23 Apr 2009 14:25
Picon
Favicon

Re: diff segfaults with 2009-01-05

Lasse Kliemann <lasse-list-star-users <at> mail.plastictree.net> wrote:

> Using schily-dist pre5 and gcc 4.1.2 on Linux 2.6.27.21.
>
> $ smake COPTX=-O0 CFLAGS=-O0
>
> $ ./star/OBJ/i686-linux-cc/star -version
> star: star 1.5 (i686-pc-linux-gnu)
> Options: find fflags remote
>
> $ ./star/OBJ/i686-linux-cc/star -c -diff -C a b c
> Segmentation fault
>
> It's the same with several other recent versions.

Thank you for the report, please apply this patch:

------- buffer.c -------
--- /tmp/sccs.ziaqjg	Do Apr 23 14:24:48 2009
+++ buffer.c	Do Apr 23 14:13:44 2009
 <at>  <at>  -319,7 +319,7  <at>  <at> 
 			}
 		}
 	}
-	if (isatty(fdown(tarf)))
+	if (tarf != (FILE *)NULL && isatty(fdown(tarf)))
 		comerrno(EX_BAD, "Archive cannot be a tty.\n");
 	if (!isremote && (!nullout || (uflag || rflag)) &&
 	    tarf != (FILE *)NULL) {

(Continue reading)

Lasse Kliemann | 23 Apr 2009 20:02

Re: diff segfaults with 2009-01-05

* Message by -Joerg Schilling- from Thu 2009-04-23:
> Lasse Kliemann <lasse-list-star-users <at> mail.plastictree.net> wrote:
> 
> > Using schily-dist pre5 and gcc 4.1.2 on Linux 2.6.27.21.
> >
> > $ smake COPTX=-O0 CFLAGS=-O0
> >
> > $ ./star/OBJ/i686-linux-cc/star -version
> > star: star 1.5 (i686-pc-linux-gnu)
> > Options: find fflags remote
> >
> > $ ./star/OBJ/i686-linux-cc/star -c -diff -C a b c
> > Segmentation fault
> >
> > It's the same with several other recent versions.
> 
> Thank you for the report, please apply this patch:
> 
> 
> ------- buffer.c -------
> --- /tmp/sccs.ziaqjg	Do Apr 23 14:24:48 2009
> +++ buffer.c	Do Apr 23 14:13:44 2009
>  <at>  <at>  -319,7 +319,7  <at>  <at> 
>  			}
>  		}
>  	}
> -	if (isatty(fdown(tarf)))
> +	if (tarf != (FILE *)NULL && isatty(fdown(tarf)))
>  		comerrno(EX_BAD, "Archive cannot be a tty.\n");
>  	if (!isremote && (!nullout || (uflag || rflag)) &&
(Continue reading)


Gmane