{"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",
 "version": "2.1.0",
 "runs": [{"tool": {"driver": {"name": "GNU C23",
                               "fullName": "GNU C23 (GCC) version 16.1.1 20260703 (Red Hat 16.1.1-4) (x86_64-redhat-linux)",
                               "version": "16.1.1 20260703 (Red Hat 16.1.1-4)",
                               "informationUri": "https://gcc.gnu.org/gcc-16/",
                               "rules": [{"id": "-Wanalyzer-possible-null-argument",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-possible-null-argument"},
                                         {"id": "-Wanalyzer-malloc-leak",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-malloc-leak"}]}},
           "taxonomies": [{"name": "CWE",
                           "version": "4.7",
                           "organization": "MITRE",
                           "shortDescription": {"text": "The MITRE Common Weakness Enumeration"},
                           "taxa": [{"id": "690",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/690.html"},
                                    {"id": "401",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/401.html"}]}],
           "invocations": [{"arguments": ["/usr/libexec/gcc/x86_64-redhat-linux/16/cc1",
                                          "-quiet",
                                          "-I",
                                          "../src/include/",
                                          "-D",
                                          "_GNU_SOURCE",
                                          "-D",
                                          "__SANE_USERSPACE_TYPES__",
                                          "-D",
                                          "_LARGEFILE_SOURCE",
                                          "-D",
                                          "_FILE_OFFSET_BITS=64",
                                          "-D",
                                          "LIBURING_BUILD_TEST",
                                          "-include",
                                          "../config-host.h",
                                          "recv-mshot-fair.c",
                                          "-quiet",
                                          "-dumpbase",
                                          "recv-mshot-fair.c",
                                          "-dumpbase-ext",
                                          ".c",
                                          "-m64",
                                          "-mtune=generic",
                                          "-march=x86-64",
                                          "-mtls-dialect=gnu2",
                                          "-O2",
                                          "-Wno-unused-parameter",
                                          "-Wno-sign-compare",
                                          "-Wno-unknown-pragmas",
                                          "-flto=auto",
                                          "-ffat-lto-objects",
                                          "-fexceptions",
                                          "-fstack-protector-strong",
                                          "-fasynchronous-unwind-tables",
                                          "-fstack-clash-protection",
                                          "-fcf-protection=full",
                                          "-fno-omit-frame-pointer",
                                          "-fanalyzer",
                                          "-fdiagnostics-path-format=separate-events",
                                          "-fno-diagnostics-show-caret",
                                          "-fno-lto",
                                          "-fanalyzer-assume-nothrow",
                                          "-fdiagnostics-text-art-charset=none",
                                          "-fdiagnostics-set-output=sarif:file=/builddir/gcc-results/4139-AbOh.sarif",
                                          "-o",
                                          "/tmp/ccIoa3xZ.s"],
                            "workingDirectory": {"uri": "/builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test"},
                            "startTimeUtc": "2026-08-03T18:01:55Z",
                            "executionSuccessful": true,
                            "toolExecutionNotifications": [],
                            "endTimeUtc": "2026-08-03T18:01:58Z"}],
           "originalUriBaseIds": {"PWD": {"uri": "file:///builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test/"}},
           "artifacts": [{"location": {"uri": "recv-mshot-fair.c",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* SPDX-License-Identifier: MIT */\n/*\n * Test that fairness exists between multiple streams, and that setting\n * optlen is honored in terms of terminating a multishot request when\n * a certain byte limit is reached.\n */\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <limits.h>\n#include <arpa/inet.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <pthread.h>\n\n#include \"liburing.h\"\n#include \"helpers.h\"\n\n#define RECV_BIDS\t2048\n#define RECV_BID_MASK\t(RECV_BIDS - 1)\n#define RECV_BGID\t8\n#define RECV_BID_SZ\t32\n\n#define PORT\t10210\n#define HOST\t\"127.0.0.1\"\n\n#define NR_RDS\t4\n\nstatic bool no_iter_support;\nstatic bool no_limit_support;\n\nstatic int use_port = PORT;\n\nstruct recv_data {\n\tpthread_barrier_t connect;\n\tpthread_barrier_t startup;\n\tpthread_barrier_t barrier;\n\n\tstruct io_uring_buf_ring *br;\n\n\tint recv_bytes;\n\tint accept_fd;\n\tunsigned int max_sends;\n\tunsigned int queue_flags;\n\n\tint bytes_since_arm;\n\tint total_bytes;\n\n\tint recv_bundle;\n\tint mshot_limit;\n\n\tint use_port;\n\tint id;\n\n\tint mshot_too_big;\n\tint unfair;\n};\n\n#define PER_ITER_LIMIT\t\t1024\n#define PER_MSHOT_LIMIT\t\t4096\n\nstatic void arm_recv(struct io_uring *ring, struct recv_data *rd)\n{\n\tstruct io_uring_sqe *sqe;\n\tint len = PER_ITER_LIMIT;\n\n\trd->bytes_since_arm = 0;\n\tsqe = io_uring_get_sqe(ring);\n\tio_uring_prep_recv_multishot(sqe, rd->accept_fd, NULL, len, 0);\n\tif (rd->mshot_limit)\n\t\tsqe->optlen = PER_MSHOT_LIMIT;\n\tif (rd->recv_bundle)\n\t\tsqe->ioprio |= IORING_RECVSEND_BUNDLE;\n\tsqe->buf_group = RECV_BGID;\n\tsqe->flags |= IOSQE_BUFFER_SELECT;\n\tio_uring_sqe_set_data(sqe, rd);\n}\n\nstatic int recv_prep(struct io_uring *ring, struct recv_data *rd, int *sock)\n{\n\tstruct sockaddr_in saddr;\n\tint sockfd, ret, val, use_fd;\n\tsocklen_t socklen;\n\n\tmemset(&saddr, 0, sizeof(saddr));\n\tsaddr.sin_family = AF_INET;\n\tsaddr.sin_addr.s_addr = htonl(INADDR_ANY);\n\tsaddr.sin_port = htons(rd->use_port);\n\n\tsockfd = socket(AF_INET, SOCK_STREAM, 0);\n\tif (sockfd < 0) {\n\t\tperror(\"socket\");\n\t\treturn 1;\n\t}\n\n\tval = 1;\n\tsetsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));\n\n\tret = bind(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));\n\tif (ret < 0) {\n\t\tperror(\"bind\");\n\t\tgoto err;\n\t}\n\n\tret = listen(sockfd, 1);\n\tif (ret < 0) {\n\t\tperror(\"listen\");\n\t\tgoto err;\n\t}\n\n\tpthread_barrier_wait(&rd->connect);\n\n\tsocklen = sizeof(saddr);\n\tuse_fd = accept(sockfd, (struct sockaddr *)&saddr, &socklen);\n\tif (use_fd < 0) {\n\t\tperror(\"accept\");\n\t\tgoto err;\n\t}\n\n\trd->accept_fd = use_fd;\n\tpthread_barrier_wait(&rd->startup);\n\tpthread_barrier_wait(&rd->barrier);\n\n\trd->recv_bytes = rd->max_sends * 4096;\n\tarm_recv(ring, rd);\n\t*sock = sockfd;\n\treturn 0;\nerr:\n\tclose(sockfd);\n\treturn 1;\n}\n\nstruct iter {\n\tint last_res;\n\tint last_id;\n\tint count;\n};\n\nstatic void iter_done(struct recv_data *rd, struct iter *iter)\n{\n\tif (!iter->count)\n\t\treturn;\n\titer->count = 0;\n}\n\nstatic struct recv_data *last_rd;\nstatic int bytes_since_last;\n\nstatic int recv_get_cqe(struct io_uring *ring,\n\t\t\tstruct io_uring_cqe **cqe, struct iter *iter)\n{\n\tstruct __kernel_timespec ts = { .tv_sec = 0, .tv_nsec = 100000000LL };\n\tint ret;\n\n\tdo {\n\t\tret = io_uring_wait_cqe_timeout(ring, cqe, &ts);\n\t\tif (!ret) {\n\t\t\tstruct recv_data *rd = io_uring_cqe_get_data(*cqe);\n\n\t\t\tif (last_rd != rd) {\n\t\t\t\tif (last_rd) {\n\t\t\t\t\tint diff = bytes_since_last - PER_ITER_LIMIT;\n\n\t\t\t\t\tif (bytes_since_last > PER_ITER_LIMIT &&\n\t\t\t\t\t    diff > RECV_BID_SZ)\n\t\t\t\t\t\trd->unfair++;\n\t\t\t\t}\n\t\t\t\tlast_rd = rd;\n\t\t\t\tbytes_since_last = 0;\n\t\t\t}\n\t\t\tif ((*cqe)->res == iter->last_res && rd->id == iter->last_id) {\n\t\t\t\titer->count++;\n\t\t\t} else {\n\t\t\t\titer_done(rd, iter);\n\t\t\t}\n\t\t\titer->last_res = (*cqe)->res;\n\t\t\tbytes_since_last += (*cqe)->res;\n\t\t\titer->last_id = rd->id;\n\t\t\treturn 0;\n\t\t}\n\t\tif (ret == -ETIME)\n\t\t\tcontinue;\n\t\tfprintf(stderr, \"wait recv: %d\\n\", ret);\n\t\tbreak;\n\t} while (1);\n\n\treturn 1;\n}\n\nstatic int do_recv(struct io_uring *ring)\n{\n\tstruct iter iter = { .last_res = -4096, };\n\tstruct io_uring_cqe *cqe;\n\tstruct recv_data *rd;\n\tint ret = 1;\n\tint done = 0;\n\tint pending_submit = 0;\n\n\tlast_rd = NULL;\n\tbytes_since_last = 0;\n\tdo {\n\t\tif (recv_get_cqe(ring, &cqe, &iter))\n\t\t\tbreak;\n\t\trd = io_uring_cqe_get_data(cqe);\n\t\tif (cqe->res == -EINVAL) {\n\t\t\tfprintf(stdout, \"recv not supported, skipping\\n\");\n\t\t\treturn 0;\n\t\t}\n\t\tif (cqe->res < 0) {\n\t\t\tfprintf(stderr, \"failed recv cqe: %d\\n\", cqe->res);\n\t\t\tgoto err;\n\t\t}\n\t\tif (cqe->res && !(cqe->flags & IORING_CQE_F_BUFFER)) {\n\t\t\tfprintf(stderr, \"no buffer set in recv\\n\");\n\t\t\tgoto err;\n\t\t}\n\t\trd->recv_bytes -= cqe->res;\n\t\trd->bytes_since_arm += cqe->res;\n\t\trd->total_bytes += cqe->res;\n\t\tif (!cqe->res || !rd->recv_bytes) {\n\t\t\tio_uring_cqe_seen(ring, cqe);\n\t\t\tdone++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (rd->mshot_limit && rd->bytes_since_arm > PER_MSHOT_LIMIT)\n\t\t\trd->mshot_too_big++;\n\t\tio_uring_cqe_seen(ring, cqe);\n\t\tif (!(cqe->flags & IORING_CQE_F_MORE) && rd->recv_bytes) {\n\t\t\tarm_recv(ring, rd);\n\t\t\tpending_submit++;\n\t\t}\n\t\tif (pending_submit == NR_RDS)\n\t\t\tio_uring_submit(ring);\n\t} while (done < NR_RDS);\n\n\tret = 0;\n\titer_done(rd, &iter);\nerr:\n\treturn ret;\n}\n\nstatic void *recv_fn(void *data)\n{\n\tstruct recv_data *rds = data;\n\tstruct io_uring_params p = { };\n\tstruct io_uring_buf_ring *br = NULL;\n\tstruct io_uring ring;\n\tunsigned int buf_len;\n\tvoid *buf = NULL, *ptr;\n\tint ret, sock[NR_RDS], i;\n\tint brflags, ring_setup = 0;\n\n\tfor (i = 0; i < NR_RDS; i++) {\n\t\tsock[i] = -1;\n\t\trds[i].accept_fd = -1;\n\t}\n\n\tp.cq_entries = 4096;\n\tp.flags = rds[0].queue_flags | IORING_SETUP_CQSIZE;\n\tret = io_uring_queue_init_params(16, &ring, &p);\n\tif (ret) {\n\t\tif (ret == -EINVAL) {\n\t\t\tno_iter_support = true;\n\t\t\tgoto skip;\n\t\t}\n\t\tfprintf(stderr, \"ring init: %d\\n\", ret);\n\t\tgoto err;\n\t}\n\n\tring_setup = 1;\n\tif (posix_memalign(&buf, 4096, NR_RDS * rds[0].max_sends * 4096))\n\t\tgoto err;\n\n\tbrflags = 0;\n\tbr = io_uring_setup_buf_ring(&ring, RECV_BIDS, RECV_BGID, brflags, &ret);\n\tif (!br) {\n\t\tif (ret == -EINVAL) {\n\t\t\tno_iter_support = true;\n\t\t\tgoto skip;\n\t\t}\n\t\tfprintf(stderr, \"failed setting up recv ring %d\\n\", ret);\n\t\tgoto err;\n\t}\n\n\tptr = buf;\n\tbuf_len = RECV_BID_SZ;\n\tfor (i = 0; i < RECV_BIDS; i++) {\n\t\tio_uring_buf_ring_add(br, ptr, buf_len, i, RECV_BID_MASK, i);\n\t\tptr += buf_len;\n\t}\n\tio_uring_buf_ring_advance(br, RECV_BIDS);\n\n\tfor (i = 0; i < NR_RDS; i++) {\n\t\tret = recv_prep(&ring, &rds[i], &sock[i]);\n\t\tif (ret) {\n\t\t\tfprintf(stderr, \"recv_prep failed: %d\\n\", ret);\n\t\t\tgoto err;\n\t\t}\n\t}\n\n\tret = io_uring_submit(&ring);\n\tif (ret != NR_RDS) {\n\t\tstruct io_uring_cqe *cqe;\n\n\t\tif (!io_uring_peek_cqe(&ring, &cqe)) {\n\t\t\tif (cqe->res == -EINVAL) {\n\t\t\t\tif (rds[0].mshot_limit)\n\t\t\t\t\tno_limit_support = true;\n\t\t\t\telse\n\t\t\t\t\tno_iter_support = true;\n\t\t\t\tgoto skip;\n\t\t\t}\n\t\t}\n\t\tfprintf(stderr, \"submit failed: %d\\n\", ret);\n\t\tgoto err;\n\t}\n\n\tret = do_recv(&ring);\nskip:\n\tfor (i = 0; i < NR_RDS; i++) {\n\t\tif (sock[i] != -1)\n\t\t\tclose(sock[i]);\n\t\tif (rds[i].accept_fd != -1)\n\t\t\tclose(rds[i].accept_fd);\n\t}\n\tif (br)\n\t\tio_uring_free_buf_ring(&ring, br, RECV_BIDS, RECV_BGID);\n\tif (ring_setup)\n\t\tio_uring_queue_exit(&ring);\n\tfree(buf);\nerr:\n\treturn (void *)(intptr_t)ret;\n}\n\nstatic int do_send(struct recv_data *rd)\n{\n\tstruct sockaddr_in saddr = { };\n\tint sockfd, ret, i;\n\tvoid *buf;\n\n\tbuf = malloc(4096);\n\tmemset(buf, 0xa5, 4096);\n\n\tsaddr.sin_family = AF_INET;\n\tsaddr.sin_port = htons(rd->use_port);\n\tinet_pton(AF_INET, HOST, &saddr.sin_addr);\n\n\tsockfd = socket(AF_INET, SOCK_STREAM, 0);\n\tif (sockfd < 0) {\n\t\tperror(\"socket\");\n\t\tgoto err2;\n\t}\n\n\tpthread_barrier_wait(&rd->connect);\n\n\tret = connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr));\n\tif (ret < 0) {\n\t\tperror(\"connect\");\n\t\tgoto err;\n\t}\n\n\tpthread_barrier_wait(&rd->startup);\n\n\tfor (i = 0; i < rd->max_sends; i++) {\n\t\tret = send(sockfd, buf, 4096, 0);\n\t\tif (ret < 0) {\n\t\t\tperror(\"send\");\n\t\t\treturn 1;\n\t\t} else if (ret != 4096) {\n\t\t\tprintf(\"short send\\n\");\n\t\t\tgoto err;\n\t\t}\n\t}\n\n\tpthread_barrier_wait(&rd->barrier);\n\tclose(sockfd);\n\tfree(buf);\n\treturn 0;\nerr:\n\tclose(sockfd);\nerr2:\n\tfree(buf);\n\treturn 1;\n}\n\nstruct res {\n\tint mshot_too_big;\n\tint unfair;\n};\n\nstatic int test(int nr_send, int bundle, int mshot_limit,\n\t\tunsigned int queue_flags, struct res *r)\n{\n\tstruct recv_data rds[NR_RDS] = { };\n\tpthread_t recv_thread;\n\tint ret, i;\n\tvoid *retval;\n\n\tmemset(r, 0, sizeof(*r));\n\n\tfor (i = 0; i < NR_RDS; i++) {\n\t\tstruct recv_data *rd = &rds[i];\n\n\t\trd->use_port = ++use_port;\n\n\t\tpthread_barrier_init(&rd->connect, NULL, 2);\n\t\tpthread_barrier_init(&rd->startup, NULL, 2);\n\t\tpthread_barrier_init(&rd->barrier, NULL, 2);\n\n\t\trd->queue_flags = queue_flags;\n\t\trd->max_sends = nr_send;\n\t\trd->recv_bundle = bundle;\n\t\trd->recv_bytes = nr_send * 4096;\n\t\trd->mshot_limit = mshot_limit;\n\t\trd->id = i + 1;\n\t}\n\n\tret = pthread_create(&recv_thread, NULL, recv_fn, rds);\n\tif (ret) {\n\t\tfprintf(stderr, \"Thread create failed: %d\\n\", ret);\n\t\treturn 1;\n\t}\n\n\tfor (i = 0; i < NR_RDS; i++) {\n\t\tstruct recv_data *rd = &rds[i];\n\n\t\tret = do_send(rd);\n\t\tif (ret)\n\t\t\treturn ret;\n\t}\n\n\tpthread_join(recv_thread, &retval);\n\n\tfor (i = 0; i < NR_RDS; i++) {\n\t\tstruct recv_data *rd = &rds[i];\n\n\t\tr->mshot_too_big += rd->mshot_too_big;\n\t\tr->unfair += rd->unfair;\n\t}\n\n\treturn (intptr_t) retval;\n}\n\nstatic int run_tests(void)\n{\n\tstruct res r;\n\tint ret;\n\n\tret = test(2, 1, 0, IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_SINGLE_ISSUER, &r);\n\tif (ret) {\n\t\tif (no_iter_support)\n\t\t\treturn T_EXIT_SKIP;\n\t\tfprintf(stderr, \"test DEFER bundle failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\t/* DEFER_TASKRUN should be fully fair and not have overshoots */\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"DEFER bundle unfair=%d, too_big=%d\\n\", r.unfair, r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tret = test(2, 0, 0, IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_SINGLE_ISSUER, &r);\n\tif (ret) {\n\t\tfprintf(stderr, \"test DEFER failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"DEFER unfair=%d, too_big=%d\\n\", r.unfair, r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tret = test(2, 1, 0, IORING_SETUP_COOP_TASKRUN, &r);\n\tif (ret) {\n\t\tfprintf(stderr, \"test COOP bundle failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"COOP bundle too_big=%d\\n\", r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tret = test(2, 0, 0, IORING_SETUP_COOP_TASKRUN, &r);\n\tif (ret) {\n\t\tfprintf(stderr, \"test COOP failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"!DEFER too_big=%d\\n\", r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tret = test(2, 1, 1, IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_SINGLE_ISSUER, &r);\n\tif (ret) {\n\t\tif (no_limit_support)\n\t\t\treturn T_EXIT_PASS;\n\t\tfprintf(stderr, \"test DEFER bundle cap failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\t/* DEFER_TASKRUN should be fully fair and not have overshoots */\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"DEFER bundle cap unfair=%d, too_big=%d\\n\", r.unfair, r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tret = test(2, 0, 1, IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_SINGLE_ISSUER, &r);\n\tif (ret) {\n\t\tfprintf(stderr, \"test DEFER cap failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"DEFER cap unfair=%d, too_big=%d\\n\", r.unfair, r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tret = test(2, 1, 1, IORING_SETUP_COOP_TASKRUN, &r);\n\tif (ret) {\n\t\tfprintf(stderr, \"test COOP bundle cap failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"COOP bundle cap too_big=%d\\n\", r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tret = test(2, 0, 1, IORING_SETUP_COOP_TASKRUN, &r);\n\tif (ret) {\n\t\tfprintf(stderr, \"test COOP cap failed\\n\");\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\tif (r.unfair || r.mshot_too_big) {\n\t\tfprintf(stderr, \"COOP cap too_big=%d\\n\", r.mshot_too_big);\n\t\treturn T_EXIT_FAIL;\n\t}\n\n\treturn T_EXIT_PASS;\n}\n\nint main(int argc, char *argv[])\n{\n\tint ret;\n\n\tif (argc > 1)\n\t\treturn T_EXIT_SKIP;\n\n\tret = run_tests();\n\tif (ret != T_EXIT_PASS)\n\t\treturn ret;\n\n\treturn T_EXIT_PASS;\n}\n"},
                          "roles": ["analysisTarget",
                                    "tracedFile"]},
                         {"location": {"uri": "/usr/include/string.h"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* Copyright (C) 1991-2026 Free Software Foundation, Inc.\n   This file is part of the GNU C Library.\n\n   The GNU C Library is free software; you can redistribute it and/or\n   modify it under the terms of the GNU Lesser General Public\n   License as published by the Free Software Foundation; either\n   version 2.1 of the License, or (at your option) any later version.\n\n   The GNU C Library is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n   Lesser General Public License for more details.\n\n   You should have received a copy of the GNU Lesser General Public\n   License along with the GNU C Library; if not, see\n   <https://www.gnu.org/licenses/>.  */\n\n/*\n *\tISO C99 Standard: 7.21 String handling\t<string.h>\n */\n\n#ifndef\t_STRING_H\n#define\t_STRING_H\t1\n\n#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION\n#include <bits/libc-header-start.h>\n\n__BEGIN_DECLS\n\n#if __GLIBC_USE (ISOC23)\n# define __STDC_VERSION_STRING_H__ 202311L\n#endif\n\n/* Get size_t and NULL from <stddef.h>.  */\n#define\t__need_size_t\n#define\t__need_NULL\n#include <stddef.h>\n\n/* Tell the caller that we provide correct C++ prototypes.  */\n#if defined __cplusplus && (__GNUC_PREREQ (4, 4) \\\n\t\t\t    || __glibc_clang_prereq (3, 5))\n# define __CORRECT_ISO_CPP_STRING_H_PROTO\n#endif\n\n\n/* Copy N bytes of SRC to DEST.  */\nextern void *memcpy (void *__restrict __dest, const void *__restrict __src,\n\t\t     size_t __n) __THROW __nonnull ((1, 2));\n/* Copy N bytes of SRC to DEST, guaranteeing\n   correct behavior for overlapping strings.  */\nextern void *memmove (void *__dest, const void *__src, size_t __n)\n     __THROW __nonnull ((1, 2));\n\n/* Copy no more than N bytes of SRC to DEST, stopping when C is found.\n   Return the position in DEST one byte past where C was copied,\n   or NULL if C was not found in the first N bytes of SRC.  */\n#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC23)\nextern void *memccpy (void *__restrict __dest, const void *__restrict __src,\n\t\t      int __c, size_t __n)\n    __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4));\n#endif /* Misc || X/Open.  */\n\n\n/* Set N bytes of S to C.  */\nextern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));\n\n#if defined __USE_MISC || __GLIBC_USE (ISOC23)\n/* Like memset, but the compiler will not delete a call to this\n   function, even if S is dead after the call.  */\nextern void *memset_explicit (void *__s, int __c, size_t __n)\n     __THROW __nonnull ((1)) __fortified_attr_access (__write_only__, 1, 3);\n#endif\n\n/* Compare N bytes of S1 and S2.  */\nextern int memcmp (const void *__s1, const void *__s2, size_t __n)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Compare N bytes of S1 and S2.  Return zero if S1 and S2 are equal.\n   Return some non-zero value otherwise.\n\n   Essentially __memcmpeq has the exact same semantics as memcmp\n   except the return value is less constrained.  memcmp is always a\n   correct implementation of __memcmpeq.  As well !!memcmp, -memcmp,\n   or bcmp are correct implementations.\n\n   __memcmpeq is meant to be used by compilers when memcmp return is\n   only used for its boolean value.\n\n   __memcmpeq is declared only for use by compilers.  Programs should\n   continue to use memcmp.  */\nextern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Search N bytes of S for C.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern void *memchr (void *__s, int __c, size_t __n)\n      __THROW __asm (\"memchr\") __attribute_pure__ __nonnull ((1));\nextern const void *memchr (const void *__s, int __c, size_t __n)\n      __THROW __asm (\"memchr\") __attribute_pure__ __nonnull ((1));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline void *\nmemchr (void *__s, int __c, size_t __n) __THROW\n{\n  return __builtin_memchr (__s, __c, __n);\n}\n\n__extern_always_inline const void *\nmemchr (const void *__s, int __c, size_t __n) __THROW\n{\n  return __builtin_memchr (__s, __c, __n);\n}\n# endif\n}\n#else\nextern void *memchr (const void *__s, int __c, size_t __n)\n      __THROW __attribute_pure__ __nonnull ((1));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define memchr(S, C, N)\t\t\t\t\t\\\n  __glibc_const_generic (S, const void *, memchr (S, C, N))\n# endif\n#endif\n\n#ifdef __USE_GNU\n/* Search in S for C.  This is similar to `memchr' but there is no\n   length limit.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" void *rawmemchr (void *__s, int __c)\n     __THROW __asm (\"rawmemchr\") __attribute_pure__ __nonnull ((1));\nextern \"C++\" const void *rawmemchr (const void *__s, int __c)\n     __THROW __asm (\"rawmemchr\") __attribute_pure__ __nonnull ((1));\n# else\nextern void *rawmemchr (const void *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# endif\n\n/* Search N bytes of S for the final occurrence of C.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" void *memrchr (void *__s, int __c, size_t __n)\n      __THROW __asm (\"memrchr\") __attribute_pure__ __nonnull ((1))\n      __attr_access ((__read_only__, 1, 3));\nextern \"C++\" const void *memrchr (const void *__s, int __c, size_t __n)\n      __THROW __asm (\"memrchr\") __attribute_pure__ __nonnull ((1))\n      __attr_access ((__read_only__, 1, 3));\n# else\nextern void *memrchr (const void *__s, int __c, size_t __n)\n      __THROW __attribute_pure__ __nonnull ((1))\n      __attr_access ((__read_only__, 1, 3));\n# endif\n#endif\n\n\n/* Copy SRC to DEST.  */\nextern char *strcpy (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\n/* Copy no more than N characters of SRC to DEST.  */\nextern char *strncpy (char *__restrict __dest,\n\t\t      const char *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\n\n/* Append SRC onto DEST.  */\nextern char *strcat (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\n/* Append no more than N characters from SRC onto DEST.  */\nextern char *strncat (char *__restrict __dest, const char *__restrict __src,\n\t\t      size_t __n) __THROW __nonnull ((1, 2));\n\n/* Compare S1 and S2.  */\nextern int strcmp (const char *__s1, const char *__s2)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Compare N characters of S1 and S2.  */\nextern int strncmp (const char *__s1, const char *__s2, size_t __n)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Compare the collated forms of S1 and S2.  */\nextern int strcoll (const char *__s1, const char *__s2)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Put a transformation of SRC into no more than N bytes of DEST.  */\nextern size_t strxfrm (char *__restrict __dest,\n\t\t       const char *__restrict __src, size_t __n)\n    __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3));\n\n#ifdef __USE_XOPEN2K8\n/* POSIX.1-2008 extended locale interface (see locale.h).  */\n# include <bits/types/locale_t.h>\n\n/* Compare the collated forms of S1 and S2, using sorting rules from L.  */\nextern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)\n     __THROW __attribute_pure__ __nonnull ((1, 2, 3));\n/* Put a transformation of SRC into no more than N bytes of DEST,\n   using sorting rules from L.  */\nextern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,\n\t\t\t locale_t __l) __THROW __nonnull ((2, 4))\n     __attr_access ((__write_only__, 1, 3));\n#endif\n\n#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8\t\\\n     || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23))\n/* Duplicate S, returning an identical malloc'd string.  */\nextern char *strdup (const char *__s)\n     __THROW __attribute_malloc__ __nonnull ((1));\n#endif\n\n/* Return a malloc'd copy of at most N bytes of STRING.  The\n   resultant string is terminated even if no null terminator\n   appears before STRING[N].  */\n#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23)\nextern char *strndup (const char *__string, size_t __n)\n     __THROW __attribute_malloc__ __nonnull ((1));\n#endif\n\n#if defined __USE_GNU && defined __GNUC__\n/* Duplicate S, returning an identical alloca'd string.  */\n# define strdupa(s)\t\t\t\t\t\t\t      \\\n  (__extension__\t\t\t\t\t\t\t      \\\n    ({\t\t\t\t\t\t\t\t\t      \\\n      const char *__old = (s);\t\t\t\t\t\t      \\\n      size_t __len = strlen (__old) + 1;\t\t\t\t      \\\n      char *__new = (char *) __builtin_alloca (__len);\t\t\t      \\\n      (char *) memcpy (__new, __old, __len);\t\t\t\t      \\\n    }))\n\n/* Return an alloca'd copy of at most N bytes of string.  */\n# define strndupa(s, n)\t\t\t\t\t\t\t      \\\n  (__extension__\t\t\t\t\t\t\t      \\\n    ({\t\t\t\t\t\t\t\t\t      \\\n      const char *__old = (s);\t\t\t\t\t\t      \\\n      size_t __len = strnlen (__old, (n));\t\t\t\t      \\\n      char *__new = (char *) __builtin_alloca (__len + 1);\t\t      \\\n      __new[__len] = '\\0';\t\t\t\t\t\t      \\\n      (char *) memcpy (__new, __old, __len);\t\t\t\t      \\\n    }))\n#endif\n\n/* Find the first occurrence of C in S.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strchr (char *__s, int __c)\n     __THROW __asm (\"strchr\") __attribute_pure__ __nonnull ((1));\nextern const char *strchr (const char *__s, int __c)\n     __THROW __asm (\"strchr\") __attribute_pure__ __nonnull ((1));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrchr (char *__s, int __c) __THROW\n{\n  return __builtin_strchr (__s, __c);\n}\n\n__extern_always_inline const char *\nstrchr (const char *__s, int __c) __THROW\n{\n  return __builtin_strchr (__s, __c);\n}\n# endif\n}\n#else\nextern char *strchr (const char *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strchr(S, C)\t\t\t\t\t\t\\\n  __glibc_const_generic (S, const char *, strchr (S, C))\n# endif\n#endif\n/* Find the last occurrence of C in S.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strrchr (char *__s, int __c)\n     __THROW __asm (\"strrchr\") __attribute_pure__ __nonnull ((1));\nextern const char *strrchr (const char *__s, int __c)\n     __THROW __asm (\"strrchr\") __attribute_pure__ __nonnull ((1));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrrchr (char *__s, int __c) __THROW\n{\n  return __builtin_strrchr (__s, __c);\n}\n\n__extern_always_inline const char *\nstrrchr (const char *__s, int __c) __THROW\n{\n  return __builtin_strrchr (__s, __c);\n}\n# endif\n}\n#else\nextern char *strrchr (const char *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strrchr(S, C)\t\t\t\t\t\t\\\n  __glibc_const_generic (S, const char *, strrchr (S, C))\n# endif\n#endif\n\n#ifdef __USE_MISC\n/* This function is similar to `strchr'.  But it returns a pointer to\n   the closing NUL byte in case C is not found in S.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" char *strchrnul (char *__s, int __c)\n     __THROW __asm (\"strchrnul\") __attribute_pure__ __nonnull ((1));\nextern \"C++\" const char *strchrnul (const char *__s, int __c)\n     __THROW __asm (\"strchrnul\") __attribute_pure__ __nonnull ((1));\n# else\nextern char *strchrnul (const char *__s, int __c)\n     __THROW __attribute_pure__ __nonnull ((1));\n# endif\n#endif\n\n/* Return the length of the initial segment of S which\n   consists entirely of characters not in REJECT.  */\nextern size_t strcspn (const char *__s, const char *__reject)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Return the length of the initial segment of S which\n   consists entirely of characters in ACCEPT.  */\nextern size_t strspn (const char *__s, const char *__accept)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n/* Find the first occurrence in S of any character in ACCEPT.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strpbrk (char *__s, const char *__accept)\n     __THROW __asm (\"strpbrk\") __attribute_pure__ __nonnull ((1, 2));\nextern const char *strpbrk (const char *__s, const char *__accept)\n     __THROW __asm (\"strpbrk\") __attribute_pure__ __nonnull ((1, 2));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrpbrk (char *__s, const char *__accept) __THROW\n{\n  return __builtin_strpbrk (__s, __accept);\n}\n\n__extern_always_inline const char *\nstrpbrk (const char *__s, const char *__accept) __THROW\n{\n  return __builtin_strpbrk (__s, __accept);\n}\n# endif\n}\n#else\nextern char *strpbrk (const char *__s, const char *__accept)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strpbrk(S, ACCEPT)\t\t\t\t\t\\\n  __glibc_const_generic (S, const char *, strpbrk (S, ACCEPT))\n# endif\n#endif\n/* Find the first occurrence of NEEDLE in HAYSTACK.  */\n#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\"\n{\nextern char *strstr (char *__haystack, const char *__needle)\n     __THROW __asm (\"strstr\") __attribute_pure__ __nonnull ((1, 2));\nextern const char *strstr (const char *__haystack, const char *__needle)\n     __THROW __asm (\"strstr\") __attribute_pure__ __nonnull ((1, 2));\n\n# ifdef __OPTIMIZE__\n__extern_always_inline char *\nstrstr (char *__haystack, const char *__needle) __THROW\n{\n  return __builtin_strstr (__haystack, __needle);\n}\n\n__extern_always_inline const char *\nstrstr (const char *__haystack, const char *__needle) __THROW\n{\n  return __builtin_strstr (__haystack, __needle);\n}\n# endif\n}\n#else\nextern char *strstr (const char *__haystack, const char *__needle)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n# if __GLIBC_USE (ISOC23) && defined __glibc_const_generic && !defined _LIBC\n#  define strstr(HAYSTACK, NEEDLE)\t\t\t\\\n  __glibc_const_generic (HAYSTACK, const char *,\t\\\n\t\t\t strstr (HAYSTACK, NEEDLE))\n# endif\n#endif\n\n\n/* Divide S into tokens separated by characters in DELIM.  */\nextern char *strtok (char *__restrict __s, const char *__restrict __delim)\n     __THROW __nonnull ((2));\n\n/* Divide S into tokens separated by characters in DELIM.  Information\n   passed between calls are stored in SAVE_PTR.  */\nextern char *__strtok_r (char *__restrict __s,\n\t\t\t const char *__restrict __delim,\n\t\t\t char **__restrict __save_ptr)\n     __THROW __nonnull ((2, 3));\n#ifdef __USE_POSIX\nextern char *strtok_r (char *__restrict __s, const char *__restrict __delim,\n\t\t       char **__restrict __save_ptr)\n     __THROW __nonnull ((2, 3));\n#endif\n\n#ifdef __USE_MISC\n/* Similar to `strstr' but this function ignores the case of both strings.  */\n# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" char *strcasestr (char *__haystack, const char *__needle)\n     __THROW __asm (\"strcasestr\") __attribute_pure__ __nonnull ((1, 2));\nextern \"C++\" const char *strcasestr (const char *__haystack,\n\t\t\t\t     const char *__needle)\n     __THROW __asm (\"strcasestr\") __attribute_pure__ __nonnull ((1, 2));\n# else\nextern char *strcasestr (const char *__haystack, const char *__needle)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n# endif\n#endif\n\n#ifdef __USE_MISC\n/* Find the first occurrence of NEEDLE in HAYSTACK.\n   NEEDLE is NEEDLELEN bytes long;\n   HAYSTACK is HAYSTACKLEN bytes long.  */\nextern void *memmem (const void *__haystack, size_t __haystacklen,\n\t\t     const void *__needle, size_t __needlelen)\n     __THROW __attribute_pure__ __nonnull ((1, 3))\n    __attr_access ((__read_only__, 1, 2))\n    __attr_access ((__read_only__, 3, 4));\n\n/* Copy N bytes of SRC to DEST, return pointer to bytes after the\n   last written byte.  */\nextern void *__mempcpy (void *__restrict __dest,\n\t\t\tconst void *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\nextern void *mempcpy (void *__restrict __dest,\n\t\t      const void *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\n#endif\n\n\n/* Return the length of S.  */\nextern size_t strlen (const char *__s)\n     __THROW __attribute_pure__ __nonnull ((1));\n\n#ifdef\t__USE_XOPEN2K8\n/* Find the length of STRING, but scan at most MAXLEN characters.\n   If no '\\0' terminator is found in that many characters, return MAXLEN.  */\nextern size_t strnlen (const char *__string, size_t __maxlen)\n     __THROW __attribute_pure__ __nonnull ((1));\n#endif\n\n\n/* Return a string describing the meaning of the `errno' code in ERRNUM.  */\nextern char *strerror (int __errnum) __THROW;\n#ifdef __USE_XOPEN2K\n/* Reentrant version of `strerror'.\n   There are 2 flavors of `strerror_r', GNU which returns the string\n   and may or may not use the supplied temporary buffer and POSIX one\n   which fills the string into the buffer.\n   To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L\n   without -D_GNU_SOURCE is needed, otherwise the GNU version is\n   preferred.  */\n# if defined __USE_XOPEN2K && !defined __USE_GNU\n/* Fill BUF with a string describing the meaning of the `errno' code in\n   ERRNUM.  */\n#  ifdef __REDIRECT_NTH\nextern int __REDIRECT_NTH (strerror_r,\n\t\t\t   (int __errnum, char *__buf, size_t __buflen),\n\t\t\t   __xpg_strerror_r) __nonnull ((2))\n    __attr_access ((__write_only__, 2, 3));\n#  else\nextern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)\n     __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));\n#   define strerror_r __xpg_strerror_r\n#  endif\n# else\n/* If a temporary buffer is required, at most BUFLEN bytes of BUF will be\n   used.  */\nextern char *strerror_r (int __errnum, char *__buf, size_t __buflen)\n     __THROW __nonnull ((2)) __wur  __attr_access ((__write_only__, 2, 3));\n# endif\n\n# ifdef __USE_GNU\n/* Return a string describing the meaning of tthe error in ERR.  */\nextern const char *strerrordesc_np (int __err) __THROW;\n/* Return a string with the error name in ERR.  */\nextern const char *strerrorname_np (int __err) __THROW;\n# endif\n#endif\n\n#ifdef __USE_XOPEN2K8\n/* Translate error number to string according to the locale L.  */\nextern char *strerror_l (int __errnum, locale_t __l) __THROW;\n#endif\n\n#ifdef __USE_MISC\n# include <strings.h>\n\n/* Set N bytes of S to 0.  The compiler will not delete a call to this\n   function, even if S is dead after the call.  */\nextern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1))\n    __fortified_attr_access (__write_only__, 1, 2);\n\n/* Return the next DELIM-delimited token from *STRINGP,\n   terminating it with a '\\0', and update *STRINGP to point past it.  */\nextern char *strsep (char **__restrict __stringp,\n\t\t     const char *__restrict __delim)\n     __THROW __nonnull ((1, 2));\n#endif\n\n#ifdef\t__USE_XOPEN2K8\n/* Return a string describing the meaning of the signal number in SIG.  */\nextern char *strsignal (int __sig) __THROW;\n\n# ifdef __USE_GNU\n/* Return an abbreviation string for the signal number SIG.  */\nextern const char *sigabbrev_np (int __sig) __THROW;\n/* Return a string describing the meaning of the signal number in SIG,\n   the result is not translated.  */\nextern const char *sigdescr_np (int __sig) __THROW;\n# endif\n\n/* Copy SRC to DEST, returning the address of the terminating '\\0' in DEST.  */\nextern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\nextern char *stpcpy (char *__restrict __dest, const char *__restrict __src)\n     __THROW __nonnull ((1, 2));\n\n/* Copy no more than N characters of SRC to DEST, returning the address of\n   the last character written into DEST.  */\nextern char *__stpncpy (char *__restrict __dest,\n\t\t\tconst char *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\nextern char *stpncpy (char *__restrict __dest,\n\t\t      const char *__restrict __src, size_t __n)\n     __THROW __nonnull ((1, 2));\n#endif\n\n#ifdef __USE_MISC\n/* Copy at most N - 1 characters from SRC to DEST.  */\nextern size_t strlcpy (char *__restrict __dest,\n\t\t       const char *__restrict __src, size_t __n)\n  __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 3));\n\n/* Append SRC to DEST, possibly with truncation to keep the total size\n   below N.  */\nextern size_t strlcat (char *__restrict __dest,\n\t\t       const char *__restrict __src, size_t __n)\n  __THROW __nonnull ((1, 2))  __attr_access ((__read_write__, 1, 3));\n#endif\n\n#ifdef\t__USE_GNU\n/* Compare S1 and S2 as strings holding name & indices/version numbers.  */\nextern int strverscmp (const char *__s1, const char *__s2)\n     __THROW __attribute_pure__ __nonnull ((1, 2));\n\n/* Sautee STRING briskly.  */\nextern char *strfry (char *__string) __THROW __nonnull ((1));\n\n/* Frobnicate N bytes of S.  */\nextern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1))\n    __attr_access ((__read_write__, 1, 2));\n\n# ifndef basename\n/* Return the file name within directory of FILENAME.  We don't\n   declare the function if the `basename' macro is available (defined\n   in <libgen.h>) which makes the XPG version of this function\n   available.  */\n#  ifdef __CORRECT_ISO_CPP_STRING_H_PROTO\nextern \"C++\" char *basename (char *__filename)\n     __THROW __asm (\"basename\") __nonnull ((1));\nextern \"C++\" const char *basename (const char *__filename)\n     __THROW __asm (\"basename\") __nonnull ((1));\n#  else\nextern char *basename (const char *__filename) __THROW __nonnull ((1));\n#  endif\n# endif\n#endif\n\n#if __GNUC_PREREQ (3,4)\n# if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function\n/* Functions with security checks.  */\n#  include <bits/string_fortified.h>\n# endif\n#endif\n\n__END_DECLS\n\n#endif /* string.h  */\n"},
                          "roles": ["resultFile"]}],
           "results": [{"ruleId": "-Wanalyzer-possible-null-argument",
                        "taxa": [{"id": "690",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3050},
                                       "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                       "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                       "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                       "gcc/analyzer/saved_diagnostic/idx": 64,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 141},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 1,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 231},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 4,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 231},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 5,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 141},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 0,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3050},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 65,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3140},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 68,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3140},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 69,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "possible_null_arg"},
                        "level": "warning",
                        "message": {"text": "use of possibly-NULL ‘buf’ where non-null expected"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 344,
                                                                       "startColumn": 9,
                                                                       "endColumn": 32},
                                                            "contextRegion": {"startLine": 344,
                                                                              "snippet": {"text": "\tmemset(buf, 0xa5, 4096);\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "do_send"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 446,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 446,
                                                                                                                           "snippet": {"text": "static int run_tests(void)\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "run_tests"}],
                                                                                    "message": {"text": "entry to ‘run_tests’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 20,
                                                                                                                                 "dst_id": 21}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 451,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 89},
                                                                                                         "contextRegion": {"startLine": 451,
                                                                                                                           "snippet": {"text": "\tret = test(2, 1, 0, IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_SINGLE_ISSUER, &r);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "run_tests"}],
                                                                                    "message": {"text": "calling ‘test’ from ‘run_tests’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 393,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 16},
                                                                                                         "contextRegion": {"startLine": 393,
                                                                                                                           "snippet": {"text": "static int test(int nr_send, int bundle, int mshot_limit,\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "entry to ‘test’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 8},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(9)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 11},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(12)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 197}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘i == 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 12},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(13)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 197}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 420,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 63},
                                                                                                         "contextRegion": {"startLine": 420,
                                                                                                                           "snippet": {"text": "\tret = pthread_create(&recv_thread, NULL, recv_fn, rds);\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 198,
                                                                                                                                 "dst_id": 203}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 421,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 421,
                                                                                                                           "snippet": {"text": "\tif (ret) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘ret == 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 198,
                                                                                                                                 "dst_id": 203}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 421,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 421,
                                                                                                                           "snippet": {"text": "\tif (ret) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 15},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(16)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 205,
                                                                                                                                 "dst_id": 206}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 426,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 426,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 16},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(17)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 205,
                                                                                                                                 "dst_id": 206}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 427,
                                                                                                                    "startColumn": 35,
                                                                                                                    "endColumn": 37},
                                                                                                         "contextRegion": {"startLine": 427,
                                                                                                                           "snippet": {"text": "\t\tstruct recv_data *rd = &rds[i];\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 17},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(18)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 207,
                                                                                                                                 "dst_id": 208}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 429,
                                                                                                                    "startColumn": 23,
                                                                                                                    "endColumn": 34},
                                                                                                         "contextRegion": {"startLine": 429,
                                                                                                                           "snippet": {"text": "\t\tret = do_send(rd);\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "calling ‘do_send’ from ‘test’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 18},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(19)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 337,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 19},
                                                                                                         "contextRegion": {"startLine": 337,
                                                                                                                           "snippet": {"text": "static int do_send(struct recv_data *rd)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "entry to ‘do_send’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 19},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(20)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 343,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 343,
                                                                                                                           "snippet": {"text": "\tbuf = malloc(4096);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "this call could return NULL"}},
                                                                       "kinds": ["acquire",
                                                                                 "memory"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 20},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(21)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 344,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 344,
                                                                                                                           "snippet": {"text": "\tmemset(buf, 0xa5, 4096);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "argument 1 (‘buf’) from [(20)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/19) could be NULL where non-null expected"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 21}]}]}],
                        "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "/usr/include/string.h"},
                                                                   "region": {"startLine": 65,
                                                                              "startColumn": 14,
                                                                              "endColumn": 20},
                                                                   "contextRegion": {"startLine": 65,
                                                                                     "snippet": {"text": "extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));\n"}}},
                                              "message": {"text": "argument 1 of ‘memset’ must be non-null"},
                                              "properties": {"nestingLevel": 0},
                                              "id": 0,
                                              "relationships": [{"target": 1,
                                                                 "kinds": ["isIncludedBy"]}]},
                                             {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 10},
                                                                   "contextRegion": {"startLine": 10,
                                                                                     "snippet": {"text": "#include <string.h>\n"}}},
                                              "relationships": [{"target": 0,
                                                                 "kinds": ["includes"]}],
                                              "id": 1}]},
                       {"ruleId": "-Wanalyzer-malloc-leak",
                        "taxa": [{"id": "401",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3125},
                                       "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                       "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                       "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                       "gcc/analyzer/saved_diagnostic/idx": 66,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 216},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 3,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 306},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 6,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 306},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 7,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 216},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 2,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3125},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 67,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3215},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 70,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 3215},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_17",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(602)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "nonnull ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 71,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"},
                        "level": "warning",
                        "message": {"text": "leak of ‘buf’"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 386,
                                                                       "startColumn": 1,
                                                                       "endColumn": 2},
                                                            "contextRegion": {"startLine": 386,
                                                                              "snippet": {"text": "}\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "do_send"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 446,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 446,
                                                                                                                           "snippet": {"text": "static int run_tests(void)\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "run_tests"}],
                                                                                    "message": {"text": "entry to ‘run_tests’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 20,
                                                                                                                                 "dst_id": 21}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 451,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 89},
                                                                                                         "contextRegion": {"startLine": 451,
                                                                                                                           "snippet": {"text": "\tret = test(2, 1, 0, IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_SINGLE_ISSUER, &r);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "run_tests"}],
                                                                                    "message": {"text": "calling ‘test’ from ‘run_tests’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 393,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 16},
                                                                                                         "contextRegion": {"startLine": 393,
                                                                                                                           "snippet": {"text": "static int test(int nr_send, int bundle, int mshot_limit,\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "entry to ‘test’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 8},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(9)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 176}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 406,
                                                                                                                    "startColumn": 32,
                                                                                                                    "endColumn": 42},
                                                                                                         "contextRegion": {"startLine": 406,
                                                                                                                           "snippet": {"text": "\t\trd->use_port = ++use_port;\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 11},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(12)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 197}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 403,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 403,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘i == 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 12},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(13)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 175,
                                                                                                                                 "dst_id": 197}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 420,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 63},
                                                                                                         "contextRegion": {"startLine": 420,
                                                                                                                           "snippet": {"text": "\tret = pthread_create(&recv_thread, NULL, recv_fn, rds);\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 198,
                                                                                                                                 "dst_id": 203}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 421,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 421,
                                                                                                                           "snippet": {"text": "\tif (ret) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘ret == 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 198,
                                                                                                                                 "dst_id": 203}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 421,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 421,
                                                                                                                           "snippet": {"text": "\tif (ret) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 15},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(16)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 205,
                                                                                                                                 "dst_id": 206}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 426,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 26},
                                                                                                         "contextRegion": {"startLine": 426,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < NR_RDS; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "following ‘true’ branch (when ‘i != 4’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 16},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(17)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 205,
                                                                                                                                 "dst_id": 206}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 427,
                                                                                                                    "startColumn": 35,
                                                                                                                    "endColumn": 37},
                                                                                                         "contextRegion": {"startLine": 427,
                                                                                                                           "snippet": {"text": "\t\tstruct recv_data *rd = &rds[i];\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 17},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(18)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 207,
                                                                                                                                 "dst_id": 208}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 429,
                                                                                                                    "startColumn": 23,
                                                                                                                    "endColumn": 34},
                                                                                                         "contextRegion": {"startLine": 429,
                                                                                                                           "snippet": {"text": "\t\tret = do_send(rd);\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "test"}],
                                                                                    "message": {"text": "calling ‘do_send’ from ‘test’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 18},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(19)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 337,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 19},
                                                                                                         "contextRegion": {"startLine": 337,
                                                                                                                           "snippet": {"text": "static int do_send(struct recv_data *rd)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "entry to ‘do_send’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 19},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(20)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 343,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 343,
                                                                                                                           "snippet": {"text": "\tbuf = malloc(4096);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "allocated here"}},
                                                                       "kinds": ["acquire",
                                                                                 "memory"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 20},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(21)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 344,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 344,
                                                                                                                           "snippet": {"text": "\tmemset(buf, 0xa5, 4096);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "assuming ‘buf’ is non-NULL"}},
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 21},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(22)",
                                                                                      "gcc/analyzer/checker_event/kind": "custom"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 350,
                                                                                                                    "startColumn": 18,
                                                                                                                    "endColumn": 49},
                                                                                                         "contextRegion": {"startLine": 350,
                                                                                                                           "snippet": {"text": "\tsockfd = socket(AF_INET, SOCK_STREAM, 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "when ‘socket’ succeeds"}},
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 22},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(23)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 252,
                                                                                                                                 "dst_id": 255}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 351,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 351,
                                                                                                                           "snippet": {"text": "\tif (sockfd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘sockfd >= 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 23},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(24)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 252,
                                                                                                                                 "dst_id": 255}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 356,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 43},
                                                                                                         "contextRegion": {"startLine": 356,
                                                                                                                           "snippet": {"text": "\tpthread_barrier_wait(&rd->connect);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 24},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(25)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 259,
                                                                                                                                 "dst_id": 262}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 359,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 359,
                                                                                                                           "snippet": {"text": "\tif (ret < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 25},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(26)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 259,
                                                                                                                                 "dst_id": 262}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 364,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 43},
                                                                                                         "contextRegion": {"startLine": 364,
                                                                                                                           "snippet": {"text": "\tpthread_barrier_wait(&rd->startup);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 26},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(27)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 270,
                                                                                                                                 "dst_id": 271}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 366,
                                                                                                                    "startColumn": 21,
                                                                                                                    "endColumn": 38},
                                                                                                         "contextRegion": {"startLine": 366,
                                                                                                                           "snippet": {"text": "\tfor (i = 0; i < rd->max_sends; i++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "following ‘true’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 27},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(28)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 270,
                                                                                                                                 "dst_id": 271}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 367,
                                                                                                                    "startColumn": 23,
                                                                                                                    "endColumn": 49},
                                                                                                         "contextRegion": {"startLine": 367,
                                                                                                                           "snippet": {"text": "\t\tret = send(sockfd, buf, 4096, 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 28},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(29)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "recv-mshot-fair.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 386,
                                                                                                                    "startColumn": 1,
                                                                                                                    "endColumn": 2},
                                                                                                         "contextRegion": {"startLine": 386,
                                                                                                                           "snippet": {"text": "}\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "do_send"}],
                                                                                    "message": {"text": "‘buf’ leaks here; was allocated at [(20)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/19)"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 29}]}]}]}],
           "logicalLocations": [{"name": "do_send",
                                 "fullyQualifiedName": "do_send",
                                 "decoratedName": "do_send",
                                 "kind": "function",
                                 "index": 0},
                                {"name": "run_tests",
                                 "fullyQualifiedName": "run_tests",
                                 "decoratedName": "run_tests",
                                 "kind": "function",
                                 "index": 1},
                                {"name": "test",
                                 "fullyQualifiedName": "test",
                                 "decoratedName": "test",
                                 "kind": "function",
                                 "index": 2}]}]}
