Fix 'Dereference of null pointer' from scan-build-10
These are mostly false positives, the clang-analyzer FAQ[1] specifies why and how to fix it: > The reason the analyzer often thinks that a pointer can be null is > because the preceding code checked compared it against null. So if you > are absolutely sure that it cannot be null, remove the preceding check > and, preferably, add an assertion as well. The 2 warnings reported are: byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view') RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname, ^~~~~~~~~~~~~~ /builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK' ^~~~ /builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK' ((void)(ISC_LIKELY(cond) || \ ^~~~ /builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY' ^ 1 warning generated. -- ./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host') if (*host == '/') { ^~~~~ 1 warning generated. References: 1. https://clang-analyzer.llvm.org/faq.html#null_pointer (cherry picked from commit ddd0d356) (cherry picked from commit 9b76eea0)
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
Precheck | |||||||||
passed |
#783506
amd64
linux
|
🐞:sid:amd64 |
00:00:59
|
|
|||||
passed |
#783504
amd64
linux
|
autoreconf:sid:amd64 |
00:00:36
|
|
|||||
failed |
#783505
amd64
linux
|
misc:sid:amd64 |
00:00:30
|
|
|||||
Build | |||||||||
passed |
#783520
amd64
linux
|
asan:sid:amd64 |
00:04:16
|
|
|||||
passed |
#783524
amd64
libvirt
|
clang:freebsd11.3:amd64 |
00:01:46
|
|
|||||
passed |
#783525
amd64
libvirt
|
clang:freebsd12.1:amd64 |
00:01:52
|
|
|||||
passed |
#783526
amd64
libvirt
|
clang:openbsd6.6:amd64 |
00:04:44
|
|
|||||
failed |
#783521
amd64
linux
|
clang:stretch:amd64 |
00:00:29
|
|
|||||
failed |
#783522
i386
linux
|
clang:stretch:i386 |
00:00:52
|
|
|||||
passed |
#783507
amd64
linux
|
gcc:alpine3.11:amd64 |
00:02:38
|
|
|||||
passed |
#783519
amd64
linux
|
gcc:bionic:amd64 |
00:02:33
|
|
|||||
passed |
#783512
amd64
linux
|
gcc:buster:amd64 |
00:02:15
|
|
|||||
passed |
#783508
amd64
linux
|
gcc:centos6:amd64 |
00:02:13
|
|
|||||
passed |
#783509
amd64
linux
|
gcc:centos7:amd64 |
00:02:22
|
|
|||||
passed |
#783510
amd64
linux
|
gcc:centos8:amd64 |
00:01:57
|
|
|||||
passed |
#783517
amd64
linux
|
gcc:fedora31:amd64 |
00:02:21
|
|
|||||
passed |
#783513
amd64
linux
|
gcc:sid:amd64 |
00:04:31
|
|
|||||
passed |
#783515
i386
linux
|
gcc:sid:i386 |
00:03:09
|
|
|||||
passed |
#783511
amd64
linux
|
gcc:stretch:amd64 |
00:03:08
|
|
|||||
passed |
#783516
amd64
linux
|
gcc:tumbleweed:amd64 |
00:02:28
|
|
|||||
passed |
#783518
amd64
linux
|
gcc:xenial:amd64 |
00:02:40
|
|
|||||
passed |
#783528
amd64
windows
|
msvc:windows:amd64 |
00:02:31
|
|
|||||
passed |
#783527
amd64
linux
|
nolibtool:sid:amd64 |
00:02:48
|
|
|||||
passed |
#783514
amd64
linux
|
oot:sid:amd64 |
00:03:22
|
|
|||||
passed |
#783523
amd64
linux
|
pkcs11:sid:amd64 |
00:02:25
|
|
|||||
Unit | |||||||||
passed |
#783541
amd64
linux
|
unit:asan:sid:amd64 |
00:00:40
|
|
|||||
passed |
#783544
amd64
libvirt
|
unit:clang:freebsd11.3:amd64 |
00:00:50
|
|
|||||
passed |
#783545
amd64
libvirt
|
unit:clang:freebsd12.1:amd64 |
00:00:52
|
|
|||||
skipped |
#783542
amd64
linux
|
unit:clang:stretch:amd64 |
|
||||||
passed |
#783529
amd64
linux
|
unit:gcc:alpine3.11:amd64 |
00:00:41
|
|
|||||
passed |
#783540
amd64
linux
|
unit:gcc:bionic:amd64 |
00:00:46
|
|
|||||
passed |
#783534
amd64
linux
|
unit:gcc:buster:amd64 |
00:00:53
|
|
|||||
passed |
#783530
amd64
linux
|
unit:gcc:centos6:amd64 |
00:00:51
|
|
|||||
passed |
#783531
amd64
linux
|
unit:gcc:centos7:amd64 |
00:00:53
|
|
|||||
passed |
#783532
amd64
linux
|
unit:gcc:centos8:amd64 |
00:00:51
|
|
|||||
passed |
#783538
amd64
linux
|
unit:gcc:fedora31:amd64 |
00:00:49
|
|
|||||
passed |
#783535
amd64
linux
|
unit:gcc:sid:amd64 |
00:00:49
|
|
|||||
passed |
#783536
i386
linux
|
unit:gcc:sid:i386 |
00:00:49
|
|
|||||
passed |
#783533
amd64
linux
|
unit:gcc:stretch:amd64 |
00:00:35
|
|
|||||
passed |
#783537
amd64
linux
|
unit:gcc:tumbleweed:amd64 |
00:00:50
|
|
|||||
passed |
#783539
amd64
linux
|
unit:gcc:xenial:amd64 |
00:00:53
|
|
|||||
passed |
#783546
amd64
linux
|
unit:nolibtool:sid:amd64 |
00:01:09
|
|
|||||
failed |
#783543
amd64
linux
|
unit:pkcs11:sid:amd64 |
00:01:08
|
|
|||||
System | |||||||||
failed |
#783559
amd64
linux
|
system:asan:sid:amd64 |
00:13:47
|
|
|||||
passed |
#783561
amd64
libvirt
|
system:clang:freebsd11.3:amd64 |
00:10:23
|
|
|||||
passed |
#783562
amd64
libvirt
|
system:clang:freebsd12.1:amd64 |
00:11:06
|
|
|||||
passed |
#783547
amd64
linux
|
system:gcc:alpine3.11:amd64 |
00:11:40
|
|
|||||
passed |
#783558
amd64
linux
|
system:gcc:bionic:amd64 |
00:10:57
|
|
|||||
passed |
#783552
amd64
linux
|
system:gcc:buster:amd64 |
00:11:08
|
|
|||||
passed |
#783548
amd64
linux
|
system:gcc:centos6:amd64 |
00:10:24
|
|
|||||
failed |
#783549
amd64
linux
|
system:gcc:centos7:amd64 |
00:13:03
|
|
|||||
passed |
#783550
amd64
linux
|
system:gcc:centos8:amd64 |
00:10:32
|
|
|||||
passed |
#783556
amd64
linux
|
system:gcc:fedora31:amd64 |
00:11:18
|
|
|||||
passed |
#783553
amd64
linux
|
system:gcc:sid:amd64 |
00:10:54
|
|
|||||
passed |
#783554
i386
linux
|
system:gcc:sid:i386 |
00:11:06
|
|
|||||
passed |
#783551
amd64
linux
|
system:gcc:stretch:amd64 |
00:10:58
|
|
|||||
passed |
#783555
amd64
linux
|
system:gcc:tumbleweed:amd64 |
00:10:17
|
|
|||||
passed |
#783557
amd64
linux
|
system:gcc:xenial:amd64 |
00:10:47
|
|
|||||
passed |
#783563
amd64
linux
|
system:nolibtool:sid:amd64 |
00:11:17
|
|
|||||
failed |
#783560
amd64
linux
|
system:pkcs11:sid:amd64 |
00:08:03
|
|
|||||
Docs | |||||||||
passed |
#783564
amd64
linux
|
docs:sid:amd64 |
00:01:02
|
|
|||||
Postcheck | |||||||||
failed |
#783566
amd64
linux
|
cppcheck:gcc:sid:amd64 |
00:00:22
|
|
|||||
failed |
#783565
amd64
linux
|
scan-build:buster:amd64 |
00:00:29
|
|
|||||
Name | Stage | Failure | ||
---|---|---|---|---|
failed
|
system:asan:sid:amd64 | System | ||
|
||||
failed
|
system:gcc:centos7:amd64 | System | ||
|
||||
failed
|
system:pkcs11:sid:amd64 | System | ||
|
||||
failed
|
cppcheck:gcc:sid:amd64 | Postcheck | ||
|
||||
failed
|
unit:pkcs11:sid:amd64 | Unit | ||
|
||||
failed
|
scan-build:buster:amd64 | Postcheck | ||
|
||||
failed
|
clang:stretch:i386 | Build | ||
|
||||
failed
|
clang:stretch:amd64 | Build | ||
|
||||
failed
|
misc:sid:amd64 | Precheck | ||
|