svn commit: r334979 - head/sbin/dump
Rodney W. Grimes
freebsd at pdx.rh.CN85.dnsmgr.net
Sat Jun 16 15:35:31 UTC 2018
> 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 at freebsd.org
More information about the svn-src-head
mailing list