gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] [BUG] serious bug in vu_write_retry?


From: Bug Goo
Subject: Re: [Gnu-arch-users] [BUG] serious bug in vu_write_retry?
Date: Sat, 31 Jul 2004 21:50:03 +0000

Created as bug 177

On Thu Jul  8 20:18:25 2004, Jeremy Shaw wrote:
> Hello,
> 
> Some people at work were attempting to call tla from perl using popen3
> and complained of corrupt output when calling 'tla cat-archive-log' on
> large log files (> 200 lines).
> 
> When calling cat-archive-log, it would start printing out the log,
> then all of a sudden it would output a null followed by what appears
> to be some random data in memory. After printing a bunch of random
> data, it would then print the archive-log correctly, starting from the
> beginning.
> 
> They said that the following patch fixed the problem for them (and
> passes all existing unit tests):
> 
> --- orig/vu/vu.c
> +++ mod/vu/vu.c
> @@ -1241,8 +1241,11 @@
>         return amt;
>        if (amt == count)
>         return orig_count;
> -      count -= amt;
> -      buf += amt;
> +      if(amt > 0 )
> +        {
> +          count -= amt;
> +          buf += amt;
> +        }
>      }
>  }
> 
> Can anyone else comment on the validity of this bug/patch? In the
> unpatched code, it looks like when vu_write returns -1 and (*errn ==
> EAGAIN || *errn == EINTR), count will be incremented by 1 and bug will
> be decremented by 1.
> 
> Jeremy Shaw.
> 
> 
> _______________________________________________
> Gnu-arch-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnu-arch-users
> 
> GNU arch home page:
> http://savannah.gnu.org/projects/gnu-arch/
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]