Fix a crash with invalid PCOMPRESS_CHUNK_HASH_GLOBAL.
Update testcase to correctly detect core files.
This commit is contained in:
parent
ddaa3b6b6d
commit
e9ce7a5ed2
2 changed files with 8 additions and 1 deletions
|
@ -228,7 +228,7 @@ create_dedupe_context(uint64_t chunksize, uint64_t real_chunksize, int rab_blk_s
|
||||||
if (get_checksum_props(ck, &chunk_cksum, &cksum_bytes, &mac_bytes, 1) != 0 ||
|
if (get_checksum_props(ck, &chunk_cksum, &cksum_bytes, &mac_bytes, 1) != 0 ||
|
||||||
strcmp(ck, "CRC64") == 0) {
|
strcmp(ck, "CRC64") == 0) {
|
||||||
fprintf(stderr, "Invalid PCOMPRESS_CHUNK_HASH_GLOBAL. Reverting to default.\n");
|
fprintf(stderr, "Invalid PCOMPRESS_CHUNK_HASH_GLOBAL. Reverting to default.\n");
|
||||||
chunk_cksum = -1;
|
chunk_cksum = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chunk_cksum == 0) {
|
if (chunk_cksum == 0) {
|
||||||
|
|
|
@ -31,6 +31,12 @@ then
|
||||||
rm -f ${tstf}.pz
|
rm -f ${tstf}.pz
|
||||||
fi
|
fi
|
||||||
unset PCOMPRESS_CHUNK_HASH_GLOBAL
|
unset PCOMPRESS_CHUNK_HASH_GLOBAL
|
||||||
|
if [ -f core* ]
|
||||||
|
then
|
||||||
|
echo "FATAL: Compression crashed"
|
||||||
|
rm -f ${tstf}.pz
|
||||||
|
rm -f core*
|
||||||
|
fi
|
||||||
|
|
||||||
for feat in "-L" "-L -D" "-L -D -E -M -C" "-L -B5" "-L -D -E -B2" "-F" "-F -L"
|
for feat in "-L" "-L -D" "-L -D -E -M -C" "-L -B5" "-L -D -E -B2" "-F" "-F -L"
|
||||||
do
|
do
|
||||||
|
@ -47,6 +53,7 @@ do
|
||||||
then
|
then
|
||||||
echo "FATAL: Compression crashed"
|
echo "FATAL: Compression crashed"
|
||||||
rm -f ${tstf}.pz
|
rm -f ${tstf}.pz
|
||||||
|
rm -f core*
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
rm -f ${tstf}.pz
|
rm -f ${tstf}.pz
|
||||||
|
|
Loading…
Reference in a new issue