Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] liburing-2.9/src/include/liburing.h:1523:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".short-read", 0)’ liburing-2.9/test/short-read.c:18:5: enter_function: entry to ‘main’ liburing-2.9/test/short-read.c:26:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/short-read.c:29:24: branch_false: ...to here liburing-2.9/test/short-read.c:34:14: acquire_resource: opened here liburing-2.9/test/short-read.c:38:12: branch_false: following ‘false’ branch... liburing-2.9/test/short-read.c:43:15: branch_false: ...to here liburing-2.9/test/short-read.c:44:12: branch_false: following ‘false’ branch... liburing-2.9/test/short-read.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.9/test/short-read.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.9/src/include/liburing.h:1523:35: danger: ‘open(".short-read", 0)’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3) # 1521| { # 1522| struct io_uring_sq *sq = &ring->sq; # 1523|-> unsigned int head, next = sq->sqe_tail + 1; # 1524| int shift = 0; # 1525| Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] liburing-2.9/src/include/liburing.h:1523:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".sync_file_range", 2)’ liburing-2.9/test/fsync.c:146:12: enter_function: entry to ‘test_sync_file_range’ liburing-2.9/test/fsync.c:154:14: acquire_resource: opened here liburing-2.9/test/fsync.c:158:12: branch_false: following ‘false’ branch... liburing-2.9/test/fsync.c:163:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_sync_file_range’ liburing-2.9/test/fsync.c:163:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_sync_file_range’ liburing-2.9/src/include/liburing.h:1523:35: danger: ‘open(".sync_file_range", 2)’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1) # 1521| { # 1522| struct io_uring_sq *sq = &ring->sq; # 1523|-> unsigned int head, next = sq->sqe_tail + 1; # 1524| int shift = 0; # 1525| Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] liburing-2.9/src/include/liburing.h:1523:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".test_fpos_read", 0)’ liburing-2.9/test/fpos.c:43:12: enter_function: entry to ‘test_read’ liburing-2.9/test/fpos.c:58:9: call_function: calling ‘create_file’ from ‘test_read’ liburing-2.9/test/fpos.c:58:9: return_function: returning to ‘test_read’ from ‘create_file’ liburing-2.9/test/fpos.c:59:14: acquire_resource: opened here liburing-2.9/test/fpos.c:61:9: branch_true: following ‘true’ branch... liburing-2.9/test/fpos.c:61:9: branch_true: ...to here liburing-2.9/test/fpos.c:63:16: branch_false: following ‘false’ branch (when ‘done == 0’)... liburing-2.9/test/fpos.c:63:16: branch_false: ...to here liburing-2.9/test/fpos.c:64:29: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.9/test/fpos.c:65:31: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_read’ liburing-2.9/test/fpos.c:65:31: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_read’ liburing-2.9/src/include/liburing.h:1523:35: danger: ‘open(".test_fpos_read", 0)’ leaks here; was opened at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12) # 1521| { # 1522| struct io_uring_sq *sq = &ring->sq; # 1523|-> unsigned int head, next = sq->sqe_tail + 1; # 1524| int shift = 0; # 1525| Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] liburing-2.9/src/include/liburing.h:1523:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/tmp", 65536)’ liburing-2.9/test/lfs-openat-write.c:97:5: enter_function: entry to ‘main’ liburing-2.9/test/lfs-openat-write.c:102:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/lfs-openat-write.c:105:15: branch_false: ...to here liburing-2.9/test/lfs-openat-write.c:105:15: acquire_resource: opened here liburing-2.9/test/lfs-openat-write.c:106:12: branch_false: following ‘false’ branch... liburing-2.9/test/lfs-openat-write.c:109:15: branch_false: ...to here liburing-2.9/test/lfs-openat-write.c:110:12: branch_false: following ‘false’ branch... liburing-2.9/test/lfs-openat-write.c:113:15: branch_false: ...to here liburing-2.9/test/lfs-openat-write.c:113:15: call_function: calling ‘test_open_write’ from ‘main’ liburing-2.9/test/lfs-openat-write.c:113:15: return_function: returning to ‘main’ from ‘test_open_write’ liburing-2.9/test/lfs-openat-write.c:115:9: throw: if ‘io_uring_queue_exit’ throws an exception... liburing-2.9/src/include/liburing.h:1523:35: danger: ‘open("/tmp", 65536)’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3) # 1521| { # 1522| struct io_uring_sq *sq = &ring->sq; # 1523|-> unsigned int head, next = sq->sqe_tail + 1; # 1524| int shift = 0; # 1525| Error: GCC_ANALYZER_WARNING (CWE-775): [#def5] liburing-2.9/src/include/liburing.h:1523:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’ liburing-2.9/test/kallsyms.c:115:12: enter_function: entry to ‘test_io’ liburing-2.9/test/kallsyms.c:121:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.9/test/kallsyms.c:123:12: branch_false: ...to here liburing-2.9/test/kallsyms.c:123:12: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.9/test/kallsyms.c:128:15: branch_false: ...to here liburing-2.9/test/kallsyms.c:128:15: call_function: calling ‘__test_io’ from ‘test_io’ # 1521| { # 1522| struct io_uring_sq *sq = &ring->sq; # 1523|-> unsigned int head, next = sq->sqe_tail + 1; # 1524| int shift = 0; # 1525| Error: GCC_ANALYZER_WARNING (CWE-775): [#def6] liburing-2.9/src/include/liburing.h:1523:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’ liburing-2.9/test/sqwait.c:42:5: enter_function: entry to ‘main’ liburing-2.9/test/sqwait.c:63:21: branch_true: following ‘true’ branch (when ‘i != 256’)... liburing-2.9/test/sqwait.c:64:21: branch_true: ...to here liburing-2.9/test/sqwait.c:64:21: branch_true: following ‘true’ branch... liburing-2.9/test/sqwait.c:70:12: branch_false: following ‘false’ branch... liburing-2.9/test/sqwait.c:78:14: branch_false: ...to here liburing-2.9/test/sqwait.c:78:14: acquire_resource: opened here liburing-2.9/test/sqwait.c:79:12: branch_false: following ‘false’ branch... liburing-2.9/test/sqwait.c:79:12: branch_false: ...to here liburing-2.9/test/sqwait.c:88:21: branch_true: following ‘true’ branch (when ‘i != 10000’)... liburing-2.9/test/sqwait.c:91:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.9/test/sqwait.c:91:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.9/test/sqwait.c:92:20: branch_true: following ‘true’ branch... liburing-2.9/test/sqwait.c:93:31: branch_true: ...to here liburing-2.9/test/sqwait.c:93:31: call_function: calling ‘io_uring_sqring_wait’ from ‘main’ # 1521| { # 1522| struct io_uring_sq *sq = &ring->sq; # 1523|-> unsigned int head, next = sq->sqe_tail + 1; # 1524| int shift = 0; # 1525| Error: GCC_ANALYZER_WARNING (CWE-775): [#def7] liburing-2.9/src/include/liburing.h:1523:35: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’ liburing-2.9/test/statx.c:155:12: enter_function: entry to ‘test_statx_fd’ liburing-2.9/test/statx.c:162:14: acquire_resource: opened here liburing-2.9/test/statx.c:163:12: branch_false: following ‘false’ branch... liburing-2.9/test/statx.c:170:9: branch_false: ...to here liburing-2.9/test/statx.c:172:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_statx_fd’ liburing-2.9/test/statx.c:172:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_statx_fd’ liburing-2.9/src/include/liburing.h:1523:35: danger: ‘open(path, 0)’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1) # 1521| { # 1522| struct io_uring_sq *sq = &ring->sq; # 1523|-> unsigned int head, next = sq->sqe_tail + 1; # 1524| int shift = 0; # 1525| Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] liburing-2.9/src/setup.c:446:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ liburing-2.9/src/setup.c:587:16: enter_function: entry to ‘io_uring_mlock_size’ liburing-2.9/src/setup.c:593:16: call_function: calling ‘io_uring_mlock_size_params’ from ‘io_uring_mlock_size’ # 444| } else { # 445| if (!(ring->int_flags & INT_FLAG_APP_MEM)) { # 446|-> __sys_munmap(sq->sqes, *sq->kring_entries * sqe_size); # 447| io_uring_unmap_rings(sq, cq); # 448| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] liburing-2.9/test/accept-non-empty.c:100:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fds’ liburing-2.9/test/accept-non-empty.c:196:12: enter_function: entry to ‘test’ liburing-2.9/test/accept-non-empty.c:202:15: call_function: calling ‘test_maccept’ from ‘test’ # 98| pthread_barrier_init(&d->conn_barrier, NULL, 2); # 99| pthread_create(&d->thread, NULL, connect_fn, d); # 100|-> } # 101| # 102| static int test_maccept(struct data *d, int flags, int fixed) Error: GCC_ANALYZER_WARNING (CWE-775): [#def10] liburing-2.9/test/accept.c:186:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor liburing-2.9/test/accept.c:446:12: enter_function: entry to ‘test_accept_many’ liburing-2.9/test/accept.c:457:12: branch_false: following ‘false’ branch... liburing-2.9/test/accept.c:462:9: branch_false: ...to here liburing-2.9/test/accept.c:465:12: branch_false: following ‘false’ branch... liburing-2.9/test/accept.c:470:15: branch_false: ...to here liburing-2.9/test/accept.c:471:9: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:473:15: branch_true: ...to here liburing-2.9/test/accept.c:475:21: branch_true: following ‘true’ branch (when ‘i < nr_socks’)... liburing-2.9/test/accept.c:477:46: branch_true: ...to here liburing-2.9/test/accept.c:476:26: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:476:20: branch_true: ...to here liburing-2.9/test/accept.c:476:26: call_function: calling ‘start_accept_listen’ from ‘test_accept_many’ liburing-2.9/test/accept.c:476:26: return_function: returning to ‘test_accept_many’ from ‘start_accept_listen’ liburing-2.9/test/accept.c:475:21: branch_true: following ‘true’ branch (when ‘i < nr_socks’)... liburing-2.9/test/accept.c:477:46: branch_true: ...to here liburing-2.9/test/accept.c:476:26: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:476:20: branch_true: ...to here liburing-2.9/test/accept.c:476:26: call_function: calling ‘start_accept_listen’ from ‘test_accept_many’ # 184| int fd, ret; # 185| # 186|-> fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC | extra_flags, # 187| IPPROTO_TCP); # 188| Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] liburing-2.9/test/accept.c:186:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_accept_listen(0, 0, 0)’ liburing-2.9/test/accept.c:518:12: enter_function: entry to ‘test_accept_cancel’ liburing-2.9/test/accept.c:529:9: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:531:14: branch_true: ...to here liburing-2.9/test/accept.c:531:14: call_function: calling ‘start_accept_listen’ from ‘test_accept_cancel’ liburing-2.9/test/accept.c:531:14: return_function: returning to ‘test_accept_cancel’ from ‘start_accept_listen’ liburing-2.9/test/accept.c:533:21: branch_false: following ‘false’ branch... liburing-2.9/test/accept.c:544:12: branch_false: ...to here liburing-2.9/test/accept.c:544:12: branch_true: following ‘true’ branch (when ‘usecs != 0’)... liburing-2.9/test/accept.c:545:17: branch_true: ...to here liburing-2.9/test/accept.c:545:17: throw: if ‘usleep’ throws an exception... liburing-2.9/test/accept.c:186:14: danger: ‘start_accept_listen(0, 0, 0)’ leaks here # 184| int fd, ret; # 185| # 186|-> fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC | extra_flags, # 187| IPPROTO_TCP); # 188| Error: GCC_ANALYZER_WARNING (CWE-775): [#def12] liburing-2.9/test/accept.c:186:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_accept_listen(0, i, <unknown>)’ liburing-2.9/test/accept.c:446:12: enter_function: entry to ‘test_accept_many’ liburing-2.9/test/accept.c:457:12: branch_false: following ‘false’ branch... liburing-2.9/test/accept.c:462:9: branch_false: ...to here liburing-2.9/test/accept.c:465:12: branch_false: following ‘false’ branch... liburing-2.9/test/accept.c:470:15: branch_false: ...to here liburing-2.9/test/accept.c:471:9: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:473:15: branch_true: ...to here liburing-2.9/test/accept.c:475:21: branch_true: following ‘true’ branch (when ‘i < nr_socks’)... liburing-2.9/test/accept.c:477:46: branch_true: ...to here liburing-2.9/test/accept.c:476:26: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:476:20: branch_true: ...to here liburing-2.9/test/accept.c:476:26: call_function: calling ‘start_accept_listen’ from ‘test_accept_many’ liburing-2.9/test/accept.c:476:26: return_function: returning to ‘test_accept_many’ from ‘start_accept_listen’ liburing-2.9/test/accept.c:475:21: branch_true: following ‘true’ branch (when ‘i < nr_socks’)... liburing-2.9/test/accept.c:477:46: branch_true: ...to here liburing-2.9/test/accept.c:476:26: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:476:20: branch_true: ...to here liburing-2.9/test/accept.c:476:26: call_function: calling ‘start_accept_listen’ from ‘test_accept_many’ liburing-2.9/test/accept.c:476:26: return_function: returning to ‘test_accept_many’ from ‘start_accept_listen’ liburing-2.9/test/accept.c:186:14: danger: ‘start_accept_listen(0, i, <unknown>)’ leaks here # 184| int fd, ret; # 185| # 186|-> fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC | extra_flags, # 187| IPPROTO_TCP); # 188| Error: GCC_ANALYZER_WARNING (CWE-479): [#def13] liburing-2.9/test/accept.c:406:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler liburing-2.9/test/accept.c:409:12: enter_function: entry to ‘test_accept_pending_on_exit’ liburing-2.9/test/accept.c:417:9: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:419:14: branch_true: ...to here liburing-2.9/test/accept.c:419:14: call_function: calling ‘start_accept_listen’ from ‘test_accept_pending_on_exit’ liburing-2.9/test/accept.c:419:14: return_function: returning to ‘test_accept_pending_on_exit’ from ‘start_accept_listen’ liburing-2.9/test/accept.c:421:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_accept_pending_on_exit’ liburing-2.9/test/accept.c:421:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_accept_pending_on_exit’ liburing-2.9/test/accept.c:424:9: branch_true: following ‘true’ branch... liburing-2.9/test/accept.c:426:9: branch_true: ...to here liburing-2.9/test/accept.c:404:13: enter_function: entry to ‘sig_alrm’ liburing-2.9/test/accept.c:406:9: danger: call to ‘exit’ from within signal handler # 404| static void sig_alrm(int sig) # 405| { # 406|-> exit(0); # 407| } # 408| Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] liburing-2.9/test/buf-ring.c:272:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buffers’ liburing-2.9/test/buf-ring.c:297:12: enter_function: entry to ‘test_running’ liburing-2.9/test/buf-ring.c:307:12: branch_false: following ‘false’ branch... liburing-2.9/test/buf-ring.c:309:17: branch_false: ...to here liburing-2.9/test/buf-ring.c:309:17: branch_false: following ‘false’ branch... liburing-2.9/test/buf-ring.c:312:12: branch_false: ...to here liburing-2.9/test/buf-ring.c:314:20: branch_false: following ‘false’ branch... liburing-2.9/test/buf-ring.c:347:19: branch_false: ...to here liburing-2.9/test/buf-ring.c:347:19: acquire_memory: allocated here liburing-2.9/test/buf-ring.c:348:12: branch_false: following ‘false’ branch (when ‘buffers’ is non-NULL)... liburing-2.9/test/buf-ring.c:351:19: branch_false: ...to here liburing-2.9/test/buf-ring.c:352:12: branch_false: following ‘false’ branch... liburing-2.9/test/buf-ring.c:352:12: branch_false: ...to here liburing-2.9/test/buf-ring.c:355:24: branch_true: following ‘true’ branch (when ‘loop < loops’)... liburing-2.9/test/buf-ring.c:356:17: branch_true: ...to here liburing-2.9/test/buf-ring.c:357:31: branch_false: following ‘false’ branch (when ‘idx >= entries’)... liburing-2.9/test/buf-ring.c:359:17: call_function: inlined call to ‘io_uring_buf_ring_advance’ from ‘test_running’ liburing-2.9/test/buf-ring.c:361:31: branch_false: following ‘false’ branch (when ‘idx >= entries’)... liburing-2.9/test/buf-ring.c:384:23: branch_false: ...to here liburing-2.9/test/buf-ring.c:384:23: call_function: calling ‘test_one_read’ from ‘test_running’ # 270| sqe->flags |= IOSQE_BUFFER_SELECT; # 271| sqe->buf_group = bgid; # 272|-> ret = io_uring_submit(ring); # 273| if (ret <= 0) { # 274| fprintf(stderr, "sqe submit failed: %d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def15] liburing-2.9/test/connect.c:95:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘create_socket()’ liburing-2.9/test/connect.c:214:12: enter_function: entry to ‘test_connect’ liburing-2.9/test/connect.c:220:21: call_function: calling ‘create_socket’ from ‘test_connect’ liburing-2.9/test/connect.c:220:21: return_function: returning to ‘test_connect’ from ‘create_socket’ liburing-2.9/test/connect.c:221:12: branch_false: following ‘false’ branch... liburing-2.9/test/connect.c:224:15: branch_false: ...to here liburing-2.9/test/connect.c:224:15: call_function: calling ‘listen_on_socket’ from ‘test_connect’ # 93| memset(&addr, 0, sizeof(addr)); # 94| addr.sin_family = AF_INET; # 95|-> addr.sin_port = use_port; # 96| addr.sin_addr.s_addr = use_addr; # 97| Error: GCC_ANALYZER_WARNING (CWE-775): [#def16] liburing-2.9/test/fifo-nonblock-read.c:31:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.9/test/fifo-nonblock-read.c:26:12: branch_false: following ‘false’ branch... liburing-2.9/test/fifo-nonblock-read.c:31:17: branch_false: ...to here liburing-2.9/test/fifo-nonblock-read.c:31:17: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/fifo-nonblock-read.c:31:17: danger: ‘fds[0]’ leaks here # 29| } # 30| # 31|-> flags = fcntl(fds[0], F_GETFL, 0); # 32| if (flags < 0) { # 33| perror("fcntl get"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def17] liburing-2.9/test/fifo-nonblock-read.c:31:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.9/test/fifo-nonblock-read.c:26:12: branch_false: following ‘false’ branch... liburing-2.9/test/fifo-nonblock-read.c:31:17: branch_false: ...to here liburing-2.9/test/fifo-nonblock-read.c:31:17: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/fifo-nonblock-read.c:31:17: danger: ‘fds[1]’ leaks here # 29| } # 30| # 31|-> flags = fcntl(fds[0], F_GETFL, 0); # 32| if (flags < 0) { # 33| perror("fcntl get"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def18] liburing-2.9/test/fifo-nonblock-read.c:33:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.9/test/fifo-nonblock-read.c:26:12: branch_false: following ‘false’ branch... liburing-2.9/test/fifo-nonblock-read.c:31:17: branch_false: ...to here liburing-2.9/test/fifo-nonblock-read.c:32:12: branch_true: following ‘true’ branch... liburing-2.9/test/fifo-nonblock-read.c:33:17: branch_true: ...to here liburing-2.9/test/fifo-nonblock-read.c:33:17: throw: if ‘perror’ throws an exception... liburing-2.9/test/fifo-nonblock-read.c:33:17: danger: ‘fds[1]’ leaks here # 31| flags = fcntl(fds[0], F_GETFL, 0); # 32| if (flags < 0) { # 33|-> perror("fcntl get"); # 34| return T_EXIT_FAIL; # 35| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def19] liburing-2.9/test/fifo-nonblock-read.c:37:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.9/test/fifo-nonblock-read.c:26:12: branch_false: following ‘false’ branch... liburing-2.9/test/fifo-nonblock-read.c:31:17: branch_false: ...to here liburing-2.9/test/fifo-nonblock-read.c:32:12: branch_false: following ‘false’ branch... liburing-2.9/test/fifo-nonblock-read.c:36:9: branch_false: ...to here liburing-2.9/test/fifo-nonblock-read.c:37:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/fifo-nonblock-read.c:37:15: danger: ‘fds[1]’ leaks here # 35| } # 36| flags |= O_NONBLOCK; # 37|-> ret = fcntl(fds[0], F_SETFL, flags); # 38| if (ret < 0) { # 39| perror("fcntl set"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def20] liburing-2.9/test/fifo-nonblock-read.c:39:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.9/test/fifo-nonblock-read.c:26:12: branch_false: following ‘false’ branch... liburing-2.9/test/fifo-nonblock-read.c:31:17: branch_false: ...to here liburing-2.9/test/fifo-nonblock-read.c:32:12: branch_false: following ‘false’ branch... liburing-2.9/test/fifo-nonblock-read.c:36:9: branch_false: ...to here liburing-2.9/test/fifo-nonblock-read.c:38:12: branch_true: following ‘true’ branch... liburing-2.9/test/fifo-nonblock-read.c:39:17: branch_true: ...to here liburing-2.9/test/fifo-nonblock-read.c:39:17: throw: if ‘perror’ throws an exception... liburing-2.9/test/fifo-nonblock-read.c:39:17: danger: ‘fds[1]’ leaks here # 37| ret = fcntl(fds[0], F_SETFL, flags); # 38| if (ret < 0) { # 39|-> perror("fcntl set"); # 40| return T_EXIT_FAIL; # 41| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def21] liburing-2.9/test/file-register.c:832:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘reg_fds[0]’ liburing-2.9/test/file-register.c:814:12: branch_false: following ‘false’ branch... liburing-2.9/test/file-register.c:818:13: branch_false: ...to here liburing-2.9/test/file-register.c:818:12: branch_false: following ‘false’ branch... liburing-2.9/test/file-register.c:827:22: branch_false: ...to here liburing-2.9/test/file-register.c:832:15: throw: if ‘io_uring_register_files’ throws an exception... liburing-2.9/test/file-register.c:832:15: danger: ‘reg_fds[0]’ leaks here # 830| reg_fds[3] = ring.ring_fd; # 831| reg_fds[4] = -1; # 832|-> ret = io_uring_register_files(&ring, reg_fds, 5); # 833| if (!ret) { # 834| fprintf(stderr, "file_register unexpectedly succeeded\n"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def22] liburing-2.9/test/file-register.c:832:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘reg_fds[1]’ liburing-2.9/test/file-register.c:814:12: branch_false: following ‘false’ branch... liburing-2.9/test/file-register.c:818:13: branch_false: ...to here liburing-2.9/test/file-register.c:818:12: branch_false: following ‘false’ branch... liburing-2.9/test/file-register.c:827:22: branch_false: ...to here liburing-2.9/test/file-register.c:832:15: throw: if ‘io_uring_register_files’ throws an exception... liburing-2.9/test/file-register.c:832:15: danger: ‘reg_fds[1]’ leaks here # 830| reg_fds[3] = ring.ring_fd; # 831| reg_fds[4] = -1; # 832|-> ret = io_uring_register_files(&ring, reg_fds, 5); # 833| if (!ret) { # 834| fprintf(stderr, "file_register unexpectedly succeeded\n"); Error: GCC_ANALYZER_WARNING (CWE-476): [#def23] liburing-2.9/test/futex.c:412:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘futex’ liburing-2.9/test/futex.c:408:12: branch_false: following ‘false’ branch... liburing-2.9/test/futex.c:411:17: branch_false: ...to here liburing-2.9/test/futex.c:411:17: acquire_memory: this call could return NULL liburing-2.9/test/futex.c:412:9: danger: ‘futex’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2) # 410| # 411| futex = malloc(sizeof(*futex)); # 412|-> *futex = 0; # 413| # 414| sqe = io_uring_get_sqe(&ring); Error: GCC_ANALYZER_WARNING (CWE-476): [#def24] liburing-2.9/test/futex.c:433:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ liburing-2.9/test/futex.c:398:12: enter_function: entry to ‘test_invalid’ liburing-2.9/test/futex.c:408:12: branch_false: following ‘false’ branch... liburing-2.9/test/futex.c:411:17: branch_false: ...to here liburing-2.9/test/futex.c:414:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:414:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:421:15: call_function: calling ‘io_uring_wait_cqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:421:15: return_function: returning to ‘test_invalid’ from ‘io_uring_wait_cqe’ liburing-2.9/test/futex.c:426:12: branch_false: following ‘false’ branch... liburing-2.9/test/futex.c:430:9: call_function: inlined call to ‘io_uring_cqe_seen’ from ‘test_invalid’ liburing-2.9/test/futex.c:432:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:432:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:433:9: danger: dereference of NULL ‘_io_uring_get_sqe(&ring)’ # 431| # 432| sqe = io_uring_get_sqe(&ring); # 433|-> sqe->user_data = 1; # 434| io_uring_prep_futex_wake(sqe, futex, 0, FUTEX_BITSET_MATCH_ANY, 0x1000, # 435| 0); Error: GCC_ANALYZER_WARNING (CWE-476): [#def25] liburing-2.9/test/futex.c:456:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ liburing-2.9/test/futex.c:398:12: enter_function: entry to ‘test_invalid’ liburing-2.9/test/futex.c:408:12: branch_false: following ‘false’ branch... liburing-2.9/test/futex.c:411:17: branch_false: ...to here liburing-2.9/test/futex.c:414:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:414:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:421:15: call_function: calling ‘io_uring_wait_cqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:421:15: return_function: returning to ‘test_invalid’ from ‘io_uring_wait_cqe’ liburing-2.9/test/futex.c:426:12: branch_false: following ‘false’ branch... liburing-2.9/test/futex.c:430:9: call_function: inlined call to ‘io_uring_cqe_seen’ from ‘test_invalid’ liburing-2.9/test/futex.c:432:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:432:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:439:15: call_function: calling ‘io_uring_wait_cqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:439:15: return_function: returning to ‘test_invalid’ from ‘io_uring_wait_cqe’ liburing-2.9/test/futex.c:444:12: branch_false: following ‘false’ branch... liburing-2.9/test/futex.c:448:9: call_function: inlined call to ‘io_uring_cqe_seen’ from ‘test_invalid’ liburing-2.9/test/futex.c:455:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:455:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_invalid’ liburing-2.9/test/futex.c:456:9: danger: dereference of NULL ‘_io_uring_get_sqe(&ring)’ # 454| # 455| sqe = io_uring_get_sqe(&ring); # 456|-> sqe->user_data = 1; # 457| io_uring_prep_futex_waitv(sqe, &fw, 1, 0); # 458| Error: GCC_ANALYZER_WARNING (CWE-775): [#def26] liburing-2.9/test/pipe-bug.c:37:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.9/test/pipe-bug.c:37:9: branch_false: following ‘false’ branch... liburing-2.9/test/pipe-bug.c:39:9: branch_false: ...to here liburing-2.9/test/pipe-bug.c:37:9: danger: ‘fds[0]’ leaks here # 35| }; # 36| # 37|-> CHECK(pipe(fds) == 0); # 38| # 39| memset(&p, 0, sizeof(p)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def27] liburing-2.9/test/pipe-bug.c:37:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.9/test/pipe-bug.c:37:9: branch_false: following ‘false’ branch... liburing-2.9/test/pipe-bug.c:39:9: branch_false: ...to here liburing-2.9/test/pipe-bug.c:37:9: danger: ‘fds[1]’ leaks here # 35| }; # 36| # 37|-> CHECK(pipe(fds) == 0); # 38| # 39| memset(&p, 0, sizeof(p)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def28] liburing-2.9/test/pipe-bug.c:37:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[i]’ liburing-2.9/test/pipe-bug.c:82:5: enter_function: entry to ‘main’ liburing-2.9/test/pipe-bug.c:86:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/pipe-bug.c:86:12: branch_false: ...to here liburing-2.9/test/pipe-bug.c:89:21: branch_true: following ‘true’ branch (when ‘i != 10000’)... liburing-2.9/test/pipe-bug.c:90:21: branch_true: ...to here liburing-2.9/test/pipe-bug.c:90:21: call_function: calling ‘pipe_bug’ from ‘main’ # 35| }; # 36| # 37|-> CHECK(pipe(fds) == 0); # 38| # 39| memset(&p, 0, sizeof(p)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def29] liburing-2.9/test/pipe-bug.c:40:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.9/test/pipe-bug.c:37:9: branch_false: following ‘false’ branch... liburing-2.9/test/pipe-bug.c:39:9: branch_false: ...to here liburing-2.9/test/pipe-bug.c:40:9: throw: if ‘t_create_ring_params’ throws an exception... liburing-2.9/test/pipe-bug.c:40:9: danger: ‘fds[0]’ leaks here # 38| # 39| memset(&p, 0, sizeof(p)); # 40|-> CHECK(t_create_ring_params(8, &ring, &p) == 0); # 41| # 42| /* WRITE */ Error: GCC_ANALYZER_WARNING (CWE-775): [#def30] liburing-2.9/test/pipe-bug.c:40:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.9/test/pipe-bug.c:37:9: branch_false: following ‘false’ branch... liburing-2.9/test/pipe-bug.c:39:9: branch_false: ...to here liburing-2.9/test/pipe-bug.c:40:9: throw: if ‘t_create_ring_params’ throws an exception... liburing-2.9/test/pipe-bug.c:40:9: danger: ‘fds[1]’ leaks here # 38| # 39| memset(&p, 0, sizeof(p)); # 40|-> CHECK(t_create_ring_params(8, &ring, &p) == 0); # 41| # 42| /* WRITE */ Error: GCC_ANALYZER_WARNING (CWE-775): [#def31] liburing-2.9/test/pipe-bug.c:40:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[i]’ liburing-2.9/test/pipe-bug.c:82:5: enter_function: entry to ‘main’ liburing-2.9/test/pipe-bug.c:86:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/pipe-bug.c:86:12: branch_false: ...to here liburing-2.9/test/pipe-bug.c:89:21: branch_true: following ‘true’ branch (when ‘i != 10000’)... liburing-2.9/test/pipe-bug.c:90:21: branch_true: ...to here liburing-2.9/test/pipe-bug.c:90:21: call_function: calling ‘pipe_bug’ from ‘main’ # 38| # 39| memset(&p, 0, sizeof(p)); # 40|-> CHECK(t_create_ring_params(8, &ring, &p) == 0); # 41| # 42| /* WRITE */ Error: GCC_ANALYZER_WARNING (CWE-775): [#def32] liburing-2.9/test/pipe-eof.c:50:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fds[0]’ liburing-2.9/test/pipe-eof.c:44:12: branch_false: following ‘false’ branch... liburing-2.9/test/pipe-eof.c:48:9: branch_false: ...to here liburing-2.9/test/pipe-eof.c:50:9: throw: if ‘io_uring_queue_init’ throws an exception... liburing-2.9/test/pipe-eof.c:50:9: danger: ‘d.fds[0]’ leaks here # 48| d.str = buf; # 49| # 50|-> io_uring_queue_init(8, &ring, 0); # 51| # 52| pthread_create(&thread, NULL, t, &d); Error: GCC_ANALYZER_WARNING (CWE-775): [#def33] liburing-2.9/test/pipe-eof.c:50:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fds[1]’ liburing-2.9/test/pipe-eof.c:44:12: branch_false: following ‘false’ branch... liburing-2.9/test/pipe-eof.c:48:9: branch_false: ...to here liburing-2.9/test/pipe-eof.c:50:9: throw: if ‘io_uring_queue_init’ throws an exception... liburing-2.9/test/pipe-eof.c:50:9: danger: ‘d.fds[1]’ leaks here # 48| d.str = buf; # 49| # 50|-> io_uring_queue_init(8, &ring, 0); # 51| # 52| pthread_create(&thread, NULL, t, &d); Error: GCC_ANALYZER_WARNING (CWE-775): [#def34] liburing-2.9/test/read-mshot.c:59:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.9/test/read-mshot.c:58:12: branch_false: following ‘false’ branch... liburing-2.9/test/read-mshot.c:61:9: branch_false: ...to here liburing-2.9/test/read-mshot.c:63:12: branch_false: following ‘false’ branch... liburing-2.9/test/read-mshot.c:68:13: branch_false: ...to here liburing-2.9/test/read-mshot.c:68:12: branch_false: following ‘false’ branch... liburing-2.9/test/read-mshot.c:73:13: branch_false: ...to here liburing-2.9/test/read-mshot.c:59:24: danger: ‘fds[0]’ leaks here # 57| # 58| if (no_buf_ring) # 59|-> return 0; # 60| # 61| p.flags = flags; Error: GCC_ANALYZER_WARNING (CWE-775): [#def35] liburing-2.9/test/read-mshot.c:59:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.9/test/read-mshot.c:58:12: branch_false: following ‘false’ branch... liburing-2.9/test/read-mshot.c:61:9: branch_false: ...to here liburing-2.9/test/read-mshot.c:63:12: branch_false: following ‘false’ branch... liburing-2.9/test/read-mshot.c:68:13: branch_false: ...to here liburing-2.9/test/read-mshot.c:68:12: branch_false: following ‘false’ branch... liburing-2.9/test/read-mshot.c:73:13: branch_false: ...to here liburing-2.9/test/read-mshot.c:59:24: danger: ‘fds[1]’ leaks here # 57| # 58| if (no_buf_ring) # 59|-> return 0; # 60| # 61| p.flags = flags; Error: GCC_ANALYZER_WARNING (CWE-775): [#def36] liburing-2.9/test/ring-leak.c:196:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘reg_fds[0]’ liburing-2.9/test/ring-leak.c:163:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:167:15: branch_false: ...to here liburing-2.9/test/ring-leak.c:168:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:172:13: branch_false: ...to here liburing-2.9/test/ring-leak.c:172:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:176:15: branch_false: ...to here liburing-2.9/test/ring-leak.c:177:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:181:12: branch_false: ...to here liburing-2.9/test/ring-leak.c:182:29: branch_true: following ‘true’ branch (when ‘i != 4’)... liburing-2.9/test/ring-leak.c:183:25: branch_true: ...to here liburing-2.9/test/ring-leak.c:185:20: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:191:22: branch_false: ...to here liburing-2.9/test/ring-leak.c:195:12: branch_true: following ‘true’ branch (when ‘update != 0’)... liburing-2.9/test/ring-leak.c:196:23: branch_true: ...to here liburing-2.9/test/ring-leak.c:196:23: throw: if ‘io_uring_register_files_update’ throws an exception... liburing-2.9/test/ring-leak.c:196:23: danger: ‘reg_fds[0]’ leaks here # 194| reg_fds[3] = sp[1]; # 195| if (update) { # 196|-> ret = io_uring_register_files_update(&ring, 0, reg_fds, 4); # 197| if (ret != 4) { # 198| fprintf(stderr, "file_register: %d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def37] liburing-2.9/test/ring-leak.c:196:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘reg_fds[1]’ liburing-2.9/test/ring-leak.c:163:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:167:15: branch_false: ...to here liburing-2.9/test/ring-leak.c:168:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:172:13: branch_false: ...to here liburing-2.9/test/ring-leak.c:172:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:176:15: branch_false: ...to here liburing-2.9/test/ring-leak.c:177:12: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:181:12: branch_false: ...to here liburing-2.9/test/ring-leak.c:182:29: branch_true: following ‘true’ branch (when ‘i != 4’)... liburing-2.9/test/ring-leak.c:183:25: branch_true: ...to here liburing-2.9/test/ring-leak.c:185:20: branch_false: following ‘false’ branch... liburing-2.9/test/ring-leak.c:191:22: branch_false: ...to here liburing-2.9/test/ring-leak.c:195:12: branch_true: following ‘true’ branch (when ‘update != 0’)... liburing-2.9/test/ring-leak.c:196:23: branch_true: ...to here liburing-2.9/test/ring-leak.c:196:23: throw: if ‘io_uring_register_files_update’ throws an exception... liburing-2.9/test/ring-leak.c:196:23: danger: ‘reg_fds[1]’ leaks here # 194| reg_fds[3] = sp[1]; # 195| if (update) { # 196|-> ret = io_uring_register_files_update(&ring, 0, reg_fds, 4); # 197| if (ret != 4) { # 198| fprintf(stderr, "file_register: %d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] liburing-2.9/test/rsrc_tags.c:30:9: warning[-Wanalyzer-malloc-leak]: leak of ‘tags’ liburing-2.9/test/rsrc_tags.c:316:12: enter_function: entry to ‘test_files’ liburing-2.9/test/rsrc_tags.c:325:21: branch_true: following ‘true’ branch (when ‘i != 50’)... liburing-2.9/test/rsrc_tags.c:326:28: branch_true: ...to here liburing-2.9/test/rsrc_tags.c:330:15: call_function: calling ‘test_tags_generic’ from ‘test_files’ # 28| int ret; # 29| # 30|-> usleep(1000); /* doesn't happen immediately, so wait */ # 31| ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */ # 32| return ret == -EAGAIN; Error: GCC_ANALYZER_WARNING (CWE-775): [#def39] liburing-2.9/test/send-zerocopy.c:331:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’ liburing-2.9/test/send-zerocopy.c:838:12: enter_function: entry to ‘run_basic_tests’ liburing-2.9/test/send-zerocopy.c:844:15: call_function: calling ‘create_socketpair_ip’ from ‘run_basic_tests’ # 329| } # 330| if (*sock_client < 0) { # 331|-> perror("socket"); # 332| return 1; # 333| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def40] liburing-2.9/test/send-zerocopy.c:335:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock_tx’ liburing-2.9/test/send-zerocopy.c:742:12: enter_function: entry to ‘test_sendzc_report’ liburing-2.9/test/send-zerocopy.c:750:15: call_function: calling ‘create_socketpair_ip’ from ‘test_sendzc_report’ # 333| } # 334| if (client_connect) { # 335|-> ret = connect(*sock_client, (struct sockaddr *)addr, addr_size); # 336| if (ret < 0) { # 337| perror("connect"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def41] liburing-2.9/test/send-zerocopy.c:335:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’ liburing-2.9/test/send-zerocopy.c:838:12: enter_function: entry to ‘run_basic_tests’ liburing-2.9/test/send-zerocopy.c:844:15: call_function: calling ‘create_socketpair_ip’ from ‘run_basic_tests’ # 333| } # 334| if (client_connect) { # 335|-> ret = connect(*sock_client, (struct sockaddr *)addr, addr_size); # 336| if (ret < 0) { # 337| perror("connect"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def42] liburing-2.9/test/send-zerocopy.c:335:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sp[0]’ liburing-2.9/test/send-zerocopy.c:838:12: enter_function: entry to ‘run_basic_tests’ liburing-2.9/test/send-zerocopy.c:844:15: call_function: calling ‘create_socketpair_ip’ from ‘run_basic_tests’ # 333| } # 334| if (client_connect) { # 335|-> ret = connect(*sock_client, (struct sockaddr *)addr, addr_size); # 336| if (ret < 0) { # 337| perror("connect"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def43] liburing-2.9/test/send-zerocopy.c:337:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’ liburing-2.9/test/send-zerocopy.c:838:12: enter_function: entry to ‘run_basic_tests’ liburing-2.9/test/send-zerocopy.c:844:15: call_function: calling ‘create_socketpair_ip’ from ‘run_basic_tests’ # 335| ret = connect(*sock_client, (struct sockaddr *)addr, addr_size); # 336| if (ret < 0) { # 337|-> perror("connect"); # 338| return 1; # 339| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def44] liburing-2.9/test/send-zerocopy.c:359:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’ liburing-2.9/test/send-zerocopy.c:838:12: enter_function: entry to ‘run_basic_tests’ liburing-2.9/test/send-zerocopy.c:844:15: call_function: calling ‘create_socketpair_ip’ from ‘run_basic_tests’ # 357| } # 358| if (tcp) { # 359|-> *sock_server = accept(listen_sock, NULL, NULL); # 360| if (!*sock_server) { # 361| fprintf(stderr, "can't accept\n"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def45] liburing-2.9/test/send-zerocopy.c:367:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’ liburing-2.9/test/send-zerocopy.c:838:12: enter_function: entry to ‘run_basic_tests’ liburing-2.9/test/send-zerocopy.c:844:15: call_function: calling ‘create_socketpair_ip’ from ‘run_basic_tests’ # 365| } # 366| return 0; # 367|-> } # 368| # 369| struct send_conf { Error: GCC_ANALYZER_WARNING (CWE-775): [#def46] liburing-2.9/test/shutdown.c:61:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/shutdown.c:38:15: branch_false: ...to here liburing-2.9/test/shutdown.c:40:19: acquire_resource: socket created here liburing-2.9/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:44:15: branch_true: ...to here liburing-2.9/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:47:9: branch_true: ...to here liburing-2.9/test/shutdown.c:51:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:52:15: branch_true: ...to here liburing-2.9/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:55:19: branch_true: ...to here liburing-2.9/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:61:25: branch_true: ...to here liburing-2.9/test/shutdown.c:61:25: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/shutdown.c:61:25: danger: ‘recv_s0’ leaks here # 59| assert(ret != -1); # 60| # 61|-> int32_t flags = fcntl(p_fd[1], F_GETFL, 0); # 62| assert(flags != -1); # 63| Error: GCC_ANALYZER_WARNING (CWE-775): [#def47] liburing-2.9/test/shutdown.c:65:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/shutdown.c:38:15: branch_false: ...to here liburing-2.9/test/shutdown.c:40:19: acquire_resource: socket created here liburing-2.9/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:44:15: branch_true: ...to here liburing-2.9/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:47:9: branch_true: ...to here liburing-2.9/test/shutdown.c:51:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:52:15: branch_true: ...to here liburing-2.9/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:55:19: branch_true: ...to here liburing-2.9/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:61:25: branch_true: ...to here liburing-2.9/test/shutdown.c:62:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:64:9: branch_true: ...to here liburing-2.9/test/shutdown.c:65:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/shutdown.c:65:15: danger: ‘recv_s0’ leaks here # 63| # 64| flags |= O_NONBLOCK; # 65|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 66| assert(ret != -1); # 67| Error: GCC_ANALYZER_WARNING (CWE-775): [#def48] liburing-2.9/test/shutdown.c:71:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/shutdown.c:38:15: branch_false: ...to here liburing-2.9/test/shutdown.c:40:19: acquire_resource: socket created here liburing-2.9/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:44:15: branch_true: ...to here liburing-2.9/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:47:9: branch_true: ...to here liburing-2.9/test/shutdown.c:51:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:52:15: branch_true: ...to here liburing-2.9/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:55:19: branch_true: ...to here liburing-2.9/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:61:25: branch_true: ...to here liburing-2.9/test/shutdown.c:62:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:64:9: branch_true: ...to here liburing-2.9/test/shutdown.c:66:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:68:15: branch_true: ...to here liburing-2.9/test/shutdown.c:69:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:71:17: branch_true: ...to here liburing-2.9/test/shutdown.c:71:17: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/shutdown.c:71:17: danger: ‘recv_s0’ leaks here # 69| assert(ret == -1); # 70| # 71|-> flags = fcntl(p_fd[1], F_GETFL, 0); # 72| assert(flags != -1); # 73| Error: GCC_ANALYZER_WARNING (CWE-775): [#def49] liburing-2.9/test/shutdown.c:75:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/shutdown.c:38:15: branch_false: ...to here liburing-2.9/test/shutdown.c:40:19: acquire_resource: socket created here liburing-2.9/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:44:15: branch_true: ...to here liburing-2.9/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:47:9: branch_true: ...to here liburing-2.9/test/shutdown.c:51:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:52:15: branch_true: ...to here liburing-2.9/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:55:19: branch_true: ...to here liburing-2.9/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/shutdown.c:61:25: branch_true: ...to here liburing-2.9/test/shutdown.c:62:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:64:9: branch_true: ...to here liburing-2.9/test/shutdown.c:66:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:68:15: branch_true: ...to here liburing-2.9/test/shutdown.c:69:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:71:17: branch_true: ...to here liburing-2.9/test/shutdown.c:72:9: branch_true: following ‘true’ branch... liburing-2.9/test/shutdown.c:74:9: branch_true: ...to here liburing-2.9/test/shutdown.c:75:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/shutdown.c:75:15: danger: ‘recv_s0’ leaks here # 73| # 74| flags &= ~O_NONBLOCK; # 75|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 76| assert(ret != -1); # 77| Error: GCC_ANALYZER_WARNING (CWE-775): [#def50] liburing-2.9/test/socket-nb.c:54:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-nb.c:33:19: acquire_resource: socket created here liburing-2.9/test/socket-nb.c:37:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:38:15: branch_true: ...to here liburing-2.9/test/socket-nb.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:41:9: branch_true: ...to here liburing-2.9/test/socket-nb.c:44:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-nb.c:45:15: branch_true: ...to here liburing-2.9/test/socket-nb.c:46:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:48:19: branch_true: ...to here liburing-2.9/test/socket-nb.c:52:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:54:17: branch_true: ...to here liburing-2.9/test/socket-nb.c:54:17: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-nb.c:54:17: danger: ‘recv_s0’ leaks here # 52| assert(ret != -1); # 53| # 54|-> flags = fcntl(p_fd[1], F_GETFL, 0); # 55| assert(flags != -1); # 56| Error: GCC_ANALYZER_WARNING (CWE-775): [#def51] liburing-2.9/test/socket-nb.c:58:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-nb.c:33:19: acquire_resource: socket created here liburing-2.9/test/socket-nb.c:37:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:38:15: branch_true: ...to here liburing-2.9/test/socket-nb.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:41:9: branch_true: ...to here liburing-2.9/test/socket-nb.c:44:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-nb.c:45:15: branch_true: ...to here liburing-2.9/test/socket-nb.c:46:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:48:19: branch_true: ...to here liburing-2.9/test/socket-nb.c:52:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-nb.c:54:17: branch_true: ...to here liburing-2.9/test/socket-nb.c:55:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-nb.c:57:9: branch_true: ...to here liburing-2.9/test/socket-nb.c:58:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-nb.c:58:15: danger: ‘recv_s0’ leaks here # 56| # 57| flags |= O_NONBLOCK; # 58|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 59| assert(ret != -1); # 60| Error: GCC_ANALYZER_WARNING (CWE-775): [#def52] liburing-2.9/test/socket-rw-eagain.c:56:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw-eagain.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw-eagain.c:34:15: branch_false: ...to here liburing-2.9/test/socket-rw-eagain.c:36:19: acquire_resource: socket created here liburing-2.9/test/socket-rw-eagain.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:40:15: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:43:9: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:46:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-eagain.c:47:15: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:48:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:50:19: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:54:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:56:25: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:56:25: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw-eagain.c:56:25: danger: ‘recv_s0’ leaks here # 54| assert(ret != -1); # 55| # 56|-> int32_t flags = fcntl(p_fd[1], F_GETFL, 0); # 57| assert(flags != -1); # 58| Error: GCC_ANALYZER_WARNING (CWE-775): [#def53] liburing-2.9/test/socket-rw-eagain.c:60:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw-eagain.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw-eagain.c:34:15: branch_false: ...to here liburing-2.9/test/socket-rw-eagain.c:36:19: acquire_resource: socket created here liburing-2.9/test/socket-rw-eagain.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:40:15: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:43:9: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:46:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-eagain.c:47:15: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:48:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:50:19: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:54:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-eagain.c:56:25: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:57:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-eagain.c:59:9: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:60:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw-eagain.c:60:15: danger: ‘recv_s0’ leaks here # 58| # 59| flags |= O_NONBLOCK; # 60|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 61| assert(ret != -1); # 62| Error: GCC_ANALYZER_WARNING (CWE-835): [#def54] liburing-2.9/test/socket-rw-eagain.c:128:16: warning[-Wanalyzer-infinite-loop]: infinite loop liburing-2.9/test/socket-rw-eagain.c:128:16: danger: infinite loop here liburing-2.9/test/socket-rw-eagain.c:128:16: branch_true: when ‘count != 2’: always following ‘true’ branch... liburing-2.9/test/socket-rw-eagain.c:129:17: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:129:17: branch_true: if it ever follows ‘true’ branch, it will always do so... liburing-2.9/test/socket-rw-eagain.c:129:17: branch_true: ...to here liburing-2.9/test/socket-rw-eagain.c:129:17: branch_false: when ‘cqe’ is NULL: always following ‘false’ branch... liburing-2.9/test/socket-rw-eagain.c:140:17: branch_false: ...to here liburing-2.9/test/socket-rw-eagain.c:140:17: branch_true: when ‘count <= 2’: always following ‘true’ branch... liburing-2.9/test/socket-rw-eagain.c:141:17: branch_true: ...to here # 126| uint32_t count = 0; # 127| # 128|-> while (count != 2) { # 129| io_uring_for_each_cqe(&m_io_uring, head, cqe) { # 130| if (cqe->user_data == 2 && cqe->res != 128) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def55] liburing-2.9/test/socket-rw-offset.c:59:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw-offset.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw-offset.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:59:25: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw-offset.c:59:25: danger: ‘recv_s0’ leaks here # 57| assert(ret != -1); # 58| # 59|-> int32_t flags = fcntl(p_fd[1], F_GETFL, 0); # 60| assert(flags != -1); # 61| Error: GCC_ANALYZER_WARNING (CWE-775): [#def56] liburing-2.9/test/socket-rw-offset.c:63:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw-offset.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw-offset.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:60:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:62:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:63:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw-offset.c:63:15: danger: ‘recv_s0’ leaks here # 61| # 62| flags |= O_NONBLOCK; # 63|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 64| assert(ret != -1); # 65| Error: GCC_ANALYZER_WARNING (CWE-775): [#def57] liburing-2.9/test/socket-rw-offset.c:69:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw-offset.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw-offset.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:60:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:62:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:64:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:66:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:67:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:69:17: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:69:17: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw-offset.c:69:17: danger: ‘recv_s0’ leaks here # 67| assert(ret == -1); # 68| # 69|-> flags = fcntl(p_fd[1], F_GETFL, 0); # 70| assert(flags != -1); # 71| Error: GCC_ANALYZER_WARNING (CWE-775): [#def58] liburing-2.9/test/socket-rw-offset.c:73:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw-offset.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw-offset.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw-offset.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:60:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:62:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:64:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:66:15: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:67:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:69:17: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:70:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:72:9: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:73:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw-offset.c:73:15: danger: ‘recv_s0’ leaks here # 71| # 72| flags &= ~O_NONBLOCK; # 73|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 74| assert(ret != -1); # 75| Error: GCC_ANALYZER_WARNING (CWE-835): [#def59] liburing-2.9/test/socket-rw-offset.c:131:16: warning[-Wanalyzer-infinite-loop]: infinite loop liburing-2.9/test/socket-rw-offset.c:131:16: danger: infinite loop here liburing-2.9/test/socket-rw-offset.c:131:16: branch_true: when ‘count != 2’: always following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:132:17: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:132:17: branch_true: if it ever follows ‘true’ branch, it will always do so... liburing-2.9/test/socket-rw-offset.c:132:17: branch_true: ...to here liburing-2.9/test/socket-rw-offset.c:132:17: branch_false: when ‘cqe’ is NULL: always following ‘false’ branch... liburing-2.9/test/socket-rw-offset.c:142:17: branch_false: ...to here liburing-2.9/test/socket-rw-offset.c:142:17: branch_true: when ‘count <= 2’: always following ‘true’ branch... liburing-2.9/test/socket-rw-offset.c:143:17: branch_true: ...to here # 129| # 130| ret = 0; # 131|-> while (count != 2) { # 132| io_uring_for_each_cqe(&m_io_uring, head, cqe) { # 133| if (cqe->res != 128) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def60] liburing-2.9/test/socket-rw.c:59:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw.c:59:25: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw.c:59:25: danger: ‘recv_s0’ leaks here # 57| assert(ret != -1); # 58| # 59|-> int32_t flags = fcntl(p_fd[1], F_GETFL, 0); # 60| assert(flags != -1); # 61| Error: GCC_ANALYZER_WARNING (CWE-775): [#def61] liburing-2.9/test/socket-rw.c:63:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw.c:60:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:62:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:63:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw.c:63:15: danger: ‘recv_s0’ leaks here # 61| # 62| flags |= O_NONBLOCK; # 63|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 64| assert(ret != -1); # 65| Error: GCC_ANALYZER_WARNING (CWE-775): [#def62] liburing-2.9/test/socket-rw.c:69:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw.c:60:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:62:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:64:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:66:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:67:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:69:17: branch_true: ...to here liburing-2.9/test/socket-rw.c:69:17: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw.c:69:17: danger: ‘recv_s0’ leaks here # 67| assert(ret == -1); # 68| # 69|-> flags = fcntl(p_fd[1], F_GETFL, 0); # 70| assert(flags != -1); # 71| Error: GCC_ANALYZER_WARNING (CWE-775): [#def63] liburing-2.9/test/socket-rw.c:73:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.9/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.9/test/socket-rw.c:36:15: branch_false: ...to here liburing-2.9/test/socket-rw.c:38:19: acquire_resource: socket created here liburing-2.9/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:42:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:45:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:48:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:49:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:53:19: branch_true: ...to here liburing-2.9/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.9/test/socket-rw.c:59:25: branch_true: ...to here liburing-2.9/test/socket-rw.c:60:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:62:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:64:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:66:15: branch_true: ...to here liburing-2.9/test/socket-rw.c:67:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:69:17: branch_true: ...to here liburing-2.9/test/socket-rw.c:70:9: branch_true: following ‘true’ branch... liburing-2.9/test/socket-rw.c:72:9: branch_true: ...to here liburing-2.9/test/socket-rw.c:73:15: throw: if ‘fcntl’ throws an exception... liburing-2.9/test/socket-rw.c:73:15: danger: ‘recv_s0’ leaks here # 71| # 72| flags &= ~O_NONBLOCK; # 73|-> ret = fcntl(p_fd[1], F_SETFL, flags); # 74| assert(ret != -1); # 75| Error: GCC_ANALYZER_WARNING (CWE-835): [#def64] liburing-2.9/test/socket-rw.c:125:16: warning[-Wanalyzer-infinite-loop]: infinite loop liburing-2.9/test/socket-rw.c:125:16: danger: infinite loop here liburing-2.9/test/socket-rw.c:125:16: branch_true: when ‘count != 2’: always following ‘true’ branch... liburing-2.9/test/socket-rw.c:126:17: branch_true: ...to here liburing-2.9/test/socket-rw.c:126:17: branch_true: if it ever follows ‘true’ branch, it will always do so... liburing-2.9/test/socket-rw.c:126:17: branch_true: ...to here liburing-2.9/test/socket-rw.c:126:17: branch_false: when ‘cqe’ is NULL: always following ‘false’ branch... liburing-2.9/test/socket-rw.c:131:17: branch_false: ...to here liburing-2.9/test/socket-rw.c:131:17: branch_true: when ‘count <= 2’: always following ‘true’ branch... liburing-2.9/test/socket-rw.c:132:17: branch_true: ...to here # 123| uint32_t count = 0; # 124| # 125|-> while (count != 2) { # 126| io_uring_for_each_cqe(&m_io_uring, head, cqe) { # 127| assert(cqe->res == 128); Error: GCC_ANALYZER_WARNING (CWE-775): [#def65] liburing-2.9/test/socket.c:187:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.9/test/socket.c:181:18: acquire_resource: datagram socket created here liburing-2.9/test/socket.c:182:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.9/test/socket.c:187:15: branch_false: ...to here liburing-2.9/test/socket.c:187:15: throw: if ‘connect’ throws an exception... liburing-2.9/test/socket.c:187:15: danger: ‘sockfd’ leaks here # 185| } # 186| # 187|-> ret = connect(sockfd, (struct sockaddr *)saddr, sizeof(*saddr)); # 188| if (ret < 0) { # 189| perror("connect");
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-54.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | liburing-2.13-1.fc44 |
| diffbase-store-results-to | /tmp/tmpeajeqw92/liburing-2.13-1.fc44.tar.xz |
| diffbase-time-created | 2026-01-08 19:23:37 |
| diffbase-time-finished | 2026-01-08 19:25:33 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpeajeqw92/liburing-2.13-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpeajeqw92/liburing-2.13-1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-54.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | liburing-2.9-2.fc43 |
| store-results-to | /tmp/tmp20fjtfr1/liburing-2.9-2.fc43.tar.xz |
| time-created | 2026-01-08 19:20:50 |
| time-finished | 2026-01-08 19:23:07 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp20fjtfr1/liburing-2.9-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp20fjtfr1/liburing-2.9-2.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |