Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jun 2018 08:35:28 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net>
To:        Warner Losh <imp@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r334979 - head/sbin/dump
Message-ID:  <201806161535.w5GFZSOG056254@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <201806112038.w5BKcQ7T077645@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Author: imp
> Date: Mon Jun 11 20:38:26 2018
> New Revision: 334979
> URL: https://svnweb.freebsd.org/changeset/base/334979
> 
> Log:
>   Fix a bug in the counting of blks.
>   
>   We shouldn't count the bytes set in c_addr for TS_CLRI and TS_BITS
>   nodes. Those block overload c_count to communicate how many blocks
>   follow, not now many c_addr spaces are used. Dump would dump core
>   (now) because memory layout moved around and we'd access elements past
>   the end to make a count.
>   
>   Reviewed by: kib@

Warner,
	I have finally confirmed that I get the SEGV using dump.r334814,
and that I can not make dump.r335244 SEGV.

Thanks for fixing this!
Rod

> Modified:
>   head/sbin/dump/tape.c
> 
> Modified: head/sbin/dump/tape.c
> ==============================================================================
> --- head/sbin/dump/tape.c	Mon Jun 11 20:26:10 2018	(r334978)
> +++ head/sbin/dump/tape.c	Mon Jun 11 20:38:26 2018	(r334979)
> @@ -279,7 +279,8 @@ flushtape(void)
>  	}
>  
>  	blks = 0;
> -	if (spcl.c_type != TS_END) {
> +	if (spcl.c_type != TS_END && spcl.c_type != TS_CLRI &&
> +	    spcl.c_type != TS_BITS) {
>  		assert(spcl.c_count <= TP_NINDIR);
>  		for (i = 0; i < spcl.c_count; i++)
>  			if (spcl.c_addr[i] != 0)
> 
> 

-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806161535.w5GFZSOG056254>