diff options
author | Taylor Blau <me@ttaylorr.com> | 2019-09-05 18:04:53 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-09 10:55:53 -0700 |
commit | 23424ea7597fa17b96c82001b281a5d21f5b4874 (patch) | |
tree | e9595c141a18b20e6364021ed52b28abe11b44ae /t/perf/p7300-clean.sh | |
parent | First batch after Git 2.23 (diff) | |
download | tgif-23424ea7597fa17b96c82001b281a5d21f5b4874.tar.xz |
t/t5318: introduce failing 'git commit-graph write' tests
When invoking 'git commit-graph' in a corrupt repository, one can cause
a segfault when ancestral commits are corrupt in one way or another.
This is due to two function calls in the 'commit-graph.c' code that may
return NULL, but are not checked for NULL-ness before dereferencing.
Before fixing the bug, introduce two failing tests that demonstrate the
problem. The first test corrupts an ancestral commit's parent to point
to a non-existent object. The second test instead corrupts an ancestral
tree by removing the 'tree' information entirely from the commit. Both
of these cases cause segfaults, each at different lines.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/p7300-clean.sh')
0 files changed, 0 insertions, 0 deletions