Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] liburing-2.12/examples/reg-wait.c:96:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.12/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/examples/reg-wait.c:74:21: branch_false: ...to here liburing-2.12/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)... liburing-2.12/examples/reg-wait.c:80:13: branch_false: ...to here liburing-2.12/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch... liburing-2.12/examples/reg-wait.c:85:15: branch_false: ...to here liburing-2.12/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch... liburing-2.12/examples/reg-wait.c:96:15: branch_false: ...to here liburing-2.12/examples/reg-wait.c:96:15: danger: ‘fds[0]’ leaks here # 94| * the rest of the memory can be reused for other purposes. # 95| */ # 96|-> reg = t_aligned_alloc(page_size, page_size); # 97| if (!reg) { # 98| fprintf(stderr, "allocation failed\n"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] liburing-2.12/examples/reg-wait.c:96:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.12/examples/reg-wait.c:69:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/examples/reg-wait.c:74:21: branch_false: ...to here liburing-2.12/examples/reg-wait.c:75:12: branch_false: following ‘false’ branch (when ‘page_size >= 0’)... liburing-2.12/examples/reg-wait.c:80:13: branch_false: ...to here liburing-2.12/examples/reg-wait.c:80:12: branch_false: following ‘false’ branch... liburing-2.12/examples/reg-wait.c:85:15: branch_false: ...to here liburing-2.12/examples/reg-wait.c:86:12: branch_false: following ‘false’ branch... liburing-2.12/examples/reg-wait.c:96:15: branch_false: ...to here liburing-2.12/examples/reg-wait.c:96:15: danger: ‘fds[1]’ leaks here # 94| * the rest of the memory can be reused for other purposes. # 95| */ # 96|-> reg = t_aligned_alloc(page_size, page_size); # 97| if (!reg) { # 98| fprintf(stderr, "allocation failed\n"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] liburing-2.12/examples/zcrx.c:113:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/udmabuf", 2)’ liburing-2.12/examples/zcrx.c:337:13: enter_function: entry to ‘run_server’ liburing-2.12/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)... liburing-2.12/examples/zcrx.c:345:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:356:12: branch_true: following ‘true’ branch... liburing-2.12/examples/zcrx.c:357:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:369:9: call_function: calling ‘setup_zcrx’ from ‘run_server’ # 111| memfd = memfd_create("udmabuf-test", MFD_ALLOW_SEALING); # 112| if (memfd < 0) # 113|-> t_error(1, memfd, "Failed to open udmabuf dev"); # 114| # 115| ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK); Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] liburing-2.12/examples/zcrx.c:115:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/udmabuf", 2)’ liburing-2.12/examples/zcrx.c:337:13: enter_function: entry to ‘run_server’ liburing-2.12/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)... liburing-2.12/examples/zcrx.c:345:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:356:12: branch_true: following ‘true’ branch... liburing-2.12/examples/zcrx.c:357:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:369:9: call_function: calling ‘setup_zcrx’ from ‘run_server’ # 113| t_error(1, memfd, "Failed to open udmabuf dev"); # 114| # 115|-> ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK); # 116| if (ret < 0) # 117| t_error(1, 0, "Failed to set seals"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def5] liburing-2.12/examples/zcrx.c:117:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/udmabuf", 2)’ liburing-2.12/examples/zcrx.c:337:13: enter_function: entry to ‘run_server’ liburing-2.12/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)... liburing-2.12/examples/zcrx.c:345:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:356:12: branch_true: following ‘true’ branch... liburing-2.12/examples/zcrx.c:357:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:369:9: call_function: calling ‘setup_zcrx’ from ‘run_server’ # 115| ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK); # 116| if (ret < 0) # 117|-> t_error(1, 0, "Failed to set seals"); # 118| # 119| ret = ftruncate(memfd, AREA_SIZE); Error: GCC_ANALYZER_WARNING (CWE-775): [#def6] liburing-2.12/examples/zcrx.c:121:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/udmabuf", 2)’ liburing-2.12/examples/zcrx.c:337:13: enter_function: entry to ‘run_server’ liburing-2.12/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)... liburing-2.12/examples/zcrx.c:345:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:356:12: branch_true: following ‘true’ branch... liburing-2.12/examples/zcrx.c:357:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:369:9: call_function: calling ‘setup_zcrx’ from ‘run_server’ # 119| ret = ftruncate(memfd, AREA_SIZE); # 120| if (ret == -1) # 121|-> t_error(1, 0, "Failed to resize udmabuf"); # 122| # 123| memset(&create, 0, sizeof(create)); Error: GCC_ANALYZER_WARNING: [#def7] liburing-2.12/examples/zcrx.c:356:13: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘fd’ liburing-2.12/examples/zcrx.c:344:12: branch_true: following ‘true’ branch (when ‘fd == -1’)... liburing-2.12/examples/zcrx.c:345:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:356:13: danger: ‘fd’ could be invalid # 354| t_error(1, 0, "bind()"); # 355| # 356|-> if (listen(fd, 1024) < 0) # 357| t_error(1, 0, "listen()"); # 358| Error: GCC_ANALYZER_WARNING (CWE-775): [#def8] liburing-2.12/examples/zcrx.c:357:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ liburing-2.12/examples/zcrx.c:343:14: acquire_resource: stream socket created here liburing-2.12/examples/zcrx.c:344:12: branch_false: following ‘false’ branch (when ‘fd != -1’)... liburing-2.12/examples/zcrx.c:347:9: branch_false: ...to here liburing-2.12/examples/zcrx.c:356:12: branch_true: following ‘true’ branch... liburing-2.12/examples/zcrx.c:357:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:357:17: danger: ‘fd’ leaks here # 355| # 356| if (listen(fd, 1024) < 0) # 357|-> t_error(1, 0, "listen()"); # 358| # 359| flags |= IORING_SETUP_COOP_TASKRUN; Error: GCC_ANALYZER_WARNING (CWE-775): [#def9] liburing-2.12/examples/zcrx.c:365:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ liburing-2.12/examples/zcrx.c:343:14: acquire_resource: stream socket created here liburing-2.12/examples/zcrx.c:344:12: branch_false: following ‘false’ branch (when ‘fd != -1’)... liburing-2.12/examples/zcrx.c:347:9: branch_false: ...to here liburing-2.12/examples/zcrx.c:356:12: branch_false: following ‘false’ branch... liburing-2.12/examples/zcrx.c:365:15: branch_false: ...to here liburing-2.12/examples/zcrx.c:365:15: danger: ‘fd’ leaks here # 363| flags |= IORING_SETUP_CQE32; # 364| # 365|-> ret = io_uring_queue_init(512, &ring, flags); # 366| if (ret) # 367| t_error(1, ret, "ring init failed"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def10] liburing-2.12/examples/zcrx.c:367:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ liburing-2.12/examples/zcrx.c:343:14: acquire_resource: stream socket created here liburing-2.12/examples/zcrx.c:344:12: branch_false: following ‘false’ branch (when ‘fd != -1’)... liburing-2.12/examples/zcrx.c:347:9: branch_false: ...to here liburing-2.12/examples/zcrx.c:356:12: branch_false: following ‘false’ branch... liburing-2.12/examples/zcrx.c:365:15: branch_false: ...to here liburing-2.12/examples/zcrx.c:366:12: branch_true: following ‘true’ branch... liburing-2.12/examples/zcrx.c:367:17: branch_true: ...to here liburing-2.12/examples/zcrx.c:367:17: danger: ‘fd’ leaks here # 365| ret = io_uring_queue_init(512, &ring, flags); # 366| if (ret) # 367|-> t_error(1, ret, "ring init failed"); # 368| # 369| setup_zcrx(&ring); Error: CPPCHECK_WARNING (CWE-457): [#def11] liburing-2.12/src/include/liburing.h:902: warning[uninitvar]: Uninitialized variable: events # 900| LIBURING_NOEXCEPT # 901| { # 902|-> io_uring_prep_rw(IORING_OP_EPOLL_WAIT, sqe, fd, events, maxevents, 0); # 903| sqe->rw_flags = flags; # 904| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def12] liburing-2.12/src/include/liburing.h:1607:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".short-read", 0)’ liburing-2.12/test/short-read.c:18:5: enter_function: entry to ‘main’ liburing-2.12/test/short-read.c:26:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/short-read.c:29:24: branch_false: ...to here liburing-2.12/test/short-read.c:34:14: acquire_resource: opened here liburing-2.12/test/short-read.c:38:12: branch_false: following ‘false’ branch... liburing-2.12/test/short-read.c:43:15: branch_false: ...to here liburing-2.12/test/short-read.c:44:12: branch_false: following ‘false’ branch... liburing-2.12/test/short-read.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.12/test/short-read.c:49:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.12/src/include/liburing.h:1607:13: danger: ‘open(".short-read", 0)’ leaks here; was opened at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3) # 1605| * non-SQPOLL since then we drive updates. # 1606| */ # 1607|-> if (ring->flags & IORING_SETUP_SQPOLL) # 1608| return io_uring_smp_load_acquire(ring->sq.khead); # 1609| Error: GCC_ANALYZER_WARNING (CWE-775): [#def13] liburing-2.12/src/include/liburing.h:1607:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".sync_file_range", 2)’ liburing-2.12/test/fsync.c:146:12: enter_function: entry to ‘test_sync_file_range’ liburing-2.12/test/fsync.c:154:14: acquire_resource: opened here liburing-2.12/test/fsync.c:158:12: branch_false: following ‘false’ branch... liburing-2.12/test/fsync.c:163:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_sync_file_range’ liburing-2.12/test/fsync.c:163:15: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_sync_file_range’ liburing-2.12/src/include/liburing.h:1607:13: danger: ‘open(".sync_file_range", 2)’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1) # 1605| * non-SQPOLL since then we drive updates. # 1606| */ # 1607|-> if (ring->flags & IORING_SETUP_SQPOLL) # 1608| return io_uring_smp_load_acquire(ring->sq.khead); # 1609| Error: GCC_ANALYZER_WARNING (CWE-775): [#def14] liburing-2.12/src/include/liburing.h:1607:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(".test_fpos_read", 0)’ liburing-2.12/test/fpos.c:225:5: enter_function: entry to ‘main’ liburing-2.12/test/fpos.c:230:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/fpos.c:233:15: branch_false: ...to here liburing-2.12/test/fpos.c:234:12: branch_false: following ‘false’ branch... branch_false: ...to here liburing-2.12/test/fpos.c:239:28: branch_true: following ‘true’ branch (when ‘test != 8’)... liburing-2.12/test/fpos.c:240:21: branch_true: ...to here liburing-2.12/test/fpos.c:242:33: branch_false: following ‘false’ branch... branch_false: ...to here liburing-2.12/test/fpos.c:244:23: branch_false: following ‘false’ branch (when ‘write == 0’)... liburing-2.12/test/fpos.c:246:27: branch_false: ...to here liburing-2.12/test/fpos.c:246:27: call_function: calling ‘test_read’ from ‘main’ # 1605| * non-SQPOLL since then we drive updates. # 1606| */ # 1607|-> if (ring->flags & IORING_SETUP_SQPOLL) # 1608| return io_uring_smp_load_acquire(ring->sq.khead); # 1609| Error: GCC_ANALYZER_WARNING (CWE-775): [#def15] liburing-2.12/src/include/liburing.h:1607:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(fname, 16384)’ liburing-2.12/test/sqwait.c:42:5: enter_function: entry to ‘main’ liburing-2.12/test/sqwait.c:63:21: branch_true: following ‘true’ branch (when ‘i != 256’)... liburing-2.12/test/sqwait.c:64:21: branch_true: ...to here branch_true: following ‘true’ branch... liburing-2.12/test/sqwait.c:66:17: branch_true: ...to here liburing-2.12/test/sqwait.c:70:12: branch_false: following ‘false’ branch... liburing-2.12/test/sqwait.c:78:14: branch_false: ...to here liburing-2.12/test/sqwait.c:78:14: acquire_resource: opened here liburing-2.12/test/sqwait.c:79:12: branch_false: following ‘false’ branch... branch_false: ...to here liburing-2.12/test/sqwait.c:88:21: branch_true: following ‘true’ branch (when ‘i != 10000’)... liburing-2.12/test/sqwait.c:91:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.12/test/sqwait.c:91:23: call_function: inlined call to ‘io_uring_get_sqe’ from ‘main’ liburing-2.12/test/sqwait.c:92:20: branch_true: following ‘true’ branch... liburing-2.12/test/sqwait.c:93:31: branch_true: ...to here liburing-2.12/test/sqwait.c:94:28: branch_true: following ‘true’ branch... liburing-2.12/test/sqwait.c:95:36: branch_true: ...to here liburing-2.12/src/include/liburing.h:1607:13: danger: ‘open(fname, 16384)’ leaks here; was opened at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7) # 1605| * non-SQPOLL since then we drive updates. # 1606| */ # 1607|-> if (ring->flags & IORING_SETUP_SQPOLL) # 1608| return io_uring_smp_load_acquire(ring->sq.khead); # 1609| Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] liburing-2.12/src/include/liburing.h:1737:16: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’ liburing-2.12/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/recv-inc-ooo.c:268:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’ liburing-2.12/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:276:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch... liburing-2.12/test/recv-inc-ooo.c:279:13: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:296:30: acquire_memory: allocated here liburing-2.12/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.12/test/recv-inc-ooo.c:298:26: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.12/test/recv-inc-ooo.c:298:26: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:310:28: branch_true: following ‘true’ branch (when ‘i != 4’)... liburing-2.12/test/recv-inc-ooo.c:311:24: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:317:17: call_function: calling ‘write_all’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:317:17: return_function: returning to ‘test_recv_incr’ from ‘write_all’ liburing-2.12/test/recv-inc-ooo.c:323:24: branch_true: following ‘true’ branch (when ‘remaining_chunk_len != 0’)... liburing-2.12/test/recv-inc-ooo.c:325:31: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:325:31: call_function: calling ‘io_uring_wait_cqe’ from ‘test_recv_incr’ # 1735| LIBURING_NOEXCEPT # 1736| { # 1737|-> return __io_uring_get_cqe(ring, cqe_ptr, 0, wait_nr, NULL); # 1738| } # 1739| Error: GCC_ANALYZER_WARNING (CWE-775): [#def17] liburing-2.12/test/accept.c:221:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_accept_listen(&addr, 0, <unknown>)’ liburing-2.12/test/accept.c:676:12: enter_function: entry to ‘test_accept_fixed’ liburing-2.12/test/accept.c:685:9: branch_true: following ‘true’ branch... liburing-2.12/test/accept.c:686:15: branch_true: ...to here liburing-2.12/test/accept.c:687:12: branch_false: following ‘false’ branch... liburing-2.12/test/accept.c:693:15: branch_false: ...to here liburing-2.12/test/accept.c:693:15: call_function: calling ‘test’ from ‘test_accept_fixed’ # 219| assert(ret != -1); # 220| # 221|-> t_set_nonblock(fd); # 222| # 223| ret = connect(fd, (struct sockaddr *)addr, sizeof(*addr)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def18] liburing-2.12/test/accept.c:226:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_accept_listen(&addr, 0, <unknown>)’ liburing-2.12/test/accept.c:676:12: enter_function: entry to ‘test_accept_fixed’ liburing-2.12/test/accept.c:685:9: branch_true: following ‘true’ branch... liburing-2.12/test/accept.c:686:15: branch_true: ...to here liburing-2.12/test/accept.c:687:12: branch_false: following ‘false’ branch... liburing-2.12/test/accept.c:693:15: branch_false: ...to here liburing-2.12/test/accept.c:693:15: call_function: calling ‘test’ from ‘test_accept_fixed’ # 224| assert(ret == -1); # 225| # 226|-> t_clear_nonblock(fd); # 227| return fd; # 228| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def19] liburing-2.12/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][0]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:248:24: danger: ‘d.pipes[0][0]’ leaks here # 246| ret = t_create_ring(32, &ring, flags); # 247| if (ret == T_SETUP_SKIP) { # 248|-> return 0; # 249| } else if (ret != T_SETUP_OK) { # 250| fprintf(stderr, "ring create failed %x -> %d\n", flags, ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def20] liburing-2.12/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][1]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:248:24: danger: ‘d.pipes[0][1]’ leaks here # 246| ret = t_create_ring(32, &ring, flags); # 247| if (ret == T_SETUP_SKIP) { # 248|-> return 0; # 249| } else if (ret != T_SETUP_OK) { # 250| fprintf(stderr, "ring create failed %x -> %d\n", flags, ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def21] liburing-2.12/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][0]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:248:24: danger: ‘d.pipes[1][0]’ leaks here # 246| ret = t_create_ring(32, &ring, flags); # 247| if (ret == T_SETUP_SKIP) { # 248|-> return 0; # 249| } else if (ret != T_SETUP_OK) { # 250| fprintf(stderr, "ring create failed %x -> %d\n", flags, ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def22] liburing-2.12/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][1]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:248:24: danger: ‘d.pipes[1][1]’ leaks here # 246| ret = t_create_ring(32, &ring, flags); # 247| if (ret == T_SETUP_SKIP) { # 248|-> return 0; # 249| } else if (ret != T_SETUP_OK) { # 250| fprintf(stderr, "ring create failed %x -> %d\n", flags, ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def23] liburing-2.12/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][0]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:248:24: danger: ‘d.pipes[2][0]’ leaks here # 246| ret = t_create_ring(32, &ring, flags); # 247| if (ret == T_SETUP_SKIP) { # 248|-> return 0; # 249| } else if (ret != T_SETUP_OK) { # 250| fprintf(stderr, "ring create failed %x -> %d\n", flags, ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def24] liburing-2.12/test/epwait.c:248:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][1]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:248:24: danger: ‘d.pipes[2][1]’ leaks here # 246| ret = t_create_ring(32, &ring, flags); # 247| if (ret == T_SETUP_SKIP) { # 248|-> return 0; # 249| } else if (ret != T_SETUP_OK) { # 250| fprintf(stderr, "ring create failed %x -> %d\n", flags, ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def25] liburing-2.12/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][0]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:256:25: danger: ‘d.pipes[0][0]’ leaks here # 254| for (i = 0; i < NPIPES; i++) { # 255| if (pipe(d.pipes[i]) < 0) { # 256|-> perror("pipe"); # 257| return 1; # 258| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def26] liburing-2.12/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[0][1]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:256:25: danger: ‘d.pipes[0][1]’ leaks here # 254| for (i = 0; i < NPIPES; i++) { # 255| if (pipe(d.pipes[i]) < 0) { # 256|-> perror("pipe"); # 257| return 1; # 258| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def27] liburing-2.12/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][0]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:256:25: danger: ‘d.pipes[1][0]’ leaks here # 254| for (i = 0; i < NPIPES; i++) { # 255| if (pipe(d.pipes[i]) < 0) { # 256|-> perror("pipe"); # 257| return 1; # 258| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def28] liburing-2.12/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[1][1]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:256:25: danger: ‘d.pipes[1][1]’ leaks here # 254| for (i = 0; i < NPIPES; i++) { # 255| if (pipe(d.pipes[i]) < 0) { # 256|-> perror("pipe"); # 257| return 1; # 258| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def29] liburing-2.12/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][0]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:256:25: danger: ‘d.pipes[2][0]’ leaks here # 254| for (i = 0; i < NPIPES; i++) { # 255| if (pipe(d.pipes[i]) < 0) { # 256|-> perror("pipe"); # 257| return 1; # 258| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def30] liburing-2.12/test/epwait.c:256:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.pipes[2][1]’ liburing-2.12/test/epwait.c:247:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/epwait.c:249:19: branch_false: ...to here liburing-2.12/test/epwait.c:249:19: branch_false: following ‘false’ branch (when ‘ret == 0’)... branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_false: following ‘false’ branch... liburing-2.12/test/epwait.c:254:33: branch_false: ...to here liburing-2.12/test/epwait.c:254:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/epwait.c:255:26: branch_true: ...to here liburing-2.12/test/epwait.c:255:20: branch_true: following ‘true’ branch... liburing-2.12/test/epwait.c:256:25: branch_true: ...to here liburing-2.12/test/epwait.c:256:25: danger: ‘d.pipes[2][1]’ leaks here # 254| for (i = 0; i < NPIPES; i++) { # 255| if (pipe(d.pipes[i]) < 0) { # 256|-> perror("pipe"); # 257| return 1; # 258| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] liburing-2.12/test/fdinfo-sqpoll.c:39:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here liburing-2.12/test/fdinfo-sqpoll.c:39:14: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 37| # 38| sprintf(fd_name, "/proc/self/fdinfo/%d", d->ring.ring_fd); # 39|-> fd = open(fd_name, O_RDONLY); # 40| if (fd < 0) { # 41| perror("open"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] liburing-2.12/test/fdinfo-sqpoll.c:41:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here liburing-2.12/test/fdinfo-sqpoll.c:40:12: branch_true: following ‘true’ branch... liburing-2.12/test/fdinfo-sqpoll.c:41:17: branch_true: ...to here liburing-2.12/test/fdinfo-sqpoll.c:41:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 39| fd = open(fd_name, O_RDONLY); # 40| if (fd < 0) { # 41|-> perror("open"); # 42| return NULL; # 43| } Error: CPPCHECK_WARNING (CWE-401): [#def33] liburing-2.12/test/fdinfo-sqpoll.c:42: error[memleak]: Memory leak: buf # 40| if (fd < 0) { # 41| perror("open"); # 42|-> return NULL; # 43| } # 44| Error: GCC_ANALYZER_WARNING (CWE-775): [#def34] liburing-2.12/test/fdinfo-sqpoll.c:51:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fd_name, 0)’ liburing-2.12/test/fdinfo-sqpoll.c:39:14: acquire_resource: opened here liburing-2.12/test/fdinfo-sqpoll.c:40:12: branch_false: following ‘false’ branch... liburing-2.12/test/fdinfo-sqpoll.c:45:9: branch_false: ...to here liburing-2.12/test/fdinfo-sqpoll.c:51:25: danger: ‘open(&fd_name, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 49| # 50| if (ret < 0) { # 51|-> perror("fdinfo read"); # 52| break; # 53| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] liburing-2.12/test/fdinfo-sqpoll.c:51:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here liburing-2.12/test/fdinfo-sqpoll.c:40:12: branch_false: following ‘false’ branch... liburing-2.12/test/fdinfo-sqpoll.c:45:9: branch_false: ...to here liburing-2.12/test/fdinfo-sqpoll.c:51:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 49| # 50| if (ret < 0) { # 51|-> perror("fdinfo read"); # 52| break; # 53| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] liburing-2.12/test/fdinfo-sqpoll.c:56:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/fdinfo-sqpoll.c:36:15: acquire_memory: allocated here liburing-2.12/test/fdinfo-sqpoll.c:40:12: branch_false: following ‘false’ branch... liburing-2.12/test/fdinfo-sqpoll.c:45:9: branch_false: ...to here liburing-2.12/test/fdinfo-sqpoll.c:56:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) # 54| } while (!d->done); # 55| # 56|-> close(fd); # 57| free(buf); # 58| return NULL; Error: GCC_ANALYZER_WARNING (CWE-775): [#def37] liburing-2.12/test/fdinfo-sqpoll.c:57:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fd_name, 0)’ liburing-2.12/test/fdinfo-sqpoll.c:39:14: acquire_resource: opened here liburing-2.12/test/fdinfo-sqpoll.c:40:12: branch_false: following ‘false’ branch... liburing-2.12/test/fdinfo-sqpoll.c:45:9: branch_false: ...to here liburing-2.12/test/fdinfo-sqpoll.c:57:9: danger: ‘open(&fd_name, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 55| # 56| close(fd); # 57|-> free(buf); # 58| return NULL; # 59| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def38] liburing-2.12/test/fifo-nonblock-read.c:30:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.12/test/fifo-nonblock-read.c:25:12: branch_false: following ‘false’ branch... liburing-2.12/test/fifo-nonblock-read.c:30:9: branch_false: ...to here liburing-2.12/test/fifo-nonblock-read.c:30:9: danger: ‘fds[0]’ leaks here # 28| } # 29| # 30|-> t_set_nonblock(fds[0]); # 31| # 32| sqe = io_uring_get_sqe(&ring); Error: GCC_ANALYZER_WARNING (CWE-775): [#def39] liburing-2.12/test/fifo-nonblock-read.c:30:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.12/test/fifo-nonblock-read.c:25:12: branch_false: following ‘false’ branch... liburing-2.12/test/fifo-nonblock-read.c:30:9: branch_false: ...to here liburing-2.12/test/fifo-nonblock-read.c:30:9: danger: ‘fds[1]’ leaks here # 28| } # 29| # 30|-> t_set_nonblock(fds[0]); # 31| # 32| sqe = io_uring_get_sqe(&ring); Error: GCC_ANALYZER_WARNING (CWE-775): [#def40] liburing-2.12/test/file-register.c:832:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.12/test/file-register.c:814:12: branch_false: following ‘false’ branch... liburing-2.12/test/file-register.c:818:13: branch_false: ...to here liburing-2.12/test/file-register.c:818:12: branch_false: following ‘false’ branch... liburing-2.12/test/file-register.c:827:22: branch_false: ...to here liburing-2.12/test/file-register.c:832:15: danger: ‘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): [#def41] liburing-2.12/test/file-register.c:832:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.12/test/file-register.c:814:12: branch_false: following ‘false’ branch... liburing-2.12/test/file-register.c:818:13: branch_false: ...to here liburing-2.12/test/file-register.c:818:12: branch_false: following ‘false’ branch... liburing-2.12/test/file-register.c:827:22: branch_false: ...to here liburing-2.12/test/file-register.c:832:15: danger: ‘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-457): [#def42] liburing-2.12/test/fixed-hugepage.c:51:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.iov_base’ liburing-2.12/test/fixed-hugepage.c:345:12: enter_function: entry to ‘test_page_mixture’ liburing-2.12/test/fixed-hugepage.c:351:13: call_function: calling ‘mmap_mixture’ from ‘test_page_mixture’ # 49| # 50| for (i = 0; i < nr_bufs; i++) { # 51|-> if (!iov[i].iov_base) # 52| continue; # 53| munmap(iov[i].iov_base - offset, iov[i].iov_len + offset); Error: GCC_ANALYZER_WARNING (CWE-775): [#def43] liburing-2.12/test/fixed-seg.c:135:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’ liburing-2.12/test/fixed-seg.c:117:12: branch_false: following ‘false’ branch... liburing-2.12/test/fixed-seg.c:121:15: branch_false: ...to here liburing-2.12/test/fixed-seg.c:129:18: acquire_resource: opened here liburing-2.12/test/fixed-seg.c:135:13: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) # 133| } # 134| # 135|-> if (posix_memalign(&wvec.iov_base, 4096, 512*1024)) # 136| goto err; # 137| wvec.iov_len = 512*1024; Error: GCC_ANALYZER_WARNING (CWE-775): [#def44] liburing-2.12/test/fixed-seg.c:139:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/urandom", 0)’ liburing-2.12/test/fixed-seg.c:117:12: branch_false: following ‘false’ branch... liburing-2.12/test/fixed-seg.c:121:15: branch_false: ...to here liburing-2.12/test/fixed-seg.c:129:18: acquire_resource: opened here branch_true: following ‘true’ branch... liburing-2.12/test/fixed-seg.c:137:9: branch_true: ...to here liburing-2.12/test/fixed-seg.c:139:9: danger: ‘open("/dev/urandom", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 137| wvec.iov_len = 512*1024; # 138| # 139|-> ret = read(rnd_fd, wvec.iov_base, wvec.iov_len); # 140| if (ret != wvec.iov_len) { # 141| fprintf(stderr, "Precondition, urandom read failed, ret: %d\n", ret); Error: GCC_ANALYZER_WARNING: [#def45] liburing-2.12/test/fixed-seg.c:139:15: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open("/dev/urandom", 0)’ liburing-2.12/test/fixed-seg.c:117:12: branch_false: following ‘false’ branch... liburing-2.12/test/fixed-seg.c:121:15: branch_false: ...to here liburing-2.12/test/fixed-seg.c:129:18: acquire_resource: opened here branch_true: following ‘true’ branch... liburing-2.12/test/fixed-seg.c:137:9: branch_true: ...to here liburing-2.12/test/fixed-seg.c:139:15: danger: ‘open("/dev/urandom", 0)’ could be invalid: unchecked value from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 137| wvec.iov_len = 512*1024; # 138| # 139|-> ret = read(rnd_fd, wvec.iov_base, wvec.iov_len); # 140| if (ret != wvec.iov_len) { # 141| fprintf(stderr, "Precondition, urandom read failed, ret: %d\n", ret); Error: CPPCHECK_WARNING (CWE-476): [#def46] liburing-2.12/test/futex-kill.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: futex # 39| # 40| futex = malloc(sizeof(*futex)); # 41|-> *futex = 0; # 42| fw.uaddr = (unsigned long) futex; # 43| fw.flags = FUTEX2_SIZE_U32|FUTEX2_PRIVATE; Error: GCC_ANALYZER_WARNING (CWE-476): [#def47] liburing-2.12/test/futex-kill.c:41:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘futex’ liburing-2.12/test/futex-kill.c:79:5: enter_function: entry to ‘main’ liburing-2.12/test/futex-kill.c:83:15: call_function: calling ‘test’ from ‘main’ # 39| # 40| futex = malloc(sizeof(*futex)); # 41|-> *futex = 0; # 42| fw.uaddr = (unsigned long) futex; # 43| fw.flags = FUTEX2_SIZE_U32|FUTEX2_PRIVATE; Error: GCC_ANALYZER_WARNING (CWE-775): [#def48] liburing-2.12/test/iowait.c:54:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.12/test/iowait.c:56:12: branch_false: following ‘false’ branch... liburing-2.12/test/iowait.c:61:15: branch_false: ...to here liburing-2.12/test/iowait.c:62:12: branch_true: following ‘true’ branch... liburing-2.12/test/iowait.c:63:17: branch_true: ...to here liburing-2.12/test/iowait.c:54:24: danger: ‘fds[0]’ leaks here # 52| # 53| if (!(ring->features & IORING_FEAT_NO_IOWAIT)) # 54|-> return T_EXIT_SKIP; # 55| # 56| if (pipe(fds) < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def49] liburing-2.12/test/iowait.c:54:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.12/test/iowait.c:56:12: branch_false: following ‘false’ branch... liburing-2.12/test/iowait.c:61:15: branch_false: ...to here liburing-2.12/test/iowait.c:62:12: branch_true: following ‘true’ branch... liburing-2.12/test/iowait.c:63:17: branch_true: ...to here liburing-2.12/test/iowait.c:54:24: danger: ‘fds[1]’ leaks here # 52| # 53| if (!(ring->features & IORING_FEAT_NO_IOWAIT)) # 54|-> return T_EXIT_SKIP; # 55| # 56| if (pipe(fds) < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def50] liburing-2.12/test/iowait.c:54:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[with_iowait]’ liburing-2.12/test/iowait.c:106:5: enter_function: entry to ‘main’ liburing-2.12/test/iowait.c:114:12: branch_false: following ‘false’ branch... liburing-2.12/test/iowait.c:117:15: branch_false: ...to here liburing-2.12/test/iowait.c:118:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/iowait.c:120:17: branch_false: ...to here liburing-2.12/test/iowait.c:120:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/iowait.c:123:15: branch_false: ...to here liburing-2.12/test/iowait.c:123:15: call_function: calling ‘test’ from ‘main’ # 52| # 53| if (!(ring->features & IORING_FEAT_NO_IOWAIT)) # 54|-> return T_EXIT_SKIP; # 55| # 56| if (pipe(fds) < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def51] liburing-2.12/test/iowait.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ liburing-2.12/test/iowait.c:56:12: branch_false: following ‘false’ branch... liburing-2.12/test/iowait.c:61:15: branch_false: ...to here liburing-2.12/test/iowait.c:61:15: danger: ‘fds[0]’ leaks here # 59| } # 60| # 61|-> ret = io_uring_set_iowait(ring, with_iowait); # 62| if (ret) { # 63| fprintf(stderr, "set_iowait=%d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def52] liburing-2.12/test/iowait.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.12/test/iowait.c:56:12: branch_false: following ‘false’ branch... liburing-2.12/test/iowait.c:61:15: branch_false: ...to here liburing-2.12/test/iowait.c:61:15: danger: ‘fds[1]’ leaks here # 59| } # 60| # 61|-> ret = io_uring_set_iowait(ring, with_iowait); # 62| if (ret) { # 63| fprintf(stderr, "set_iowait=%d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def53] liburing-2.12/test/iowait.c:61:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[with_iowait]’ liburing-2.12/test/iowait.c:106:5: enter_function: entry to ‘main’ liburing-2.12/test/iowait.c:114:12: branch_false: following ‘false’ branch... liburing-2.12/test/iowait.c:117:15: branch_false: ...to here liburing-2.12/test/iowait.c:118:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/iowait.c:120:17: branch_false: ...to here liburing-2.12/test/iowait.c:120:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/iowait.c:123:15: branch_false: ...to here liburing-2.12/test/iowait.c:123:15: call_function: calling ‘test’ from ‘main’ # 59| } # 60| # 61|-> ret = io_uring_set_iowait(ring, with_iowait); # 62| if (ret) { # 63| fprintf(stderr, "set_iowait=%d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def54] liburing-2.12/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fd[0]’ liburing-2.12/test/min-timeout.c:82:12: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:84:15: branch_false: ...to here liburing-2.12/test/min-timeout.c:84:12: branch_false: following ‘false’ branch... branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:94:27: branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_true: following ‘true’ branch... liburing-2.12/test/min-timeout.c:91:25: branch_true: ...to here liburing-2.12/test/min-timeout.c:91:25: danger: ‘d.fd[0]’ leaks here # 89| for (i = 0; i < NPIPES; i++) { # 90| if (pipe(fds[i]) < 0) { # 91|-> perror("pipe"); # 92| return 1; # 93| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def55] liburing-2.12/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fd[1]’ liburing-2.12/test/min-timeout.c:82:12: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:84:15: branch_false: ...to here liburing-2.12/test/min-timeout.c:84:12: branch_false: following ‘false’ branch... branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:94:27: branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:94:27: branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_true: following ‘true’ branch... liburing-2.12/test/min-timeout.c:91:25: branch_true: ...to here liburing-2.12/test/min-timeout.c:91:25: danger: ‘d.fd[1]’ leaks here # 89| for (i = 0; i < NPIPES; i++) { # 90| if (pipe(fds[i]) < 0) { # 91|-> perror("pipe"); # 92| return 1; # 93| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def56] liburing-2.12/test/min-timeout.c:91:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fd[2]’ liburing-2.12/test/min-timeout.c:82:12: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:84:15: branch_false: ...to here liburing-2.12/test/min-timeout.c:84:12: branch_false: following ‘false’ branch... branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:94:27: branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:94:27: branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_false: following ‘false’ branch... liburing-2.12/test/min-timeout.c:94:27: branch_false: ...to here liburing-2.12/test/min-timeout.c:89:21: branch_true: following ‘true’ branch (when ‘i != 8’)... liburing-2.12/test/min-timeout.c:90:26: branch_true: ...to here liburing-2.12/test/min-timeout.c:90:20: branch_true: following ‘true’ branch... liburing-2.12/test/min-timeout.c:91:25: branch_true: ...to here liburing-2.12/test/min-timeout.c:91:25: danger: ‘d.fd[2]’ leaks here # 89| for (i = 0; i < NPIPES; i++) { # 90| if (pipe(fds[i]) < 0) { # 91|-> perror("pipe"); # 92| return 1; # 93| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def57] liburing-2.12/test/pipe-bug.c:40:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ liburing-2.12/test/pipe-bug.c:88:5: enter_function: entry to ‘main’ liburing-2.12/test/pipe-bug.c:92:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... branch_false: ...to here liburing-2.12/test/pipe-bug.c:95:21: branch_true: following ‘true’ branch (when ‘i != 10000’)... liburing-2.12/test/pipe-bug.c:96:21: branch_true: ...to here liburing-2.12/test/pipe-bug.c:96:21: call_function: calling ‘pipe_bug’ from ‘main’ # 38| if (ret == -ENOMEM) { # 39| usleep(1000); # 40|-> return 0; # 41| } else if (ret) { # 42| fprintf(stderr, "ring_init: %d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def58] liburing-2.12/test/pipe-bug.c:40:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[i]’ liburing-2.12/test/pipe-bug.c:88:5: enter_function: entry to ‘main’ liburing-2.12/test/pipe-bug.c:92:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... branch_false: ...to here liburing-2.12/test/pipe-bug.c:95:21: branch_true: following ‘true’ branch (when ‘i != 10000’)... liburing-2.12/test/pipe-bug.c:96:21: branch_true: ...to here liburing-2.12/test/pipe-bug.c:96:21: call_function: calling ‘pipe_bug’ from ‘main’ # 38| if (ret == -ENOMEM) { # 39| usleep(1000); # 40|-> return 0; # 41| } else if (ret) { # 42| fprintf(stderr, "ring_init: %d\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def59] liburing-2.12/test/pipe-eof.c:54:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fds[0]’ liburing-2.12/test/pipe-eof.c:45:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/pipe-eof.c:48:13: branch_false: ...to here liburing-2.12/test/pipe-eof.c:48:12: branch_false: following ‘false’ branch... liburing-2.12/test/pipe-eof.c:52:9: branch_false: ...to here liburing-2.12/test/pipe-eof.c:54:15: danger: ‘d.fds[0]’ leaks here # 52| d.str = buf; # 53| # 54|-> ret = io_uring_queue_init(8, &ring, 0); # 55| if (ret == -ENOMEM) { # 56| return T_EXIT_SKIP; Error: GCC_ANALYZER_WARNING (CWE-775): [#def60] liburing-2.12/test/pipe-eof.c:54:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘d.fds[1]’ liburing-2.12/test/pipe-eof.c:45:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/pipe-eof.c:48:13: branch_false: ...to here liburing-2.12/test/pipe-eof.c:48:12: branch_false: following ‘false’ branch... liburing-2.12/test/pipe-eof.c:52:9: branch_false: ...to here liburing-2.12/test/pipe-eof.c:54:15: danger: ‘d.fds[1]’ leaks here # 52| d.str = buf; # 53| # 54|-> ret = io_uring_queue_init(8, &ring, 0); # 55| if (ret == -ENOMEM) { # 56| return T_EXIT_SKIP; Error: GCC_ANALYZER_WARNING (CWE-401): [#def61] liburing-2.12/test/recv-bundle-short-ooo.c:276:24: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’ liburing-2.12/test/recv-bundle-short-ooo.c:293:12: enter_function: entry to ‘test_recv_multi_large_packet_isolate_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:301:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/recv-bundle-short-ooo.c:303:17: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:303:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/recv-bundle-short-ooo.c:308:15: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:308:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_multi_large_packet_isolate_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:308:15: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘setup_buf_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:309:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:311:17: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:311:17: branch_false: following ‘false’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:316:15: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:317:9: branch_true: following ‘true’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:319:13: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:323:30: acquire_memory: allocated here liburing-2.12/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)... liburing-2.12/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)... liburing-2.12/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:328:9: call_function: calling ‘write_all’ from ‘test_recv_multi_large_packet_isolate_ring’ # 274| ssize_t sent; # 275| # 276|-> sent = write(fd, buf + bytes_sent, size - bytes_sent); # 277| assert(sent > 0); /* Ensure write succeeded */ # 278| bytes_sent += sent; Error: CPPCHECK_WARNING (CWE-476): [#def62] liburing-2.12/test/recv-bundle-short-ooo.c:325: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: test_data # 323| uint8_t *test_data = malloc(ONE_MB); # 324| for (int i = 0; i < ONE_MB; i++) # 325|-> test_data[i] = i % 256; /* Create repeating pattern */ # 326| # 327| /* Send test data through the socket */ Error: GCC_ANALYZER_WARNING (CWE-476): [#def63] liburing-2.12/test/recv-bundle-short-ooo.c:325:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘test_data’ liburing-2.12/test/recv-bundle-short-ooo.c:293:12: enter_function: entry to ‘test_recv_multi_large_packet_isolate_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:301:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/recv-bundle-short-ooo.c:303:17: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:303:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/recv-bundle-short-ooo.c:308:15: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:308:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_multi_large_packet_isolate_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:308:15: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘setup_buf_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:309:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:311:17: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:311:17: branch_false: following ‘false’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:316:15: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:317:9: branch_true: following ‘true’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:319:13: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:323:30: acquire_memory: this call could return NULL liburing-2.12/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)... liburing-2.12/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:325:17: danger: ‘test_data + (sizetype)i’ could be NULL: unchecked value from [(26)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/25) # 323| uint8_t *test_data = malloc(ONE_MB); # 324| for (int i = 0; i < ONE_MB; i++) # 325|-> test_data[i] = i % 256; /* Create repeating pattern */ # 326| # 327| /* Send test data through the socket */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def64] liburing-2.12/test/recv-bundle-short-ooo.c:331:9: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’ liburing-2.12/test/recv-bundle-short-ooo.c:293:12: enter_function: entry to ‘test_recv_multi_large_packet_isolate_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:301:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/recv-bundle-short-ooo.c:303:17: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:303:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/recv-bundle-short-ooo.c:308:15: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:308:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_multi_large_packet_isolate_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:308:15: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘setup_buf_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:309:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:311:17: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:311:17: branch_false: following ‘false’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:316:15: branch_false: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:317:9: branch_true: following ‘true’ branch... liburing-2.12/test/recv-bundle-short-ooo.c:319:13: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:323:30: acquire_memory: allocated here liburing-2.12/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)... liburing-2.12/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:324:25: branch_true: following ‘true’ branch (when ‘i != 1048576’)... liburing-2.12/test/recv-bundle-short-ooo.c:325:26: branch_true: ...to here liburing-2.12/test/recv-bundle-short-ooo.c:328:9: call_function: calling ‘write_all’ from ‘test_recv_multi_large_packet_isolate_ring’ liburing-2.12/test/recv-bundle-short-ooo.c:328:9: return_function: returning to ‘test_recv_multi_large_packet_isolate_ring’ from ‘write_all’ liburing-2.12/test/recv-bundle-short-ooo.c:331:9: danger: ‘test_data’ leaks here; was allocated at [(26)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/25) # 329| # 330| /* Close sender side to signal EOF to receiver */ # 331|-> close(sender_fd); # 332| # 333| /* Initialize pointer to track our position in expected data */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def65] liburing-2.12/test/recv-inc-ooo.c:181:9: warning[-Wanalyzer-malloc-leak]: leak of ‘current_expect’ liburing-2.12/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/recv-inc-ooo.c:268:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’ liburing-2.12/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:276:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch... liburing-2.12/test/recv-inc-ooo.c:279:13: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:296:30: acquire_memory: allocated here liburing-2.12/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.12/test/recv-inc-ooo.c:298:26: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.12/test/recv-inc-ooo.c:298:26: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:310:28: branch_true: following ‘true’ branch (when ‘i != 4’)... liburing-2.12/test/recv-inc-ooo.c:311:24: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:317:17: call_function: calling ‘write_all’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:317:17: return_function: returning to ‘test_recv_incr’ from ‘write_all’ liburing-2.12/test/recv-inc-ooo.c:323:24: branch_true: following ‘true’ branch (when ‘remaining_chunk_len != 0’)... liburing-2.12/test/recv-inc-ooo.c:325:31: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:325:31: call_function: calling ‘io_uring_wait_cqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:325:31: return_function: returning to ‘test_recv_incr’ from ‘io_uring_wait_cqe’ liburing-2.12/test/recv-inc-ooo.c:326:28: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:333:59: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:335:29: call_function: calling ‘process_completion’ from ‘test_recv_incr’ # 179| uint8_t **current_expect) # 180| { # 181|-> usleep(1); # 182| # 183| if (cqe->res <= 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def66] liburing-2.12/test/recv-inc-ooo.c:236:24: warning[-Wanalyzer-malloc-leak]: leak of ‘test_data’ liburing-2.12/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/recv-inc-ooo.c:268:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’ liburing-2.12/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:276:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch... liburing-2.12/test/recv-inc-ooo.c:279:13: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:296:30: acquire_memory: allocated here liburing-2.12/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.12/test/recv-inc-ooo.c:298:26: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.12/test/recv-inc-ooo.c:298:26: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:310:28: branch_true: following ‘true’ branch (when ‘i != 4’)... liburing-2.12/test/recv-inc-ooo.c:311:24: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:317:17: call_function: calling ‘write_all’ from ‘test_recv_incr’ # 234| ssize_t sent; # 235| # 236|-> sent = write(fd, buf + bytes_sent, size - bytes_sent); # 237| assert(sent > 0); /* Ensure write succeeded */ # 238| bytes_sent += sent; Error: CPPCHECK_WARNING (CWE-476): [#def67] liburing-2.12/test/recv-inc-ooo.c:298: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: test_data # 296| uint8_t *test_data = malloc(total_bytes); # 297| for (int i = 0; i < total_bytes; i++) # 298|-> test_data[i] = i % 256; /* Create repeating pattern */ # 299| # 300| /* Send data in chunks to test buffer boundary handling, intentionally misaligned with buffer size */ Error: GCC_ANALYZER_WARNING (CWE-476): [#def68] liburing-2.12/test/recv-inc-ooo.c:298:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘test_data’ liburing-2.12/test/recv-inc-ooo.c:253:12: enter_function: entry to ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:261:12: branch_false: following ‘false’ branch (when ‘ret != 1’)... liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:263:17: branch_false: following ‘false’ branch (when ‘ret == 0’)... liburing-2.12/test/recv-inc-ooo.c:268:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:268:15: call_function: calling ‘setup_buf_ring’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:268:15: return_function: returning to ‘test_recv_incr’ from ‘setup_buf_ring’ liburing-2.12/test/recv-inc-ooo.c:269:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:271:17: branch_false: following ‘false’ branch... liburing-2.12/test/recv-inc-ooo.c:276:15: branch_false: ...to here liburing-2.12/test/recv-inc-ooo.c:277:9: branch_true: following ‘true’ branch... liburing-2.12/test/recv-inc-ooo.c:279:13: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:285:36: call_function: inlined call to ‘io_uring_get_sqe’ from ‘test_recv_incr’ liburing-2.12/test/recv-inc-ooo.c:296:30: acquire_memory: this call could return NULL liburing-2.12/test/recv-inc-ooo.c:297:25: branch_true: following ‘true’ branch (when ‘i != 2048’)... liburing-2.12/test/recv-inc-ooo.c:298:26: branch_true: ...to here liburing-2.12/test/recv-inc-ooo.c:298:17: danger: ‘test_data + (long unsigned int)i’ could be NULL: unchecked value from [(31)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/30) # 296| uint8_t *test_data = malloc(total_bytes); # 297| for (int i = 0; i < total_bytes; i++) # 298|-> test_data[i] = i % 256; /* Create repeating pattern */ # 299| # 300| /* Send data in chunks to test buffer boundary handling, intentionally misaligned with buffer size */ Error: CPPCHECK_WARNING (CWE-682): [#def69] liburing-2.12/test/recv-inc-ooo.c:314: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 312| size_t end_offset = min(sent_offset + chunk_size, total_bytes); # 313| size_t chunk_len = end_offset - sent_offset; # 314|-> uint8_t* chunk = test_data + sent_offset; # 315| # 316| /* Send test data through the socket */ Error: GCC_ANALYZER_WARNING (CWE-775): [#def70] liburing-2.12/test/recv-mshot-fair.c:109:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/recv-mshot-fair.c:92:18: acquire_resource: stream socket created here liburing-2.12/test/recv-mshot-fair.c:93:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:98:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:102:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/recv-mshot-fair.c:107:15: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:108:12: branch_true: following ‘true’ branch (when ‘ret < 0’)... liburing-2.12/test/recv-mshot-fair.c:109:17: branch_true: ...to here liburing-2.12/test/recv-mshot-fair.c:109:17: danger: ‘sockfd’ leaks here # 107| ret = listen(sockfd, 1); # 108| if (ret < 0) { # 109|-> perror("listen"); # 110| goto err; # 111| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def71] liburing-2.12/test/recv-mshot-fair.c:116:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/recv-mshot-fair.c:92:18: acquire_resource: stream socket created here liburing-2.12/test/recv-mshot-fair.c:93:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:98:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:102:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/recv-mshot-fair.c:107:15: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:108:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/recv-mshot-fair.c:113:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:116:18: danger: ‘sockfd’ leaks here # 114| # 115| socklen = sizeof(saddr); # 116|-> use_fd = accept(sockfd, (struct sockaddr *)&saddr, &socklen); # 117| if (use_fd < 0) { # 118| perror("accept"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def72] liburing-2.12/test/recv-mshot-fair.c:131:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/recv-mshot-fair.c:92:18: acquire_resource: stream socket created here liburing-2.12/test/recv-mshot-fair.c:93:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:98:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:102:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/recv-mshot-fair.c:107:15: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:108:12: branch_true: following ‘true’ branch (when ‘ret < 0’)... liburing-2.12/test/recv-mshot-fair.c:109:17: branch_true: ...to here liburing-2.12/test/recv-mshot-fair.c:131:9: danger: ‘sockfd’ leaks here # 129| return 0; # 130| err: # 131|-> close(sockfd); # 132| return 1; # 133| } Error: CPPCHECK_WARNING (CWE-476): [#def73] liburing-2.12/test/recv-mshot-fair.c:343: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf # 341| # 342| buf = malloc(4096); # 343|-> memset(buf, 0xa5, 4096); # 344| # 345| saddr.sin_family = AF_INET; Error: GCC_ANALYZER_WARNING (CWE-688): [#def74] liburing-2.12/test/recv-mshot-fair.c:343:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘buf’ where non-null expected liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: this call could return NULL liburing-2.12/test/recv-mshot-fair.c:343:9: danger: argument 1 (‘buf’) from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected #argument 1 of ‘__builtin_memset’ must be non-null # 341| # 342| buf = malloc(4096); # 343|-> memset(buf, 0xa5, 4096); # 344| # 345| saddr.sin_family = AF_INET; Error: GCC_ANALYZER_WARNING (CWE-401): [#def75] liburing-2.12/test/recv-mshot-fair.c:351:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_true: following ‘true’ branch (when ‘sockfd < 0’)... liburing-2.12/test/recv-mshot-fair.c:351:17: branch_true: ...to here liburing-2.12/test/recv-mshot-fair.c:351:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 349| sockfd = socket(AF_INET, SOCK_STREAM, 0); # 350| if (sockfd < 0) { # 351|-> perror("socket"); # 352| goto err2; # 353| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def76] liburing-2.12/test/recv-mshot-fair.c:357:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/recv-mshot-fair.c:349:18: acquire_resource: stream socket created here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:357:15: danger: ‘sockfd’ leaks here # 355| pthread_barrier_wait(&rd->connect); # 356| # 357|-> ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)); # 358| if (ret < 0) { # 359| perror("connect"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def77] liburing-2.12/test/recv-mshot-fair.c:357:15: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:357:15: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0) # 355| pthread_barrier_wait(&rd->connect); # 356| # 357|-> ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)); # 358| if (ret < 0) { # 359| perror("connect"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def78] liburing-2.12/test/recv-mshot-fair.c:359:17: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:358:12: branch_true: following ‘true’ branch... liburing-2.12/test/recv-mshot-fair.c:359:17: branch_true: ...to here liburing-2.12/test/recv-mshot-fair.c:359:17: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0) # 357| ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)); # 358| if (ret < 0) { # 359|-> perror("connect"); # 360| goto err; # 361| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def79] liburing-2.12/test/recv-mshot-fair.c:366:23: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:358:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-mshot-fair.c:363:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:365:21: branch_true: following ‘true’ branch... liburing-2.12/test/recv-mshot-fair.c:366:23: branch_true: ...to here liburing-2.12/test/recv-mshot-fair.c:366:23: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0) # 364| # 365| for (i = 0; i < rd->max_sends; i++) { # 366|-> ret = send(sockfd, buf, 4096, 0); # 367| if (ret < 0) { # 368| perror("send"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def80] liburing-2.12/test/recv-mshot-fair.c:368:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:358:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-mshot-fair.c:363:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:365:21: branch_true: following ‘true’ branch... liburing-2.12/test/recv-mshot-fair.c:366:23: branch_true: ...to here liburing-2.12/test/recv-mshot-fair.c:368:25: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0) # 366| ret = send(sockfd, buf, 4096, 0); # 367| if (ret < 0) { # 368|-> perror("send"); # 369| return 1; # 370| } else if (ret != 4096) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def81] liburing-2.12/test/recv-mshot-fair.c:369:32: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:358:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-mshot-fair.c:363:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:365:21: branch_true: following ‘true’ branch... liburing-2.12/test/recv-mshot-fair.c:366:23: branch_true: ...to here liburing-2.12/test/recv-mshot-fair.c:369:32: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0) # 367| if (ret < 0) { # 368| perror("send"); # 369|-> return 1; # 370| } else if (ret != 4096) { # 371| printf("short send\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def82] liburing-2.12/test/recv-mshot-fair.c:377:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:358:12: branch_false: following ‘false’ branch... liburing-2.12/test/recv-mshot-fair.c:363:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:377:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0) # 375| # 376| pthread_barrier_wait(&rd->barrier); # 377|-> close(sockfd); # 378| free(buf); # 379| return 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def83] liburing-2.12/test/recv-mshot-fair.c:381:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ liburing-2.12/test/recv-mshot-fair.c:342:15: acquire_memory: allocated here liburing-2.12/test/recv-mshot-fair.c:350:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/recv-mshot-fair.c:355:9: branch_false: ...to here liburing-2.12/test/recv-mshot-fair.c:381:9: danger: ‘buf’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0) # 379| return 0; # 380| err: # 381|-> close(sockfd); # 382| err2: # 383| free(buf); Error: GCC_ANALYZER_WARNING (CWE-775): [#def84] liburing-2.12/test/sendmsg_iov_clean.c:158:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/sendmsg_iov_clean.c:126:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/sendmsg_iov_clean.c:129:9: branch_false: ...to here liburing-2.12/test/sendmsg_iov_clean.c:134:18: acquire_resource: stream socket created here liburing-2.12/test/sendmsg_iov_clean.c:135:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/sendmsg_iov_clean.c:140:9: branch_false: ...to here liburing-2.12/test/sendmsg_iov_clean.c:145:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/sendmsg_iov_clean.c:151:15: branch_false: ...to here liburing-2.12/test/sendmsg_iov_clean.c:152:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/sendmsg_iov_clean.c:158:15: branch_false: ...to here liburing-2.12/test/sendmsg_iov_clean.c:158:15: danger: ‘sockfd’ leaks here # 156| } # 157| # 158|-> ret = io_uring_queue_init(INFLIGHT, &ring, IORING_SETUP_SINGLE_ISSUER | # 159| IORING_SETUP_DEFER_TASKRUN); # 160| if (ret == -EINVAL) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def85] liburing-2.12/test/shutdown.c:61:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/shutdown.c:38:15: branch_false: ...to here liburing-2.12/test/shutdown.c:40:19: acquire_resource: socket created here liburing-2.12/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:44:15: branch_true: ...to here liburing-2.12/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:47:9: branch_true: ...to here liburing-2.12/test/shutdown.c:51:9: branch_true: following ‘true’ branch... liburing-2.12/test/shutdown.c:52:15: branch_true: ...to here liburing-2.12/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:55:19: branch_true: ...to here liburing-2.12/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:61:9: branch_true: ...to here liburing-2.12/test/shutdown.c:61:9: danger: ‘recv_s0’ leaks here # 59| assert(ret != -1); # 60| # 61|-> t_set_nonblock(p_fd[1]); # 62| # 63| ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def86] liburing-2.12/test/shutdown.c:66:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/shutdown.c:35:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/shutdown.c:38:15: branch_false: ...to here liburing-2.12/test/shutdown.c:40:19: acquire_resource: socket created here liburing-2.12/test/shutdown.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:44:15: branch_true: ...to here liburing-2.12/test/shutdown.c:45:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:47:9: branch_true: ...to here liburing-2.12/test/shutdown.c:51:9: branch_true: following ‘true’ branch... liburing-2.12/test/shutdown.c:52:15: branch_true: ...to here liburing-2.12/test/shutdown.c:53:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:55:19: branch_true: ...to here liburing-2.12/test/shutdown.c:59:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/shutdown.c:61:9: branch_true: ...to here liburing-2.12/test/shutdown.c:64:9: branch_true: following ‘true’ branch... liburing-2.12/test/shutdown.c:66:9: branch_true: ...to here liburing-2.12/test/shutdown.c:66:9: danger: ‘recv_s0’ leaks here # 64| assert(ret == -1); # 65| # 66|-> t_clear_nonblock(p_fd[1]); # 67| # 68| p_fd[0] = accept(recv_s0, NULL, NULL); Error: GCC_ANALYZER_WARNING (CWE-775): [#def87] liburing-2.12/test/socket-nb.c:54:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/socket-nb.c:33:19: acquire_resource: socket created here liburing-2.12/test/socket-nb.c:37:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-nb.c:38:15: branch_true: ...to here liburing-2.12/test/socket-nb.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-nb.c:41:9: branch_true: ...to here liburing-2.12/test/socket-nb.c:44:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-nb.c:45:15: branch_true: ...to here liburing-2.12/test/socket-nb.c:46:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-nb.c:48:19: branch_true: ...to here liburing-2.12/test/socket-nb.c:52:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-nb.c:54:9: branch_true: ...to here liburing-2.12/test/socket-nb.c:54:9: danger: ‘recv_s0’ leaks here # 52| assert(ret != -1); # 53| # 54|-> t_set_nonblock(p_fd[1]); # 55| # 56| ret = connect(p_fd[1], (struct sockaddr *) &addr, sizeof(addr)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def88] liburing-2.12/test/socket-rw-eagain.c:56:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/socket-rw-eagain.c:31:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/socket-rw-eagain.c:34:15: branch_false: ...to here liburing-2.12/test/socket-rw-eagain.c:36:19: acquire_resource: socket created here liburing-2.12/test/socket-rw-eagain.c:39:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-eagain.c:40:15: branch_true: ...to here liburing-2.12/test/socket-rw-eagain.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-eagain.c:43:9: branch_true: ...to here liburing-2.12/test/socket-rw-eagain.c:46:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-rw-eagain.c:47:15: branch_true: ...to here liburing-2.12/test/socket-rw-eagain.c:48:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-eagain.c:50:19: branch_true: ...to here liburing-2.12/test/socket-rw-eagain.c:54:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-eagain.c:56:9: branch_true: ...to here liburing-2.12/test/socket-rw-eagain.c:56:9: danger: ‘recv_s0’ leaks here # 54| assert(ret != -1); # 55| # 56|-> t_set_nonblock(p_fd[1]); # 57| # 58| ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def89] liburing-2.12/test/socket-rw-offset.c:59:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/socket-rw-offset.c:36:15: branch_false: ...to here liburing-2.12/test/socket-rw-offset.c:38:19: acquire_resource: socket created here liburing-2.12/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:42:15: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:45:9: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-rw-offset.c:49:15: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:53:19: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:59:9: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:59:9: danger: ‘recv_s0’ leaks here # 57| assert(ret != -1); # 58| # 59|-> t_set_nonblock(p_fd[1]); # 60| # 61| ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def90] liburing-2.12/test/socket-rw-offset.c:64:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/socket-rw-offset.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/socket-rw-offset.c:36:15: branch_false: ...to here liburing-2.12/test/socket-rw-offset.c:38:19: acquire_resource: socket created here liburing-2.12/test/socket-rw-offset.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:42:15: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:45:9: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:48:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-rw-offset.c:49:15: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:53:19: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw-offset.c:59:9: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:62:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-rw-offset.c:64:9: branch_true: ...to here liburing-2.12/test/socket-rw-offset.c:64:9: danger: ‘recv_s0’ leaks here # 62| assert(ret == -1); # 63| # 64|-> t_clear_nonblock(p_fd[1]); # 65| # 66| p_fd[0] = accept(recv_s0, NULL, NULL); Error: GCC_ANALYZER_WARNING (CWE-775): [#def91] liburing-2.12/test/socket-rw.c:59:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/socket-rw.c:36:15: branch_false: ...to here liburing-2.12/test/socket-rw.c:38:19: acquire_resource: socket created here liburing-2.12/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:42:15: branch_true: ...to here liburing-2.12/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:45:9: branch_true: ...to here liburing-2.12/test/socket-rw.c:48:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-rw.c:49:15: branch_true: ...to here liburing-2.12/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:53:19: branch_true: ...to here liburing-2.12/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:59:9: branch_true: ...to here liburing-2.12/test/socket-rw.c:59:9: danger: ‘recv_s0’ leaks here # 57| assert(ret != -1); # 58| # 59|-> t_set_nonblock(p_fd[1]); # 60| # 61| ret = connect(p_fd[1], (struct sockaddr*)&addr, sizeof(addr)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def92] liburing-2.12/test/socket-rw.c:64:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘recv_s0’ liburing-2.12/test/socket-rw.c:33:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/socket-rw.c:36:15: branch_false: ...to here liburing-2.12/test/socket-rw.c:38:19: acquire_resource: socket created here liburing-2.12/test/socket-rw.c:41:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:42:15: branch_true: ...to here liburing-2.12/test/socket-rw.c:43:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:45:9: branch_true: ...to here liburing-2.12/test/socket-rw.c:48:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-rw.c:49:15: branch_true: ...to here liburing-2.12/test/socket-rw.c:50:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:53:19: branch_true: ...to here liburing-2.12/test/socket-rw.c:57:9: branch_true: following ‘true’ branch (when ‘ret != -1’)... liburing-2.12/test/socket-rw.c:59:9: branch_true: ...to here liburing-2.12/test/socket-rw.c:62:9: branch_true: following ‘true’ branch... liburing-2.12/test/socket-rw.c:64:9: branch_true: ...to here liburing-2.12/test/socket-rw.c:64:9: danger: ‘recv_s0’ leaks here # 62| assert(ret == -1); # 63| # 64|-> t_clear_nonblock(p_fd[1]); # 65| # 66| p_fd[0] = accept(recv_s0, NULL, NULL); Error: GCC_ANALYZER_WARNING: [#def93] liburing-2.12/test/timestamp.c:301:36: warning[-Wanalyzer-fd-use-without-check]: ‘listen’ on possibly invalid file descriptor ‘fd’ liburing-2.12/test/timestamp.c:295:12: branch_true: following ‘true’ branch (when ‘fd == -1’)... liburing-2.12/test/timestamp.c:296:28: branch_true: ...to here liburing-2.12/test/timestamp.c:301:12: branch_true: following ‘true’ branch (when ‘type == 1’)... liburing-2.12/test/timestamp.c:301:36: branch_true: ...to here liburing-2.12/test/timestamp.c:301:36: danger: ‘fd’ could be invalid # 299| t_error(1, errno, "bind rx"); # 300| # 301|-> if (type == SOCK_STREAM && listen(fd, 10)) # 302| t_error(1, errno, "listen rx"); # 303| Error: GCC_ANALYZER_WARNING (CWE-775): [#def94] liburing-2.12/test/timestamp.c:302:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ liburing-2.12/test/timestamp.c:294:14: acquire_resource: socket created here liburing-2.12/test/timestamp.c:295:12: branch_false: following ‘false’ branch (when ‘fd != -1’)... liburing-2.12/test/timestamp.c:298:13: branch_false: ...to here liburing-2.12/test/timestamp.c:301:12: branch_true: following ‘true’ branch (when ‘type == 1’)... liburing-2.12/test/timestamp.c:301:36: branch_true: ...to here liburing-2.12/test/timestamp.c:301:13: branch_true: following ‘true’ branch... liburing-2.12/test/timestamp.c:302:28: branch_true: ...to here liburing-2.12/test/timestamp.c:302:17: danger: ‘fd’ leaks here # 300| # 301| if (type == SOCK_STREAM && listen(fd, 10)) # 302|-> t_error(1, errno, "listen rx"); # 303| # 304| /* leave fd open, will be closed on process exit. Error: GCC_ANALYZER_WARNING (CWE-775): [#def95] liburing-2.12/test/timestamp.c:307:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ liburing-2.12/test/timestamp.c:294:14: acquire_resource: socket created here liburing-2.12/test/timestamp.c:295:12: branch_false: following ‘false’ branch (when ‘fd != -1’)... liburing-2.12/test/timestamp.c:298:13: branch_false: ...to here liburing-2.12/test/timestamp.c:301:12: branch_true: following ‘true’ branch (when ‘type == 1’)... liburing-2.12/test/timestamp.c:301:36: branch_true: ...to here liburing-2.12/test/timestamp.c:301:13: branch_false: following ‘false’ branch... liburing-2.12/test/timestamp.c:307:1: branch_false: ...to here liburing-2.12/test/timestamp.c:307:1: danger: ‘fd’ leaks here # 305| * this enables connect() to succeed and avoids icmp replies # 306| */ # 307|-> } # 308| # 309| static int do_main(int family, int proto) Error: GCC_ANALYZER_WARNING (CWE-401): [#def96] liburing-2.12/test/vec-regbuf.c:96:15: warning[-Wanalyzer-malloc-leak]: leak of ‘bd.buf_rd’ liburing-2.12/test/vec-regbuf.c:578:5: enter_function: entry to ‘main’ liburing-2.12/test/vec-regbuf.c:583:12: branch_false: following ‘false’ branch (when ‘argc <= 1’)... liburing-2.12/test/vec-regbuf.c:586:19: branch_false: ...to here liburing-2.12/test/vec-regbuf.c:588:9: call_function: calling ‘probe_support’ from ‘main’ liburing-2.12/test/vec-regbuf.c:588:9: return_function: returning to ‘main’ from ‘probe_support’ liburing-2.12/test/vec-regbuf.c:589:12: branch_true: following ‘true’ branch... liburing-2.12/test/vec-regbuf.c:594:27: branch_true: ...to here liburing-2.12/test/vec-regbuf.c:594:9: call_function: calling ‘init_buffers’ from ‘main’ liburing-2.12/test/vec-regbuf.c:594:9: return_function: returning to ‘main’ from ‘init_buffers’ liburing-2.12/test/vec-regbuf.c:597:21: branch_true: following ‘true’ branch (when ‘i != 2’)... liburing-2.12/test/vec-regbuf.c:598:22: branch_true: ...to here liburing-2.12/test/vec-regbuf.c:602:17: call_function: calling ‘test_basic’ from ‘main’ # 94| } # 95| # 96|-> ret = io_uring_queue_init(32, ring, 0); # 97| if (ret) { # 98| fprintf(stderr, "ring init error %i\n", ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def97] liburing-2.12/test/zcrx.c:514:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/zcrx.c:497:18: acquire_resource: stream socket created here liburing-2.12/test/zcrx.c:498:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/zcrx.c:503:9: branch_false: ...to here liburing-2.12/test/zcrx.c:507:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/zcrx.c:512:15: branch_false: ...to here liburing-2.12/test/zcrx.c:513:12: branch_true: following ‘true’ branch (when ‘ret < 0’)... liburing-2.12/test/zcrx.c:514:17: branch_true: ...to here liburing-2.12/test/zcrx.c:514:17: danger: ‘sockfd’ leaks here # 512| ret = listen(sockfd, 1); # 513| if (ret < 0) { # 514|-> perror("listen"); # 515| goto err; # 516| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def98] liburing-2.12/test/zcrx.c:521:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/zcrx.c:497:18: acquire_resource: stream socket created here liburing-2.12/test/zcrx.c:498:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/zcrx.c:503:9: branch_false: ...to here liburing-2.12/test/zcrx.c:507:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/zcrx.c:512:15: branch_false: ...to here liburing-2.12/test/zcrx.c:513:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/zcrx.c:518:9: branch_false: ...to here liburing-2.12/test/zcrx.c:521:18: danger: ‘sockfd’ leaks here # 519| # 520| socklen = sizeof(saddr); # 521|-> use_fd = accept(sockfd, (struct sockaddr *)&saddr, &socklen); # 522| if (use_fd < 0) { # 523| perror("accept"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def99] liburing-2.12/test/zcrx.c:546:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/zcrx.c:497:18: acquire_resource: stream socket created here liburing-2.12/test/zcrx.c:498:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/zcrx.c:503:9: branch_false: ...to here liburing-2.12/test/zcrx.c:507:12: branch_false: following ‘false’ branch (when ‘ret >= 0’)... liburing-2.12/test/zcrx.c:512:15: branch_false: ...to here liburing-2.12/test/zcrx.c:513:12: branch_true: following ‘true’ branch (when ‘ret < 0’)... liburing-2.12/test/zcrx.c:514:17: branch_true: ...to here liburing-2.12/test/zcrx.c:546:9: danger: ‘sockfd’ leaks here # 544| return 0; # 545| err: # 546|-> close(sockfd); # 547| return 1; # 548| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def100] liburing-2.12/test/zcrx.c:746:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sockfd’ liburing-2.12/test/zcrx.c:728:12: branch_false: following ‘false’ branch... liburing-2.12/test/zcrx.c:733:9: branch_false: ...to here liburing-2.12/test/zcrx.c:738:18: acquire_resource: stream socket created here liburing-2.12/test/zcrx.c:739:12: branch_false: following ‘false’ branch (when ‘sockfd >= 0’)... liburing-2.12/test/zcrx.c:744:9: branch_false: ...to here liburing-2.12/test/zcrx.c:746:15: danger: ‘sockfd’ leaks here # 744| pthread_barrier_wait(&rd->connect); # 745| # 746|-> ret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)); # 747| if (ret < 0) { # 748| perror("connect");
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.90.0 |
| diffbase-analyzer-version-cppcheck | 2.18.3 |
| diffbase-analyzer-version-gcc | 15.2.1 |
| 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-226.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-gcc-latest-x86_64 |
| diffbase-project-name | liburing-2.9-2.fc43 |
| diffbase-store-results-to | /tmp/tmpxffs5c56/liburing-2.9-2.fc43.tar.xz |
| diffbase-time-created | 2025-10-28 19:10:00 |
| diffbase-time-finished | 2025-10-28 19:12:33 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpxffs5c56/liburing-2.9-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpxffs5c56/liburing-2.9-2.fc43.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-226.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-gcc-latest-x86_64 |
| project-name | liburing-2.12-1.fc44 |
| store-results-to | /tmp/tmp5mu80gjc/liburing-2.12-1.fc44.tar.xz |
| time-created | 2025-10-28 19:13:06 |
| time-finished | 2025-10-28 19:15:18 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmp5mu80gjc/liburing-2.12-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp5mu80gjc/liburing-2.12-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |