Bug Summary

File:objdir/gcc/conftest.cpp
Warning:line 165, column 1
Return is prohibited after a successful vfork; call _exit() instead

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name conftest.cpp -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -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 -analyzer-config-compatibility-mode=true -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -resource-dir /usr/lib64/clang/13.0.0 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11/backward -internal-isystem /usr/lib64/clang/13.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir=/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -analyzer-output=plist-html -analyzer-config silence-checkers=core.NullDereference -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2021-11-20-133755-20252-1/report-q6It78.plist -x c++ conftest.cpp
1/* confdefs.h */
2#define PACKAGE_NAME"" ""
3#define PACKAGE_TARNAME"" ""
4#define PACKAGE_VERSION"" ""
5#define PACKAGE_STRING"" ""
6#define PACKAGE_BUGREPORT"" ""
7#define PACKAGE_URL"" ""
8#define ENABLE_STDLIB_OPTION0 0
9#define STDC_HEADERS1 1
10#define HAVE_SYS_TYPES_H1 1
11#define HAVE_SYS_STAT_H1 1
12#define HAVE_STDLIB_H1 1
13#define HAVE_STRING_H1 1
14#define HAVE_MEMORY_H1 1
15#define HAVE_STRINGS_H1 1
16#define HAVE_INTTYPES_H1 1
17#define HAVE_STDINT_H1 1
18#define HAVE_UNISTD_H1 1
19#define __EXTENSIONS__1 1
20#define _ALL_SOURCE1 1
21#define _GNU_SOURCE1 1
22#define _POSIX_PTHREAD_SEMANTICS1 1
23#define _TANDEM_SOURCE1 1
24#define SIZEOF_VOID_P8 8
25#define SIZEOF_SHORT2 2
26#define SIZEOF_INT4 4
27#define SIZEOF_LONG8 8
28#define HAVE_LONG_LONG1 1
29#define SIZEOF_LONG_LONG8 8
30#define HAVE_UNSIGNED_LONG_LONG_INT1 1
31#define HAVE_LONG_LONG_INT1 1
32#define HAVE_INTMAX_T1 1
33#define HAVE_INTPTR_T1 1
34#define HAVE_UINTMAX_T1 1
35#define HAVE_UINTPTR_T1 1
36#define INT64_T_IS_LONG1 1
37#define HAVE_SWAP_IN_UTILITY1 1
38#define CHECKING_P1 1
39#define ENABLE_EXTRA_CHECKING1 1
40#define ENABLE_ASSERT_CHECKING1 1
41#define ENABLE_GIMPLE_CHECKING1 1
42#define ENABLE_RUNTIME_CHECKING1 1
43#define ENABLE_TREE_CHECKING1 1
44#define ENABLE_TYPES_CHECKING1 1
45#define ENABLE_RTL_FLAG_CHECKING1 1
46#define ENABLE_GC_CHECKING1 1
47#define HAVE_VALGRIND_MEMCHECK_H1 1
48#define GATHER_STATISTICS0 0
49#define DEFAULT_STK_CLASH_GUARD_SIZE0 0
50#define ENABLE_DECIMAL_FLOAT1 1
51#define ENABLE_DECIMAL_BID_FORMAT1 1
52#define ENABLE_FIXED_POINT0 0
53#define ENABLE_VTABLE_VERIFY0 0
54#define ENABLE_ANALYZER1 1
55#define DOCUMENTATION_ROOT_URL"https://gcc.gnu.org/onlinedocs/" "https://gcc.gnu.org/onlinedocs/"
56#define CHANGES_ROOT_URL"https://gcc.gnu.org/" "https://gcc.gnu.org/"
57#define OFFLOAD_TARGETS"" ""
58#define ENABLE_OFFLOADING0 0
59#define STDC_HEADERS1 1
60#define TIME_WITH_SYS_TIME1 1
61#define STRING_WITH_STRINGS1 1
62#define HAVE_SYS_WAIT_H1 1
63#define GWINSZ_IN_SYS_IOCTL1 1
64#define HAVE_LIMITS_H1 1
65#define HAVE_STDDEF_H1 1
66#define HAVE_STRING_H1 1
67#define HAVE_STRINGS_H1 1
68#define HAVE_STDLIB_H1 1
69#define HAVE_TIME_H1 1
70#define HAVE_ICONV_H1 1
71#define HAVE_FCNTL_H1 1
72#define HAVE_FTW_H1 1
73#define HAVE_UNISTD_H1 1
74#define HAVE_SYS_FILE_H1 1
75#define HAVE_SYS_TIME_H1 1
76#define HAVE_SYS_MMAN_H1 1
77#define HAVE_SYS_RESOURCE_H1 1
78#define HAVE_SYS_PARAM_H1 1
79#define HAVE_SYS_TIMES_H1 1
80#define HAVE_SYS_STAT_H1 1
81#define HAVE_MALLOC_H1 1
82#define HAVE_LANGINFO_H1 1
83#define HAVE_LOCALE_H1 1
84#define HAVE_WCHAR_H1 1
85#define HAVE_UNORDERED_MAP1 1
86#define HAVE_TR1_UNORDERED_MAP1 1
87#define HAVE_EXT_HASH_MAP1 1
88#define HAVE_INTTYPES_H1 1
89#define HAVE_ZSTD_H1 1
90#define HAVE_TIMES1 1
91#define HAVE_CLOCK1 1
92#define HAVE_KILL1 1
93#define HAVE_GETRLIMIT1 1
94#define HAVE_SETRLIMIT1 1
95#define HAVE_POPEN1 1
96#define HAVE_SYSCONF1 1
97#define HAVE_STRSIGNAL1 1
98#define HAVE_GETRUSAGE1 1
99#define HAVE_NL_LANGINFO1 1
100#define HAVE_GETTIMEOFDAY1 1
101#define HAVE_MBSTOWCS1 1
102#define HAVE_WCSWIDTH1 1
103#define HAVE_MMAP1 1
104#define HAVE_POSIX_FALLOCATE1 1
105#define HAVE_SETLOCALE1 1
106#define HAVE_CLEARERR_UNLOCKED1 1
107#define HAVE_FEOF_UNLOCKED1 1
108#define HAVE_FERROR_UNLOCKED1 1
109#define HAVE_FFLUSH_UNLOCKED1 1
110#define HAVE_FGETC_UNLOCKED1 1
111#define HAVE_FGETS_UNLOCKED1 1
112#define HAVE_FILENO_UNLOCKED1 1
113#define HAVE_FPUTC_UNLOCKED1 1
114#define HAVE_FPUTS_UNLOCKED1 1
115#define HAVE_FREAD_UNLOCKED1 1
116#define HAVE_FWRITE_UNLOCKED1 1
117#define HAVE_GETCHAR_UNLOCKED1 1
118#define HAVE_GETC_UNLOCKED1 1
119#define HAVE_PUTCHAR_UNLOCKED1 1
120#define HAVE_PUTC_UNLOCKED1 1
121#define HAVE_MADVISE1 1
122#define HAVE_MALLINFO1 1
123#define HAVE_MALLINFO21 1
124#define HAVE_FSTATAT1 1
125#define HAVE_WORKING_MBSTOWCS1 1
126#define HAVE_MMAP_FILE1 1
127#define HAVE_MMAP_DEV_ZERO1 1
128#define HAVE_MMAP_ANON1 1
129#define HAVE_FORK1 1
130/* end confdefs.h. */
131/* Define vfork to an innocuous variant, in case <limits.h> declares vfork.
132 For example, HP-UX 11i <limits.h> declares gettimeofday. */
133#define vfork innocuous_vfork
134
135/* System header to define __stub macros and hopefully few prototypes,
136 which can conflict with char vfork (); below.
137 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
138 <limits.h> exists even on freestanding compilers. */
139
140#ifdef __STDC__1
141# include <limits.h>
142#else
143# include <assert.h>
144#endif
145
146#undef vfork
147
148/* Override any GCC internal prototype to avoid an error.
149 Use char because int might match the return type of a GCC
150 builtin and then its argument prototype would still apply. */
151#ifdef __cplusplus201402L
152extern "C"
153#endif
154char vfork ();
155/* The GNU C library defines this for functions which it implements
156 to always fail with ENOSYS. Some functions are actually named
157 something starting with __ and the normal name is an alias. */
158#if defined __stub_vfork || defined __stub___vfork
159choke me
160#endif
161
162int
163main ()
164{
165return vfork ();
Return is prohibited after a successful vfork; call _exit() instead
166 ;
167 return 0;
168}