Task #765 - libevent-2.1.12-13.fc41/scan-results.err
back to task #765download
Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/buffer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_enable' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' /usr/include/time.h:29: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/include/event2/util.h:77: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:51: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_enable' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:36: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent-internal.h:460:21: note: in expansion of macro 'evutil_timerisset' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:280:17: note: in expansion of macro 'BEV_RESET_GENERIC_READ_TIMEOUT' # 279| if (event & EV_READ) { # 280| BEV_RESET_GENERIC_READ_TIMEOUT(bev); # 281|-> bufferevent_unsuspend_read_(bevf->underlying, # 282| BEV_SUSPEND_FILT_READ); # 283| } Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_disable' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:295:17: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_disable' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:58: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:294:17: note: in expansion of macro 'BEV_DEL_GENERIC_READ_TIMEOUT' # 293| if (event & EV_READ) { # 294| BEV_DEL_GENERIC_READ_TIMEOUT(bev); # 295|-> bufferevent_suspend_read_(bevf->underlying, # 296| BEV_SUSPEND_FILT_READ); # 297| } Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_ctrl' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:605:33: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:121:14: note: in expansion of macro 'BEV_IS_FILTER' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_ctrl' # 603| case BEV_CTRL_GET_UNDERLYING: # 604| bevf = upcast(bev); # 605|-> data->ptr = bevf->underlying; # 606| return 0; # 607| case BEV_CTRL_SET_FD: Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_ctrl.part.0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c:611:25: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_filter.c: scope_hint: In function 'be_filter_ctrl.part.0' # 609| bevf = upcast(bev); # 610| # 611|-> if (bevf->underlying && # 612| bevf->underlying->be_ops && # 613| bevf->underlying->be_ops->ctrl) { Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_openssl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'incref_and_lock' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c:74:17: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' /usr/include/alloca.h:24: included_from: Included from here. /usr/include/stdlib.h:706: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/util-internal.h:37: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/evthread-internal.h:37: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent-internal.h:38: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c:41: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'incref_and_lock' # 72| bufferevent_incref_and_lock_(b); # 73| bevp = upcast(b); # 74|-> if (bevp->partner) # 75| bufferevent_incref_and_lock_(downcast(bevp->partner)); # 76| } Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'decref_and_unlock' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c:82:17: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'decref_and_unlock' # 80| { # 81| struct bufferevent_pair *bevp = upcast(b); # 82|-> if (bevp->partner) # 83| bufferevent_decref_and_unlock_(downcast(bevp->partner)); # 84| bufferevent_decref_and_unlock_(b); Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_enable' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c:228:34: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_enable' # 226| { # 227| struct bufferevent_pair *bev_p = upcast(bufev); # 228|-> struct bufferevent_pair *partner = bev_p->partner; # 229| # 230| incref_and_lock(bufev); Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_unlink' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c:269:18: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_unlink' # 267| struct bufferevent_pair *bev_p = upcast(bev); # 268| # 269|-> if (bev_p->partner) { # 270| bev_p->unlinked_partner = bev_p->partner; # 271| bev_p->partner->partner = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_destruct' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c:297:18: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_destruct' # 295| * Where bev1 == pair[0], bev2 == pair[1]. # 296| */ # 297|-> if (bev_p->unlinked_partner && bev_p->bev.own_lock) { # 298| bev_p->unlinked_partner->bev.own_lock = 1; # 299| bev_p->bev.own_lock = 0; Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_flush' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c:311:19: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_pair.c: scope_hint: In function 'be_pair_flush' # 309| struct bufferevent *partner; # 310| # 311|-> if (!bev_p->partner) # 312| return -1; # 313| Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/bufferevent_ratelim.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/epoll.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/evdns.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/event.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/event.c: scope_hint: In function 'event_signal_closure' libevent-2.1.12-build/libevent-2.1.12-stable/event.c:1362:32: warning[-Wdangling-pointer=]: storing the address of local variable 'ncalls' in 'ev_35(D)->ev_.ev_signal.ev_pncalls' # 1362 | ev->ev_pncalls = &ncalls; # | ~~~~~~~~~~~~~~~^~~~~~~~~ libevent-2.1.12-build/libevent-2.1.12-stable/event.c:1356:15: note: 'ncalls' declared here # 1356 | short ncalls; # | ^~~~~~ libevent-2.1.12-build/libevent-2.1.12-stable/event.c:1354:61: note: 'ev' declared here # 1354 | event_signal_closure(struct event_base *base, struct event *ev) # | ~~~~~~~~~~~~~~^~ # 1360| ncalls = ev->ev_ncalls; # 1361| if (ncalls != 0) # 1362|-> ev->ev_pncalls = &ncalls; # 1363| EVBASE_RELEASE_LOCK(base, th_base_lock); # 1364| while (ncalls) { Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/event_tagging.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/evmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/evrpc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c:39: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c: scope_hint: In function 'evthread_setup_global_lock_' libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c:407:35: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libevent-2.1.12-build/libevent-2.1.12-stable/util-internal.h:347:48: note: in definition of macro 'EVUTIL_UNLIKELY' libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c:407:17: note: in expansion of macro 'EVUTIL_ASSERT' libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c:405:17: note: in expansion of macro 'EVUTIL_ASSERT' libevent-2.1.12-build/libevent-2.1.12-stable/util-internal.h:347:48: note: in definition of macro 'EVUTIL_UNLIKELY' libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c:407:17: note: in expansion of macro 'EVUTIL_ASSERT' libevent-2.1.12-build/libevent-2.1.12-stable/util-internal.h:347:48: note: in definition of macro 'EVUTIL_UNLIKELY' libevent-2.1.12-build/libevent-2.1.12-stable/evthread.c:407:17: note: in expansion of macro 'EVUTIL_ASSERT' # 405| EVUTIL_ASSERT(enable_locks && # 406| evthread_lock_debugging_enabled_); # 407|-> EVUTIL_ASSERT(lock->locktype == locktype); # 408| if (!lock->lock) { # 409| lock->lock = original_lock_fns_.alloc( Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/evutil.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/evutil.c:213:21: warning[-Warray-parameter=]: argument 4 of type 'int[2]' with mismatched bound # 213 | evutil_socket_t fd[2]) libevent-2.1.12-build/libevent-2.1.12-stable/evutil.c:85: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/include/event2/util.h:310:25: note: previously declared as 'int[]' # 310 | #define evutil_socket_t int libevent-2.1.12-build/libevent-2.1.12-stable/util-internal.h:306:47: note: in expansion of macro 'evutil_socket_t' # 306 | int evutil_ersatz_socketpair_(int, int , int, evutil_socket_t[]); # | ^~~~~~~~~~~~~~~ # 211| int # 212| evutil_ersatz_socketpair_(int family, int type, int protocol, # 213|-> evutil_socket_t fd[2]) # 214| { # 215| /* This code is originally from Tor. Used with permission. */ Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/evutil.c: scope_hint: In function 'evutil_inet_pton_scope.part.0' libevent-2.1.12-build/libevent-2.1.12-stable/evutil.c:2020:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cp' # 2018| tmp_src = mm_strdup(src); # 2019| cp = strchr(tmp_src, '%'); # 2020|-> *cp = '\0'; # 2021| r = evutil_inet_pton(af, tmp_src, dst); # 2022| free(tmp_src); Error: COMPILER_WARNING (CWE-252): libevent-2.1.12-build/libevent-2.1.12-stable/evutil_rand.c: scope_hint: In function 'evutil_secure_rng_init' libevent-2.1.12-build/libevent-2.1.12-stable/evutil_rand.c:56:16: warning[-Wunused-result]: ignoring return value of 'arc4random' declared with attribute 'warn_unused_result' # 56 | (void) arc4random(); # | ^~~~~~~~~~~~ # 54| { # 55| /* call arc4random() now to force it to self-initialize */ # 56|-> (void) arc4random(); # 57| return 0; # 58| } Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/http.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/http.c:3286:6: warning[deadcode.DeadStores]: Although the value stored to 'argument' is used in the enclosing expression, the value is never actually read from 'argument' # 3284| } # 3285| # 3286|-> p = argument = line; # 3287| while (p != NULL && *p != '\0') { # 3288| char *key, *value, *decoded_value; Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/listener.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): libevent-2.1.12-build/libevent-2.1.12-stable/event-internal.h:40: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/event.c:62: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/minheap-internal.h: scope_hint: In function 'min_heap_reserve_' libevent-2.1.12-build/libevent-2.1.12-stable/minheap-internal.h:148:22: warning[-Wanalyzer-malloc-leak]: leak of '*base.timeheap.p' libevent-2.1.12-build/libevent-2.1.12-stable/minheap-internal.h:36: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/event.c:2617:9: note: in expansion of macro 'EVUTIL_ASSERT' libevent-2.1.12-build/libevent-2.1.12-stable/event.c: scope_hint: In function 'min_heap_reserve_' libevent-2.1.12-build/libevent-2.1.12-stable/minheap-internal.h:37: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/minheap-internal.h:145:43: note: in expansion of macro 'mm_realloc' libevent-2.1.12-build/libevent-2.1.12-stable/minheap-internal.h:145:43: note: in expansion of macro 'mm_realloc' # 146| return -1; # 147| s->p = p; # 148|-> s->a = a; # 149| } # 150| return 0; Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/poll.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/sample/dns-example.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/sample/https-client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/sample/le-proxy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING (CWE-477): libevent-2.1.12-build/libevent-2.1.12-stable/sample/le-proxy.c: scope_hint: In function ‘eventcb’ libevent-2.1.12-build/libevent-2.1.12-stable/sample/le-proxy.c:116:37: warning[-Wdeprecated-declarations]: ‘ERR_func_error_string’ is deprecated: Since OpenSSL 3.0 # 116 | ERR_func_error_string(err); # | ^~~~~~~~~~~~~~~~~~~~~ libevent-2.1.12-build/libevent-2.1.12-stable/sample/le-proxy.c:35: included_from: Included from here. /usr/include/openssl/err.h:459:35: note: declared here # 459 | OSSL_DEPRECATEDIN_3_0 const char *ERR_func_error_string(unsigned long e); # | ^~~~~~~~~~~~~~~~~~~~~ # 114| ERR_lib_error_string(err); # 115| const char *func = (const char*) # 116|-> ERR_func_error_string(err); # 117| fprintf(stderr, # 118| "%s in %s %s\n", msg, lib, func); Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/select.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/signal.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/bench.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/test/bench_httpclient.c: scope_hint: In function ‘launch_request’ libevent-2.1.12-build/libevent-2.1.12-stable/test/bench_httpclient.c:162:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ri’ # 160| # 161| ri = malloc(sizeof(*ri)); # 162|-> ri->n_read = 0; # 163| evutil_gettimeofday(&ri->started, NULL); # 164| Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-823): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:375: error[arrayIndexOutOfBounds]: Array 'fds[1]' accessed at index 1, which is out of bounds. # 373| evutil_closesocket(*fds[1]); # 374| *fds[0] = -1; # 375|-> *fds[1] = -1; # 376| have_closed = 1; # 377| } Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:1845:10: warning[deadcode.DeadStores]: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' # 1843| int n; # 1844| ++n_read_and_drain_cb; # 1845|-> while ((n = read(fd, buf, sizeof(buf))) > 0) # 1846| ; # 1847| } Error: GCC_ANALYZER_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.h:35: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:71: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c: scope_hint: In function ‘test_dup_fd’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:2994:19: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘dfd’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:116:29: note: in definition of macro ‘tt_assert_test_fmt_type’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:158:9: note: in expansion of macro ‘tt_assert_test_type’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:2994:9: note: in expansion of macro ‘tt_int_op’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:116:29: note: in definition of macro ‘tt_assert_test_fmt_type’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:158:9: note: in expansion of macro ‘tt_assert_test_type’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:2994:9: note: in expansion of macro ‘tt_int_op’ # 2992| * read event will make the test pass whether the change was # 2993| * successful or not. */ # 2994|-> tt_int_op(dup2(fd, dfd), ==, dfd); # 2995| event_free(ev2); # 2996| ev2 = event_new(base, dfd, EV_WRITE|EV_PERSIST, dfd_cb, &ev2_got); Error: GCC_ANALYZER_WARNING (CWE-1341): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:3009:17: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘dfd’ # 3007| event_free(ev2); # 3008| if (dfd >= 0) # 3009|-> close(dfd); # 3010| } # 3011| #endif Error: GCC_ANALYZER_WARNING (CWE-688): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c: scope_hint: In function ‘dummy_malloc’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.c:3032:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mem’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 3030| { # 3031| char *mem = malloc(len+16); # 3032|-> memcpy(mem, "{[<guardedram>]}", 16); # 3033| return mem+16; # 3034| } Error: GCC_ANALYZER_WARNING (CWE-401): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.gen.c: scope_hint: In function ‘msg_unmarshal’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.gen.c:369:16: warning[-Wanalyzer-malloc-leak]: leak of ‘run_new_with_arg(0)’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.gen.c: scope_hint: In function ‘msg_unmarshal’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.gen.c: scope_hint: In function ‘msg_unmarshal’ # 367| } # 368| tmp->run_data[tmp->run_length] = run_new(); # 369|-> if (tmp->run_data[tmp->run_length] == NULL) # 370| return (-1); # 371| if (evtag_unmarshal_run(evbuf, MSG_RUN, Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-121): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c: scope_hint: In function ‘test_evbuffer_reserve_invalid_last_with_datap’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:813:32: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.h:35: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:64: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:106:9: note: in expansion of macro ‘tt_want_’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:111:22: note: in expansion of macro ‘tt_assert_msg’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:803:9: note: in expansion of macro ‘tt_assert’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:96:17: note: in expansion of macro ‘TT_BLATHER’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:106:9: note: in expansion of macro ‘tt_want_’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:111:22: note: in expansion of macro ‘tt_assert_msg’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:803:9: note: in expansion of macro ‘tt_assert’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:813:32: note: write of 8 bytes to beyond the end of ‘vec’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:813:32: note: valid subscripts for ‘vec’ are ‘[0]’ to ‘[1]’ # 811| tt_int_op(avec = evbuffer_reserve_space(buf, 1<<12, vec, nvec), >=, 1); # 812| for (i = 0; i < avec; ++i) # 813|-> vec[i].iov_len = 0; # 814| tt_int_op(evbuffer_commit_space(buf, vec, avec), ==, 0); # 815| Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:1625:10: warning[unix.Malloc]: Attempt to free released memory # 1623| evbuffer_free(evb); # 1624| evbuffer_free(evb_tmp); # 1625|-> if (cp) free(cp); # 1626| } # 1627| Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_bufferevent.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:1391:7: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value # 1389| evdns_base_free(dns, 0); # 1390| for (i = 0; i < ARRAY_SIZE(be); ++i) { # 1391|-> if (be[i]) # 1392| bufferevent_free(be[i]); # 1393| } Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c: scope_hint: In function ‘gaic_launch’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:1872:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘status’ # 1870| struct gaic_request_status *status = calloc(1,sizeof(*status)); # 1871| struct timeval tv = { 0, 10000 }; # 1872|-> status->magic = GAIC_MAGIC; # 1873| status->base = base; # 1874| status->dns_base = dns_base; Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c: scope_hint: In function ‘testleak_setup’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:1940:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘env’ # 1938| /* not mm_calloc: we don't want to mess with the count. */ # 1939| env = calloc(1, sizeof(struct testleak_env_t)); # 1940|-> env->base = event_base_new(); # 1941| env->dns_base = evdns_base_new(env->base, 0); # 1942| env->req = evdns_base_resolve_ipv4( Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:2344:6: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value # 2342| # 2343| end: # 2344|-> if (rp.locked) # 2345| EVLOCK_UNLOCK(rp.lock, 0); # 2346| EVTHREAD_FREE_LOCK(rp.lock, 0); Error: GCC_ANALYZER_WARNING (CWE-457): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c: scope_hint: In function ‘getaddrinfo_race_gotresolve_test’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:2344:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rp.locked’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.h:35: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:78: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:106:9: note: in expansion of macro ‘tt_want_’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:111:22: note: in expansion of macro ‘tt_assert_msg’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:2278:9: note: in expansion of macro ‘tt_assert’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:106:9: note: in expansion of macro ‘tt_want_’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:111:22: note: in expansion of macro ‘tt_assert_msg’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_dns.c:2278:9: note: in expansion of macro ‘tt_assert’ # 2342| # 2343| end: # 2344|-> if (rp.locked) # 2345| EVLOCK_UNLOCK(rp.lock, 0); # 2346| EVTHREAD_FREE_LOCK(rp.lock, 0); Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_chunked_cb’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:448:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘state’ # 446| # 447| memset(state, 0, sizeof(struct chunk_req_state)); # 448|-> state->req = req; # 449| state->base = arg; # 450| Error: GCC_ANALYZER_WARNING (CWE-476): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_fill_backlog’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:1412:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘evcon’ # 1410| struct evhttp_request *req; # 1411| # 1412|-> evcon[i] = evhttp_connection_base_new(base, NULL, "127.0.0.1", port); # 1413| tt_assert(evcon[i]); # 1414| evhttp_connection_set_timeout(evcon[i], 5); Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:1413:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'evcon' # 1411| # 1412| evcon[i] = evhttp_connection_base_new(base, NULL, "127.0.0.1", port); # 1413|-> tt_assert(evcon[i]); # 1414| evhttp_connection_set_timeout(evcon[i], 5); # 1415| Error: GCC_ANALYZER_WARNING (CWE-401): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:1424:17: warning[-Wanalyzer-malloc-leak]: leak of ‘evcon’ # 1422| return evcon; # 1423| end: # 1424|-> fprintf(stderr, "Couldn't fill the backlog"); # 1425| return NULL; # 1426| } Error: GCC_ANALYZER_WARNING (CWE-688): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_data_length_constraints_test_impl’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:4059:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘long_str’ where non-null expected libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_data_length_constraints_test_impl’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_data_length_constraints_test_impl’ <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 4057| # 4058| long_str = malloc(size); # 4059|-> memset(long_str, 'a', size); # 4060| long_str[size - 1] = '\0'; # 4061| Error: GCC_ANALYZER_WARNING (CWE-688): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_lingering_close_test_impl’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:4184:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘long_str’ where non-null expected libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_lingering_close_test_impl’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.h:35: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:66: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c: scope_hint: In function ‘http_lingering_close_test_impl’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:106:9: note: in expansion of macro ‘tt_want_’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:111:22: note: in expansion of macro ‘tt_assert_msg’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:4175:9: note: in expansion of macro ‘tt_assert’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:96:17: note: in expansion of macro ‘TT_BLATHER’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:106:9: note: in expansion of macro ‘tt_want_’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:111:22: note: in expansion of macro ‘tt_assert_msg’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_http.c:4175:9: note: in expansion of macro ‘tt_assert’ <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 4182| # 4183| long_str = malloc(size); # 4184|-> memset(long_str, 'a', size); # 4185| long_str[size - 1] = '\0'; # 4186| Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_listener.c:109:2: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 107| tt_assert(getsockname(evconnlistener_get_fd(listener2), # 108| (struct sockaddr*)&ss2, &slen2) == 0); # 109|-> tt_int_op(ss1.ss_family, ==, AF_INET); # 110| tt_int_op(ss2.ss_family, ==, AF_INET); # 111| Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_main.c:370:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'data' # 368| struct basic_test_data *data = basic_test_setup(testcase); # 369| if (data == (void*)TT_SKIP || data == NULL) # 370|-> return data; # 371| global_base = data->base; # 372| pair[0] = data->pair[0]; Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_ssl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-688): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_ssl.c: scope_hint: In function ‘regress_bufferevent_openssl_wm’ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_ssl.c:919:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘payload’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null # 917| server.data = evbuffer_new(); # 918| payload = calloc(1, payload_len); # 919|-> memset(payload, 'A', payload_len); # 920| evbuffer_add(server.data, payload, payload_len); # 921| evbuffer_add(client.data, payload, payload_len); Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_testutils.c:84:19: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 82| if (getsockname(fd, (struct sockaddr*)&ss, &socklen) != 0) # 83| return -1; # 84|-> if (ss.ss_family == AF_INET) # 85| return ntohs( ((struct sockaddr_in*)&ss)->sin_port); # 86| else if (ss.ss_family == AF_INET6) Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_thread.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_util.c:575:7: warning[deadcode.DeadStores]: Although the value stored to 'pid' is used in the enclosing expression, the value is never actually read from 'pid' # 573| fatal_want_severity = wantseverity; # 574| fatal_want_message = wantmsg; # 575|-> if ((pid = regress_fork()) == 0) { # 576| /* child process */ # 577| fn(); Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/test-ratelim.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING (CWE-704): libevent-2.1.12-build/libevent-2.1.12-stable/test/regress.h:35: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:64: included_from: Included from here. libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c: scope_hint: In function ‘test_evbuffer_pullup_with_empty’ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:116:22: warning[-Wbad-function-cast]: cast from function call of type ‘unsigned char *’ to non-matching type ‘long int’ # 116 | type val1_ = (type)(a); \ # | ^ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:144:9: note: in expansion of macro ‘tt_assert_test_fmt_type’ # 144 | tt_assert_test_fmt_type(a,b,str_test,type,test,type,fmt, \ # | ^~~~~~~~~~~~~~~~~~~~~~~ libevent-2.1.12-build/libevent-2.1.12-stable/test/tinytest_macros.h:158:9: note: in expansion of macro ‘tt_assert_test_type’ # 158 | tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_), \ # | ^~~~~~~~~~~~~~~~~~~ libevent-2.1.12-build/libevent-2.1.12-stable/test/regress_buffer.c:444:9: note: in expansion of macro ‘tt_int_op’ # 444 | tt_int_op(evbuffer_pullup(buf, -1), ==, NULL); # | ^~~~~~~~~ # 114| setup_block,cleanup_block,die_on_fail) \ # 115| TT_STMT_BEGIN \ # 116|-> type val1_ = (type)(a); \ # 117| type val2_ = (type)(b); \ # 118| int tt_status_ = (test); \