Add DbC checks for locked zone on dns_zone_t member access

When checking for the locked zone (in lib/dns/zone.c), we now also
required the zone structure to be valid.  The commit also adds the
LOCKED_ZONE(...); to more places where we require the zone to be locked.
70 jobs for !3126 with 1642-lib-dns-zone.c-add-dbc-checks-for-locked-zone in 31 minutes and 36 seconds (queued for 9 seconds)
latest detached
Status Job ID Name Coverage
  Autoconf
passed #1589403
linux amd64
autoreconf

00:00:17

 
  Precheck
passed #1589405
linux amd64
clang-format

00:00:18

passed #1589406
linux amd64
coccinelle

00:03:46

failed #1589407
linux amd64
danger

00:00:14

passed #1589404
linux amd64
misc

00:00:18

passed #1589408
linux amd64
tarball-create

00:01:27

 
  Build
passed #1589419
linux amd64
clang:asan

00:01:49

passed #1589423
linux amd64
clang:buster:amd64

00:01:05

passed #1589426
amd64 libvirt
clang:freebsd11:amd64

00:01:07

passed #1589427
amd64 libvirt
clang:freebsd12:amd64

00:01:04

passed #1589428
amd64 libvirt
clang:openbsd:amd64

00:02:26

passed #1589421
linux amd64
clang:tsan

00:01:08

passed #1589409
linux amd64
gcc:alpine3.13:amd64

00:01:01

passed #1589418
linux amd64
gcc:asan

00:01:31

passed #1589413
linux amd64
gcc:buster:amd64

00:00:42

passed #1589410
linux amd64
gcc:centos7:amd64

00:00:46

passed #1589411
linux amd64
gcc:centos8:amd64

00:00:47

passed #1589417
linux amd64
gcc:focal:amd64

00:00:53

passed #1589422
linux amd64
gcc:mutexatomics

00:00:53

passed #1589415
linux amd64
gcc:out-of-tree

00:00:53

passed #1589414
linux amd64
gcc:sid:amd64

00:01:02

passed #1589424
linux amd64
gcc:softhsm2.4

00:00:49

passed #1589425
linux amd64
gcc:softhsm2.6

00:00:51

passed #1589412
linux amd64
gcc:stretch:amd64

00:01:04

passed #1589420
linux amd64
gcc:tsan

00:01:00

passed #1589416
linux amd64
gcc:tumbleweed:amd64

00:00:45

passed #1589429
amd64 windows
msvc:windows:amd64

00:01:02

 
  Unit
failed #1589439
linux amd64
unit:clang:asan

00:02:25

failed #1589443
linux amd64
unit:clang:buster:amd64

00:01:16

failed #1589446
amd64 libvirt
unit:clang:freebsd11:amd64

00:01:45

failed #1589447
amd64 libvirt
unit:clang:freebsd12:amd64

00:01:49

failed #1589448
amd64 libvirt
unit:clang:openbsd:amd64

00:03:45

failed #1589441
linux amd64
unit:clang:tsan

00:03:13

failed #1589430
linux amd64
unit:gcc:alpine3.13:amd64

00:01:30

failed #1589438
linux amd64
unit:gcc:asan

00:01:50

failed #1589434
linux amd64
unit:gcc:buster:amd64

00:02:14

failed #1589431
linux amd64
unit:gcc:centos7:amd64

00:01:24

failed #1589432
linux amd64
unit:gcc:centos8:amd64

00:01:26

failed #1589437
linux amd64
unit:gcc:focal:amd64

00:01:17

failed #1589442
linux amd64
unit:gcc:mutexatomics

00:01:17

failed #1589435
linux amd64
unit:gcc:sid:amd64

00:01:18

failed #1589444
linux amd64
unit:gcc:softhsm2.4

00:01:15

failed #1589445
linux amd64
unit:gcc:softhsm2.6

00:01:15

passed #1589433
linux amd64
unit:gcc:stretch:amd64

00:00:15

failed #1589440
linux amd64
unit:gcc:tsan

00:04:12

failed #1589436
linux amd64
unit:gcc:tumbleweed:amd64

00:01:10

 
  System
failed #1589458
linux amd64
system:clang:asan

00:21:07

failed #1589462
linux amd64
system:clang:buster:amd64

00:19:07

passed #1589465
amd64 libvirt
system:clang:freebsd11:amd64

00:29:41

passed #1589466
amd64 libvirt
system:clang:freebsd12:amd64

00:23:29

failed #1589460
linux amd64
system:clang:tsan

00:25:07

failed #1589449
linux amd64
system:gcc:alpine3.13:amd64

00:18:58

failed #1589457
linux amd64
system:gcc:asan

00:21:36

skipped #1589453
linux amd64
system:gcc:buster:amd64
failed #1589450
linux amd64
system:gcc:centos7:amd64

00:19:36

failed #1589451
linux amd64
system:gcc:centos8:amd64

00:20:09

failed #1589456
linux amd64
system:gcc:focal:amd64

00:19:51

failed #1589461
linux amd64
system:gcc:mutexatomics

00:19:48

failed #1589454
linux amd64
system:gcc:sid:amd64

00:19:56

failed #1589463
linux amd64
system:gcc:softhsm2.4

00:21:45

failed #1589464
linux amd64
system:gcc:softhsm2.6

00:22:55

failed #1589452
linux amd64
system:gcc:stretch:amd64

00:19:15

failed #1589459
linux amd64
system:gcc:tsan

00:24:30

failed #1589455
linux amd64
system:gcc:tumbleweed:amd64

00:19:07

 
  Docs
passed #1589467
linux amd64
docs

00:00:53

 
  Postcheck
passed #1589471
linux amd64
cppcheck

00:00:49

passed #1589468
linux amd64
flake8

00:00:20

skipped #1589472
linux amd64
gcov
passed #1589469
linux amd64
pylint

00:00:27

passed #1589470
linux amd64
scan-build

00:04:12

 
Name Stage Failure
failed
system:clang:tsan System
FAIL dnssec (exit status: 1)

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6613 files

Uploading artifacts as "archive" to coordinator... ok
id=1589460 responseStatus=201 Created token=RyDTq5SY
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:tsan System
FAIL dnssec (exit status: 1)

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6610 files

Uploading artifacts as "archive" to coordinator... ok
id=1589459 responseStatus=201 Created token=q_xngeuS
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:softhsm2.6 System
FAIL pkcs11 (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6842 files

Uploading artifacts as "archive" to coordinator... ok
id=1589464 responseStatus=201 Created token=PE8-6iUr
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:softhsm2.4 System
FAIL pkcs11 (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6831 files

Uploading artifacts as "archive" to coordinator... ok
id=1589463 responseStatus=201 Created token=y8efXpxk
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:asan System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6725 files

Uploading artifacts as "archive" to coordinator... ok
id=1589457 responseStatus=201 Created token=JtnDsQgy
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:clang:asan System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6720 files

Uploading artifacts as "archive" to coordinator... ok
id=1589458 responseStatus=201 Created token=yAQdMtkx
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:mutexatomics System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6677 files

Uploading artifacts as "archive" to coordinator... ok
id=1589461 responseStatus=201 Created token=_xz9Huys
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:focal:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6632 files

Uploading artifacts as "archive" to coordinator... ok
id=1589456 responseStatus=201 Created token=V_L6KPqn
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:centos8:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6698 files

Uploading artifacts as "archive" to coordinator... ok
id=1589451 responseStatus=201 Created token=UpGpkBcq
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:sid:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 7047 files

Uploading artifacts as "archive" to coordinator... ok
id=1589454 responseStatus=201 Created token=TZMA8nrg
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:clang:buster:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6669 files

Uploading artifacts as "archive" to coordinator... ok
id=1589462 responseStatus=201 Created token=Y6koiztw
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:centos7:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6689 files

Uploading artifacts as "archive" to coordinator... ok
id=1589450 responseStatus=201 Created token=4n_xMmAZ
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:stretch:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6610 files

Uploading artifacts as "archive" to coordinator... ok
id=1589452 responseStatus=201 Created token=V_7KE4gH
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:tumbleweed:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6610 files

Uploading artifacts as "archive" to coordinator... ok
id=1589455 responseStatus=201 Created token=Zx_n1tTu
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:alpine3.13:amd64 System
FAIL dnssec (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 6728 files

Uploading artifacts as "archive" to coordinator... ok
id=1589449 responseStatus=201 Created token=pyGQTx8M
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:tsan Unit
Running after script...
$ find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
WARNING: lib/*/tests/tsan.*: no matching files
WARNING: tsan/: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:clang:tsan Unit
Running after script...
$ find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
WARNING: lib/*/tests/tsan.*: no matching files
WARNING: tsan/: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:clang:openbsd:amd64 Unit
Error target(s) unaccounted for: unit-recursive unit 
`unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=openbsd pid=70641 revision=9ad2ddee version=12.4.0~beta.1928.g9ad2ddee
untracked: found 1578 files

Uploading artifacts to coordinator... ok
id=1589448 responseStatus=201 Created token=RKggFzU-
Cleaning up file based variables
ERROR: Job failed: exit status 1
failed
unit:clang:asan Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1612 files

Uploading artifacts as "archive" to coordinator... ok
id=1589439 responseStatus=201 Created token=hNjH-YsK
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:buster:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 2285 files

Uploading artifacts as "archive" to coordinator... ok
id=1589434 responseStatus=201 Created token=edu7sUjN
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:asan Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1612 files

Uploading artifacts as "archive" to coordinator... ok
id=1589438 responseStatus=201 Created token=TVtXgsUT
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:clang:buster:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1612 files

Uploading artifacts as "archive" to coordinator... ok
id=1589443 responseStatus=201 Created token=LxoJ7aDy
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:softhsm2.4 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1630 files

Uploading artifacts as "archive" to coordinator... ok
id=1589444 responseStatus=201 Created token=QoXyx4xo
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:mutexatomics Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1612 files

Uploading artifacts as "archive" to coordinator... ok
id=1589442 responseStatus=201 Created token=GyM2X4JR
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:softhsm2.6 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1670 files

Uploading artifacts as "archive" to coordinator... ok
id=1589445 responseStatus=201 Created token=veTi6Kh7
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:focal:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1581 files

Uploading artifacts as "archive" to coordinator... ok
id=1589437 responseStatus=201 Created token=-qoozJYo
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:tumbleweed:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1580 files

Uploading artifacts as "archive" to coordinator... ok
id=1589436 responseStatus=201 Created token=4Je1G9mQ
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:sid:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1900 files

Uploading artifacts as "archive" to coordinator... ok
id=1589435 responseStatus=201 Created token=3ajzGg4c
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:centos8:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1656 files

Uploading artifacts as "archive" to coordinator... ok
id=1589432 responseStatus=201 Created token=SP43s3tz
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:centos7:amd64 Unit
make[1]: Leaving directory `/builds/isc-projects/bind9/fuzz'
make: *** [unit-recursive] Error 1
make: Target `unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1671 files

Uploading artifacts as "archive" to coordinator... ok
id=1589431 responseStatus=201 Created token=LTy5zSM3
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:alpine3.13:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1671 files

Uploading artifacts as "archive" to coordinator... ok
id=1589430 responseStatus=201 Created token=x3srza-_
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:clang:freebsd11:amd64 Unit

make: stopped in /builds/isc-projects/bind9
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=freebsd pid=15271 revision=2ebc4dc4 version=13.9.0
untracked: found 1581 files

Uploading artifacts as "archive" to coordinator... ok
id=1589446 responseStatus=201 Created token=-jmqGRzh
Cleaning up file based variables
ERROR: Job failed: exit status 1
failed
unit:clang:freebsd12:amd64 Unit
# ERROR: 0
============================================================================
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=freebsd pid=15439 revision=2ebc4dc4 version=13.9.0
untracked: found 1595 files

Uploading artifacts as "archive" to coordinator... ok
id=1589447 responseStatus=201 Created token=1GxjE-aq
Cleaning up file based variables
ERROR: Job failed: exit status 1
failed
danger Precheck
 * branch            main       -> FETCH_HEAD



Failing the build, there is 1 fail.
Feedback: https://gitlab.isc.org/isc-projects/bind9/merge_requests/3126#note_201117

Cleaning up file based variables
ERROR: Job failed: exit code 1