Subject: [BUG] Git 2.43.0-rc0 - t4216 unpack(Q) invalid type

From: <[email-masked]>
Date: Fri, 3 Nov 2023 10:50:19 -0400

In RC0, the following tests are failing (with verbose). They look like the
same root cause. Unpack("Q>".... What version does git now require for perl?
I have v5.30.3 available, nothing more recent.

expecting success of 4216.141 'Bloom reader notices too-small data chunk': 
check_corrupt_graph BDAT clear 00000000 &&
echo "warning: ignoring too-small changed-path chunk" \
"(4 < 12) in commit-graph file" >expect.err &&
test_cmp expect.err err

Invalid type 'Q' in unpack at
/home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/t/lib-chunk/corrupt-chunk
-file.pl line 31.
not ok 141 - Bloom reader notices too-small data chunk
#
#check_corrupt_graph BDAT clear 00000000 &&
#echo "warning: ignoring too-small changed-path chunk" \
#"(4 < 12) in commit-graph file" >expect.err &&
#test_cmp expect.err err
#

expecting success of 4216.142 'Bloom reader notices out-of-bounds filter
offsets': 
check_corrupt_graph BIDX 12 FFFFFFFF &&
# use grep to avoid depending on exact chunk size
grep "warning: ignoring out-of-range offset (4294967295) for changed-path
filter at pos 3 of .git/objects/info/commit-graph" err

Invalid type 'Q' in unpack at
/home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/t/lib-chunk/corrupt-chunk
-file.pl line 31.
not ok 142 - Bloom reader notices out-of-bounds filter offsets
#
#check_corrupt_graph BIDX 12 FFFFFFFF &&
## use grep to avoid depending on exact chunk size
#grep "warning: ignoring out-of-range offset (4294967295) for changed-path
filter at pos 3 of .git/objects/info/commit-graph" err
#

expecting success of 4216.143 'Bloom reader notices too-small index chunk': 
# replace the index with a single entry, making most
# lookups out-of-bounds
check_corrupt_graph BIDX clear 00000000 &&
echo "warning: commit-graph changed-path index chunk" \
"is too small" >expect.err &&
test_cmp expect.err err

Invalid type 'Q' in unpack at
/home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/t/lib-chunk/corrupt-chunk
-file.pl line 31.
not ok 143 - Bloom reader notices too-small index chunk
#
## replace the index with a single entry, making most
## lookups out-of-bounds
#check_corrupt_graph BIDX clear 00000000 &&
#echo "warning: commit-graph changed-path index chunk" \
#"is too small" >expect.err &&
#test_cmp expect.err err
#

expecting success of 4216.144 'Bloom reader notices out-of-order index
offsets': 
# we do not know any real offsets, but we can pick
# something plausible; we should not get to the point of
# actually reading from the bogus offsets anyway.
corrupt_graph BIDX 4 0000000c00000005 &&
echo "warning: ignoring decreasing changed-path index offsets" \
"(12 > 5) for positions 1 and 2 of .git/objects/info/commit-graph"
>expect.err &&
git -c core.commitGraph=false log -- A/B/file2 >expect.out &&
git -c core.commitGraph=true log -- A/B/file2 >out 2>err &&
test_cmp expect.out out &&
test_cmp expect.err err

Invalid type 'Q' in unpack at
/home/jenkinsbuild/.jenkins/workspace/Git_Pipeline/t/lib-chunk/corrupt-chunk
-file.pl line 31.
not ok 144 - Bloom reader notices out-of-order index offsets
#
## we do not know any real offsets, but we can pick
## something plausible; we should not get to the point of
## actually reading from the bogus offsets anyway.
#corrupt_graph BIDX 4 0000000c00000005 &&
#echo "warning: ignoring decreasing changed-path index offsets" \
#"(12 > 5) for positions 1 and 2 of .git/objects/info/commit-graph"
>expect.err &&
#git -c core.commitGraph=false log -- A/B/file2 >expect.out &&
#git -c core.commitGraph=true log -- A/B/file2 >out 2>err &&
#test_cmp expect.out out &&
#test_cmp expect.err err
#

--
Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)
NonStop(211288444200000000)
-- In real life, I talk too much.