mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-22 10:10:14 -04:00
chg: ci: Fail when spatch can't process source code
Sometimes spatch fails to process the source code:
EXN: Failure("replacement: node 80: {7[1,2,30,31,32] in isc__nm_base64_to_base64url reachable by inconsistent control-flow paths") in ./lib/isc/netmgr/http.c
Closes #5567
Merge branch '5567-spatch-detect-more-error-conditions' into 'main'
See merge request isc-projects/bind9!11115
This commit is contained in:
commit
dedc17d1a4
4 changed files with 5 additions and 8 deletions
|
|
@ -697,6 +697,7 @@ coccinelle:
|
|||
- '**/*.c'
|
||||
- '**/*.h'
|
||||
- 'cocci/**'
|
||||
- 'util/check-cocci.sh'
|
||||
- *rule_mr_manual
|
||||
- *rule_tag
|
||||
- *rule_source_other_than_mr
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
expression e;
|
||||
@@
|
||||
-DNS_TYPEPAIR_VALUE(dns_rdatatype_rrsig,
|
||||
+DNS_SIGTYPE(
|
||||
+DNS_SIGTYPEPAIR(
|
||||
e)
|
||||
|
|
|
|||
|
|
@ -3539,9 +3539,7 @@ isc__nm_base64url_to_base64(isc_mem_t *mem, const char *base64url,
|
|||
|
||||
INSIST(i == len);
|
||||
|
||||
if (res_len != NULL) {
|
||||
*res_len = len;
|
||||
}
|
||||
SET_IF_NOT_NULL(res_len, len);
|
||||
|
||||
res[len] = '\0';
|
||||
|
||||
|
|
@ -3592,9 +3590,7 @@ isc__nm_base64_to_base64url(isc_mem_t *mem, const char *base64,
|
|||
}
|
||||
}
|
||||
end:
|
||||
if (res_len) {
|
||||
*res_len = i;
|
||||
}
|
||||
SET_IF_NOT_NULL(res_len, i);
|
||||
|
||||
res[i] = '\0';
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ run_spatch() {
|
|||
echo "Applying semantic patch $spatch..."
|
||||
spatch --jobs "${TEST_PARALLEL_JOBS:-1}" --sp-file "$spatch" --use-gitgrep --dir "." --include-headers $spatchargs >>"$patch" 2>cocci.stderr
|
||||
cat cocci.stderr
|
||||
if grep -q -e "parse error" cocci.stderr; then
|
||||
if grep -q -e "parse error" -e "EXN: Failure" cocci.stderr; then
|
||||
ret=1
|
||||
fi
|
||||
if [ "$(wc <"$patch" -l)" -gt "0" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue