Bug Summary

File:src/usr.sbin/unbound/obj/conftest.c
Warning:line 114, column 1
Return is prohibited after a successful vfork; call _exit() instead

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple amd64-unknown-openbsd7.0 -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name conftest.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 1 -pic-is-pie -mframe-pointer=all -relaxed-aliasing -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-feature +retpoline-indirect-calls -target-feature +retpoline-indirect-branches -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/usr/src/usr.sbin/unbound/obj -resource-dir /usr/local/lib/clang/13.0.0 -I /usr/src/usr.sbin/unbound -internal-isystem /usr/local/lib/clang/13.0.0/include -internal-externc-isystem /usr/include -O2 -fdebug-compilation-dir=/usr/src/usr.sbin/unbound/obj -ferror-limit 19 -fwrapv -D_RET_PROTECTOR -ret-protector -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -fno-builtin-strdup -fno-builtin-strndup -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/ben/Projects/vmm/scan-build/2022-01-12-194120-40624-1 -x c conftest.c
1/* confdefs.h */
2#define PACKAGE_NAME"unbound" "unbound"
3#define PACKAGE_TARNAME"unbound" "unbound"
4#define PACKAGE_VERSION"1.13.2" "1.13.2"
5#define PACKAGE_STRING"unbound 1.13.2" "unbound 1.13.2"
6#define PACKAGE_BUGREPORT"unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues" "unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues"
7#define PACKAGE_URL"" ""
8#define CONFCMDLINE"--enable-allsymbols --with-ssl=/usr --with-libevent=/usr --with-libexpat=/usr --without-pythonmodule --with-chroot-dir=/var/unbound --with-pidfile= --with-rootkey-file=/var/unbound/db/root.key --with-conf-file=/var/unbound/etc/unbound.conf --with-username=_unbound --disable-shared --disable-explicit-port-randomisation --without-pthreads" "--enable-allsymbols --with-ssl=/usr --with-libevent=/usr --with-libexpat=/usr --without-pythonmodule --with-chroot-dir=/var/unbound --with-pidfile= --with-rootkey-file=/var/unbound/db/root.key --with-conf-file=/var/unbound/etc/unbound.conf --with-username=_unbound --disable-shared --disable-explicit-port-randomisation --without-pthreads"
9#define HAVE_STDIO_H1 1
10#define HAVE_STDLIB_H1 1
11#define HAVE_STRING_H1 1
12#define HAVE_INTTYPES_H1 1
13#define HAVE_STDINT_H1 1
14#define HAVE_STRINGS_H1 1
15#define HAVE_SYS_STAT_H1 1
16#define HAVE_SYS_TYPES_H1 1
17#define HAVE_UNISTD_H1 1
18#define HAVE_WCHAR_H1 1
19#define STDC_HEADERS1 1
20#define _ALL_SOURCE1 1
21#define _DARWIN_C_SOURCE1 1
22#define _GNU_SOURCE1 1
23#define _HPUX_ALT_XOPEN_SOCKET_API1 1
24#define _NETBSD_SOURCE1 1
25#define _OPENBSD_SOURCE1 1
26#define _POSIX_PTHREAD_SEMANTICS1 1
27#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__1 1
28#define __STDC_WANT_IEC_60559_BFP_EXT__1 1
29#define __STDC_WANT_IEC_60559_DFP_EXT__1 1
30#define __STDC_WANT_IEC_60559_FUNCS_EXT__1 1
31#define __STDC_WANT_IEC_60559_TYPES_EXT__1 1
32#define __STDC_WANT_LIB_EXT2__1 1
33#define __STDC_WANT_MATH_SPEC_FUNCS__1 1
34#define _TANDEM_SOURCE1 1
35#define __EXTENSIONS__1 1
36#define CONFIGFILE"/var/unbound/etc/unbound.conf" "/var/unbound/etc/unbound.conf"
37#define RUN_DIR"/var/unbound/etc" "/var/unbound/etc"
38#define CHROOT_DIR"/var/unbound" "/var/unbound"
39#define SHARE_DIR"/var/unbound/etc" "/var/unbound/etc"
40#define PIDFILE"" ""
41#define ROOT_ANCHOR_FILE"/var/unbound/db/root.key" "/var/unbound/db/root.key"
42#define ROOT_CERT_FILE"/var/unbound/etc/icannbundle.pem" "/var/unbound/etc/icannbundle.pem"
43#define UB_USERNAME"_unbound" "_unbound"
44#define WINVER0x0502 0x0502
45#define RSRC_PACKAGE_VERSION1,13,2,0 1,13,2,0
46#define HAVE_GETOPT_H1 1
47#define HAVE_TIME_H1 1
48#define HAVE_ATTR_FORMAT1 1
49#define HAVE_ATTR_UNUSED1 1
50#define HAVE_ATTR_WEAK1 1
51#define ATTR_WEAK__attribute__((weak)) __attribute__((weak))
52#define HAVE_ATTR_NORETURN1 1
53#define ATTR_NORETURN__attribute__((__noreturn__)) __attribute__((__noreturn__))
54#define YYTEXT_POINTER1 1
55#define LEX_HAS_YYLEX_DESTROY1 1
56#define HAVE_DLFCN_H1 1
57#define LT_OBJDIR".libs/" ".libs/"
58#define HAVE_STDARG_H1 1
59#define HAVE_STDBOOL_H1 1
60#define HAVE_NETINET_IN_H1 1
61#define HAVE_NETINET_TCP_H1 1
62#define HAVE_SYS_PARAM_H1 1
63#define HAVE_SYS_SELECT_H1 1
64#define HAVE_SYS_SOCKET_H1 1
65#define HAVE_SYS_UN_H1 1
66#define HAVE_SYS_UIO_H1 1
67#define HAVE_SYS_RESOURCE_H1 1
68#define HAVE_ARPA_INET_H1 1
69#define HAVE_SYSLOG_H1 1
70#define HAVE_NETDB_H1 1
71#define HAVE_SYS_WAIT_H1 1
72#define HAVE_PWD_H1 1
73#define HAVE_GLOB_H1 1
74#define HAVE_GRP_H1 1
75#define HAVE_LOGIN_CAP_H1 1
76#define HAVE_ENDIAN_H1 1
77#define HAVE_SYS_ENDIAN_H1 1
78#define HAVE_SYS_IPC_H1 1
79#define HAVE_SYS_SHM_H1 1
80#define HAVE_IFADDRS_H1 1
81#define HAVE_NET_IF_H1 1
82#define SIZEOF_TIME_T8 8
83#define SIZEOF_SIZE_T8 8
84#define HAVE_CHOWN1 1
85#define HAVE_FORK1 1
86/* end confdefs.h. */
87/* Define vfork to an innocuous variant, in case <limits.h> declares vfork.
88 For example, HP-UX 11i <limits.h> declares gettimeofday. */
89#define vfork innocuous_vfork
90
91/* System header to define __stub macros and hopefully few prototypes,
92 which can conflict with char vfork (); below. */
93
94#include <limits.h>
95#undef vfork
96
97/* Override any GCC internal prototype to avoid an error.
98 Use char because int might match the return type of a GCC
99 builtin and then its argument prototype would still apply. */
100#ifdef __cplusplus
101extern "C"
102#endif
103char vfork ();
104/* The GNU C library defines this for functions which it implements
105 to always fail with ENOSYS. Some functions are actually named
106 something starting with __ and the normal name is an alias. */
107#if defined __stub_vfork || defined __stub___vfork
108choke me
109#endif
110
111int
112main (void)
113{
114return vfork ();
Return is prohibited after a successful vfork; call _exit() instead
115 ;
116 return 0;
117}