{"$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 C99",
                               "fullName": "GNU C99 (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-fd-leak",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-fd-leak"}]}},
           "taxonomies": [{"name": "CWE",
                           "version": "4.7",
                           "organization": "MITRE",
                           "shortDescription": {"text": "The MITRE Common Weakness Enumeration"},
                           "taxa": [{"id": "775",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/775.html"}]}],
           "invocations": [{"arguments": ["/usr/libexec/gcc/x86_64-redhat-linux/16/cc1",
                                          "-quiet",
                                          "-I",
                                          ".",
                                          "-I",
                                          "./../../../include/",
                                          "-I",
                                          "./../",
                                          "-I",
                                          "/usr/include/glib-2.0",
                                          "-I",
                                          "/usr/lib64/glib-2.0/include",
                                          "-I",
                                          "/usr/include/sysprof-6",
                                          "-I",
                                          "/usr/include/glib-2.0",
                                          "-I",
                                          "/usr/lib64/glib-2.0/include",
                                          "-I",
                                          "/usr/include/libmount",
                                          "-I",
                                          "/usr/include/blkid",
                                          "-I",
                                          "/usr/include/sysprof-6",
                                          "-I",
                                          "/usr/include/blkid",
                                          "-I",
                                          "/usr/include/libmount",
                                          "-I",
                                          "/usr/include/blkid",
                                          "-I",
                                          "/usr/include/uuid",
                                          "-I",
                                          "/usr/include/ext2fs",
                                          "-I",
                                          "/usr/include/et",
                                          "-I",
                                          "/usr/include/e2p",
                                          "-D",
                                          "PACKAGE_NAME=\"libblockdev\"",
                                          "-D",
                                          "PACKAGE_TARNAME=\"libblockdev\"",
                                          "-D",
                                          "PACKAGE_VERSION=\"3.4.0\"",
                                          "-D",
                                          "PACKAGE_STRING=\"libblockdev 3.4.0\"",
                                          "-D",
                                          "PACKAGE_BUGREPORT=\"\"",
                                          "-D",
                                          "PACKAGE_URL=\"https://github.com/storaged-project/libblockdev\"",
                                          "-D",
                                          "PACKAGE=\"libblockdev\"",
                                          "-D",
                                          "VERSION=\"3.4.0\"",
                                          "-D",
                                          "NDEBUG=1",
                                          "-D",
                                          "HAVE_STDIO_H=1",
                                          "-D",
                                          "HAVE_STDLIB_H=1",
                                          "-D",
                                          "HAVE_STRING_H=1",
                                          "-D",
                                          "HAVE_INTTYPES_H=1",
                                          "-D",
                                          "HAVE_STDINT_H=1",
                                          "-D",
                                          "HAVE_STRINGS_H=1",
                                          "-D",
                                          "HAVE_SYS_STAT_H=1",
                                          "-D",
                                          "HAVE_SYS_TYPES_H=1",
                                          "-D",
                                          "HAVE_UNISTD_H=1",
                                          "-D",
                                          "STDC_HEADERS=1",
                                          "-D",
                                          "HAVE_DLFCN_H=1",
                                          "-D",
                                          "LT_OBJDIR=\".libs/\"",
                                          "-D",
                                          "HAVE_DLFCN_H=1",
                                          "-D",
                                          "HAVE_STRING_H=1",
                                          "-D",
                                          "HAVE_UNISTD_H=1",
                                          "-D",
                                          "HAVE_SYS_FCNTL_H=1",
                                          "-D",
                                          "HAVE_SYS_IOCTL_H=1",
                                          "-D",
                                          "HAVE_LINUX_RANDOM_H=1",
                                          "-D",
                                          "HAVE_GLOB_H=1",
                                          "-D",
                                          "HAVE_SYSLOG_H=1",
                                          "-D",
                                          "HAVE_MATH_H=1",
                                          "-D",
                                          "WITH_BD_ESCROW=/**/",
                                          "-D",
                                          "WITH_BD_NVME=/**/",
                                          "-D",
                                          "WITH_BD_BTRFS=/**/",
                                          "-D",
                                          "WITH_BD_CRYPTO=/**/",
                                          "-D",
                                          "WITH_BD_DM=/**/",
                                          "-D",
                                          "WITH_BD_LOOP=/**/",
                                          "-D",
                                          "WITH_BD_LVM=/**/",
                                          "-D",
                                          "WITH_BD_LVM_DBUS=/**/",
                                          "-D",
                                          "WITH_BD_MDRAID=/**/",
                                          "-D",
                                          "WITH_BD_MPATH=/**/",
                                          "-D",
                                          "WITH_BD_SWAP=/**/",
                                          "-D",
                                          "WITH_BD_PART=/**/",
                                          "-D",
                                          "WITH_BD_FS=/**/",
                                          "-D",
                                          "WITH_BD_NVDIMM=/**/",
                                          "-D",
                                          "WITH_BD_NVME=/**/",
                                          "-D",
                                          "WITH_BD_SMART=/**/",
                                          "-D",
                                          "LIBCRYPTSETUP_24=1",
                                          "-D",
                                          "LIBCRYPTSETUP_26=1",
                                          "-D",
                                          "LIBCRYPTSETUP_27=1",
                                          "-D",
                                          "LIBCRYPTSETUP_28=1",
                                          "-D",
                                          "HAVE_LINUX_OPAL=1",
                                          "-D",
                                          "LIBMOUNT_NEW_ERR_API=1",
                                          "-D",
                                          "LIBNDCTL_NEW_MODES=1",
                                          "-D",
                                          "HAVE_LIBNVME_1_4=1",
                                          "-D",
                                          "HAVE_SMART=1",
                                          "-D",
                                          "HAVE_SMARTMONTOOLS=1",
                                          "-D",
                                          "WITH_GZFILEOP",
                                          "-D",
                                          "PIC",
                                          "mount.c",
                                          "-quiet",
                                          "-dumpbase",
                                          "mount.c",
                                          "-dumpbase-ext",
                                          ".c",
                                          "-m64",
                                          "-mtune=generic",
                                          "-march=x86-64",
                                          "-mtls-dialect=gnu2",
                                          "-O2",
                                          "-Wno-error=unused-parameter",
                                          "-Wno-error=shift-count-overflow",
                                          "-Wno-unknown-pragmas",
                                          "-std=gnu99",
                                          "-flto=auto",
                                          "-ffat-lto-objects",
                                          "-fexceptions",
                                          "-fstack-protector-strong",
                                          "-fasynchronous-unwind-tables",
                                          "-fstack-clash-protection",
                                          "-fcf-protection=full",
                                          "-fno-omit-frame-pointer",
                                          "-fPIC",
                                          "-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/5818-xvwe.sarif",
                                          "-o",
                                          "/tmp/cc6JoOyX.s"],
                            "workingDirectory": {"uri": "/builddir/build/BUILD/libblockdev-3.4.0-build/libblockdev-3.4.0/src/plugins/fs"},
                            "startTimeUtc": "2026-08-03T16:58:22Z",
                            "executionSuccessful": true,
                            "toolExecutionNotifications": [],
                            "endTimeUtc": "2026-08-03T16:58:24Z"}],
           "originalUriBaseIds": {"PWD": {"uri": "file:///builddir/build/BUILD/libblockdev-3.4.0-build/libblockdev-3.4.0/src/plugins/fs/"}},
           "artifacts": [{"location": {"uri": "mount.c",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/*\n * Copyright (C) 2017  Red Hat, Inc.\n *\n * This 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 * This 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 this library; if not, see <http://www.gnu.org/licenses/>.\n *\n * Author: Vratislav Podzimek <vpodzime@redhat.com>\n */\n\n#define _GNU_SOURCE\n#include <unistd.h>\n\n#include <glib.h>\n\n#include <libmount/libmount.h>\n#include <sys/types.h>\n#include <sys/wait.h>\n#include <stdlib.h>\n#include <errno.h>\n#include <string.h>\n\n#include \"fs.h\"\n#include \"mount.h\"\n\n#define MOUNT_ERR_BUF_SIZE 1024\n\n#ifdef __clang__\n#define ZERO_INIT {}\n#else\n#define ZERO_INIT {0}\n#endif\n\ntypedef struct MountArgs {\n    const gchar *mountpoint;\n    const gchar *device;\n    const gchar *fstype;\n    const gchar *options;\n    const gchar *spec;\n    gboolean lazy;\n    gboolean force;\n} MountArgs;\n\ntypedef gboolean (*MountFunc) (MountArgs *args, GError **error);\n\nstatic gboolean do_mount (MountArgs *args, GError **error);\n\n#ifndef LIBMOUNT_NEW_ERR_API\nstatic gboolean get_unmount_error_old (struct libmnt_context *cxt, int rc, const gchar *spec, GError **error) {\n    int syscall_errno = 0;\n    int helper_status = 0;\n\n    if (mnt_context_syscall_called (cxt) == 1) {\n        syscall_errno = mnt_context_get_syscall_errno (cxt);\n        switch (syscall_errno) {\n            case 0:\n                return TRUE;\n            case EBUSY:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Target busy.\");\n                break;\n            case EINVAL:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Not a mount point.\");\n                break;\n            case EPERM:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_AUTH,\n                             \"Operation not permitted.\");\n                break;\n            default:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Unmount syscall failed: %d.\", syscall_errno);\n                break;\n        }\n    } else if (mnt_context_helper_executed (cxt) == 1) {\n        helper_status = mnt_context_get_helper_status (cxt);\n        if (helper_status != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Unmount helper program failed: %d.\", helper_status);\n            return FALSE;\n        } else\n            return TRUE;\n    } else {\n        if (rc == 0)\n            return TRUE;\n        else if (rc == -EPERM) {\n            if (mnt_context_tab_applied (cxt))\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_AUTH,\n                             \"Operation not permitted.\");\n            else\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Not mounted.\");\n        } else {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Failed to unmount %s.\", spec);\n        }\n    }\n    return FALSE;\n}\n#else\nstatic gboolean get_unmount_error_new (struct libmnt_context *cxt, int rc, const gchar *spec, GError **error) {\n    int ret = 0;\n    int syscall_errno = 0;\n    char buf[MOUNT_ERR_BUF_SIZE] = {0};\n    gboolean permission = FALSE;\n\n    ret = mnt_context_get_excode (cxt, rc, buf, MOUNT_ERR_BUF_SIZE - 1);\n    if (ret != 0) {\n        /* check whether the call failed because of lack of permission */\n        if (mnt_context_syscall_called (cxt)) {\n            syscall_errno = mnt_context_get_syscall_errno (cxt);\n            permission = syscall_errno == EPERM;\n        } else\n            permission = ret == MNT_EX_USAGE && mnt_context_tab_applied (cxt);\n\n        if (permission)\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_AUTH,\n                         \"Operation not permitted.\");\n        else {\n            if (*buf == '\\0')\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Unknown error when unmounting %s\", spec);\n            else\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"%s\", buf);\n        }\n\n        return FALSE;\n    }\n\n    return TRUE;\n}\n#endif\n\nstatic gboolean do_unmount (MountArgs *args, GError **error) {\n    struct libmnt_context *cxt = NULL;\n    int ret = 0;\n    gboolean success = FALSE;\n\n    cxt = mnt_new_context ();\n\n    if (mnt_context_set_target (cxt, args->spec) != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Failed to set '%s' as target for umount\", args->spec);\n        mnt_free_context (cxt);\n        return FALSE;\n    }\n\n    if (args->lazy) {\n        if (mnt_context_enable_lazy (cxt, TRUE) != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Failed to set lazy unmount for '%s'\", args->spec);\n            mnt_free_context (cxt);\n            return FALSE;\n        }\n    }\n\n    if (args->force) {\n        if (mnt_context_enable_force (cxt, TRUE) != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Failed to set force unmount for '%s'\", args->spec);\n            mnt_free_context (cxt);\n            return FALSE;\n        }\n    }\n\n    ret = mnt_context_umount (cxt);\n#ifdef LIBMOUNT_NEW_ERR_API\n    success = get_unmount_error_new (cxt, ret, args->spec, error);\n#else\n    success = get_unmount_error_old (cxt, ret, args->spec, error);\n#endif\n\n    mnt_free_context (cxt);\n    return success;\n}\n\n#ifndef LIBMOUNT_NEW_ERR_API\nstatic gboolean get_mount_error_old (struct libmnt_context *cxt, int rc, MountArgs *args, GError **error) {\n    int syscall_errno = 0;\n    int helper_status = 0;\n    unsigned long mflags = 0;\n\n    if (mnt_context_get_mflags (cxt, &mflags) != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Failed to get options from string '%s'.\", args->options);\n        return FALSE;\n    }\n\n    if (mnt_context_syscall_called (cxt) == 1) {\n        syscall_errno = mnt_context_get_syscall_errno (cxt);\n        switch (syscall_errno) {\n            case 0:\n                return TRUE;\n            case EBUSY:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Source is already mounted or target is busy.\");\n                break;\n            case EINVAL:\n                if (mflags & MS_REMOUNT)\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Remount attempted, but %s is not mounted at %s.\", args->device, args->mountpoint);\n                else if (mflags & MS_MOVE)\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Move attempted, but %s is not a mount point.\", args->device);\n                else\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Wrong fs type, %s has an invalid superblock or missing helper program.\", args->device);\n                break;\n            case EPERM:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_AUTH,\n                             \"Operation not permitted.\");\n                break;\n            case ENOTBLK:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"%s is not a block device.\", args->device);\n                break;\n            case ENOTDIR:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"%s is not a directory.\", args->mountpoint);\n                break;\n            case ENODEV:\n                if (args->fstype == NULL || strlen (args->fstype) == 0)\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Filesystem type not specified\");\n                else\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_UNKNOWN_FS,\n                                 \"Filesystem type %s not configured in kernel.\", args->fstype);\n                break;\n            case EROFS:\n            case EACCES:\n                  if (mflags & MS_RDONLY) {\n                      g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                   \"Cannot mount %s read-only.\", args->device);\n                      break;\n                  } else if (args->options && (mnt_optstr_get_option (args->options, \"rw\", NULL, NULL) == 0)) {\n                      g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                   \"%s is write-protected but `rw' option given.\", args->device);\n                      break;\n                  } else if (mflags & MS_BIND) {\n                      g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                   \"Mount %s on %s failed.\", args->device, args->mountpoint);\n                      break;\n                  }\n                  /* new versions of libmount do this automatically */\n                  else {\n                      MountArgs ro_args = ZERO_INIT;\n                      gboolean success = FALSE;\n\n                      ro_args.device = args->device;\n                      ro_args.mountpoint = args->mountpoint;\n                      ro_args.fstype = args->fstype;\n                      if (!args->options)\n                          ro_args.options = g_strdup (\"ro\");\n                      else\n                          ro_args.options = g_strdup_printf (\"%s,ro\", args->options);\n\n                      success = do_mount (&ro_args, error);\n\n                      g_free ((gchar*) ro_args.options);\n\n                      return success;\n                  }\n            default:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Mount syscall failed: %d.\", syscall_errno);\n                break;\n        }\n    } else if (mnt_context_helper_executed (cxt) == 1) {\n        helper_status = mnt_context_get_helper_status (cxt);\n        if (helper_status != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Mount helper program failed: %d.\", helper_status);\n            return FALSE;\n        } else\n            return TRUE;\n    } else {\n        switch (rc) {\n            case 0:\n                return TRUE;\n            case -EPERM:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_AUTH,\n                             \"Only root can mount %s.\", args->device);\n                break;\n            case -EBUSY:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"%s is already mounted.\", args->device);\n                break;\n            /* source or target explicitly defined and not found in fstab */\n            case -MNT_ERR_NOFSTAB:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Can't find %s in %s.\", args->device ? args->device : args->mountpoint, mnt_get_fstab_path ());\n                break;\n            case -MNT_ERR_MOUNTOPT:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Failed to parse mount options\");\n                break;\n            case -MNT_ERR_NOSOURCE:\n                if (args->device)\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Can't find %s.\", args->device);\n                else\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Mount source not defined.\");\n                break;\n            case -MNT_ERR_LOOPDEV:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Failed to setup loop device\");\n                break;\n            case -MNT_ERR_NOFSTYPE:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Filesystem type not specified\");\n                break;\n            default:\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Failed to mount %s.\", args->device ? args->device : args->mountpoint);\n                break;\n        }\n    }\n\n    return FALSE;\n}\n\n#else\nstatic gboolean get_mount_error_new (struct libmnt_context *cxt, int rc, MountArgs *args, GError **error) {\n    int ret = 0;\n    int syscall_errno = 0;\n    char buf[MOUNT_ERR_BUF_SIZE] = {0};\n    gboolean permission = FALSE;\n\n    ret = mnt_context_get_excode (cxt, rc, buf, MOUNT_ERR_BUF_SIZE - 1);\n    if (ret != 0) {\n        /* check whether the call failed because of lack of permission */\n        if (mnt_context_syscall_called (cxt) == 1) {\n            syscall_errno = mnt_context_get_syscall_errno (cxt);\n            permission = syscall_errno == EPERM;\n        } else\n            permission = ret == MNT_EX_USAGE && mnt_context_tab_applied (cxt);\n\n        if (permission)\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_AUTH,\n                         \"Operation not permitted.\");\n        else if (syscall_errno == ENODEV)\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_UNKNOWN_FS,\n                         \"Filesystem type %s not configured in kernel.\", args->fstype);\n        else {\n            if (*buf == '\\0')\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Unknown error when mounting %s\", args->device ? args->device : args->mountpoint);\n            else\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"%s\", buf);\n        }\n\n        return FALSE;\n    }\n\n    return TRUE;\n}\n#endif\n\nstatic gboolean do_mount (MountArgs *args, GError **error) {\n    struct libmnt_context *cxt = NULL;\n    int ret = 0;\n    gboolean success = FALSE;\n\n    cxt = mnt_new_context ();\n\n    if (!args->mountpoint && !args->device) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"You must specify at least one of: mount point, device.\");\n        mnt_free_context (cxt);\n        return FALSE;\n    }\n\n    if (args->mountpoint) {\n        if (mnt_context_set_target (cxt, args->mountpoint) != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Failed to set '%s' as target for mount\", args->mountpoint);\n            mnt_free_context (cxt);\n            return FALSE;\n        }\n    }\n\n    if (args->device) {\n        if (mnt_context_set_source (cxt, args->device) != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Failed to set '%s' as source for mount\", args->device);\n            mnt_free_context (cxt);\n            return FALSE;\n        }\n    }\n\n    if (args->fstype) {\n        if (mnt_context_set_fstype (cxt, args->fstype) != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Failed to set '%s' as fstype for mount\", args->fstype);\n            mnt_free_context (cxt);\n            return FALSE;\n        }\n    }\n\n    if (args->options) {\n        if (mnt_context_set_options (cxt, args->options) != 0) {\n            g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                         \"Failed to set '%s' as options for mount\", args->options);\n            mnt_free_context (cxt);\n            return FALSE;\n        }\n    }\n\n#ifdef LIBMOUNT_NEW_ERR_API\n    /* we don't want libmount to try RDONLY mounts if we were explicitly given the \"rw\" option */\n    if (args->options && (mnt_optstr_get_option (args->options, \"rw\", NULL, NULL) == 0))\n        mnt_context_enable_rwonly_mount (cxt, TRUE);\n#endif\n\n    ret = mnt_context_mount (cxt);\n\n    /* we need to always do some libmount magic to check if the mount really\n       succeeded -- `mnt_context_mount` can return zero when helper program\n       (mount.type) fails\n     */\n#ifdef LIBMOUNT_NEW_ERR_API\n    success = get_mount_error_new (cxt, ret, args, error);\n#else\n    success = get_mount_error_old (cxt, ret, args, error);\n#endif\n\n    mnt_free_context (cxt);\n    return success;\n}\n\nstatic gboolean set_ruid (uid_t uid, GError **error) {\n    if (setresuid (uid, -1, -1) != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Error setting ruid: %m\");\n        return FALSE;\n    }\n\n    return TRUE;\n}\n\nstatic gboolean set_rgid (gid_t gid, GError **error) {\n    if (setresgid (gid, -1, -1) != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Error setting rgid: %m\");\n        return FALSE;\n    }\n\n    return TRUE;\n}\n\n\n/**\n * run_as_user:\n *\n * Runs given @func in a child process with real user and group ID specified by\n * @run_as_uid and @run_as_gid. The child process is ended after @func is finished.\n * This is used to run mount and unmount functions in a similar way how the `mount`\n * command, which is a suid binary, works and is used to set the libmount context\n * to restricted.\n */\nstatic gboolean run_as_user (MountFunc func, MountArgs *args, uid_t run_as_uid, gid_t run_as_gid, GError ** error) {\n    uid_t current_uid = -1;\n    gid_t current_gid = -1;\n    pid_t pid = -1;\n    pid_t wpid = -1;\n    int pipefd[2];\n    int status = 0;\n    GIOChannel *channel = NULL;\n    GError *local_error = NULL;\n    gchar *error_msg = NULL;\n    gsize msglen = 0;\n\n    current_uid = getuid ();\n    current_gid = getgid ();\n\n    if (geteuid () != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Not running as root, cannot change the UID/GID.\");\n        return FALSE;\n    }\n\n    if (pipe(pipefd) == -1) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Error creating pipe.\");\n        return FALSE;\n    }\n\n    pid = fork ();\n\n    if (pid == -1) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Error forking.\");\n        return FALSE;\n    } else if (pid == 0) {\n        close (pipefd[0]);\n\n        if (run_as_gid != current_gid) {\n            if (!set_rgid (run_as_gid, error)) {\n                if (write(pipefd[1], (*error)->message, strlen((*error)->message)) < 0)\n                    _exit (BD_FS_ERROR_PIPE);\n                else\n                    _exit ((*error)->code);\n            }\n        }\n\n        if (run_as_uid != current_uid) {\n            if (!set_ruid (run_as_uid, error)) {\n                if (write(pipefd[1], (*error)->message, strlen((*error)->message)) < 0)\n                    _exit (BD_FS_ERROR_PIPE);\n                else\n                    _exit ((*error)->code);\n            }\n        }\n\n        if (!func (args, error)) {\n            if (write(pipefd[1], (*error)->message, strlen((*error)->message)) < 0)\n                _exit (BD_FS_ERROR_PIPE);\n            else\n                _exit ((*error)->code);\n        }\n\n        _exit (EXIT_SUCCESS);\n\n    } else {\n        close (pipefd[1]);\n\n        do {\n            wpid = waitpid (pid, &status, WUNTRACED | WCONTINUED);\n            if (wpid == -1) {\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Error while waiting for process.\");\n                close (pipefd[0]);\n                return FALSE;\n            }\n\n            if (WIFEXITED (status)) {\n              if (WEXITSTATUS (status) != EXIT_SUCCESS) {\n                  if (WEXITSTATUS (status) == BD_FS_ERROR_PIPE) {\n                      g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                   \"Error while reading error.\");\n                      close (pipefd[0]);\n                      return FALSE;\n                  }\n\n                  channel = g_io_channel_unix_new (pipefd[0]);\n                  if (g_io_channel_read_to_end (channel, &error_msg, &msglen, &local_error) != G_IO_STATUS_NORMAL) {\n                      if (local_error) {\n                          g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                       \"Error while reading error: %s (%d)\",\n                                       local_error->message, local_error->code);\n                          g_clear_error (&local_error);\n                      } else\n                          g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                       \"Unknown error while reading error.\");\n                      g_io_channel_unref (channel);\n                      close (pipefd[0]);\n                      g_free (error_msg);\n                      return FALSE;\n                  }\n\n                  if (g_io_channel_shutdown (channel, TRUE, &local_error) == G_IO_STATUS_ERROR) {\n                      g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                   \"Error shutting down GIO channel: %s (%d)\",\n                                   local_error->message, local_error->code);\n                      g_clear_error (&local_error);\n                      g_io_channel_unref (channel);\n                      close (pipefd[0]);\n                      g_free (error_msg);\n                      return FALSE;\n                  }\n\n                  if (WEXITSTATUS (status) > BD_FS_ERROR_AUTH)\n                      g_set_error_literal (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                           error_msg);\n                  else\n                      g_set_error_literal (error, BD_FS_ERROR, WEXITSTATUS (status),\n                                           error_msg);\n\n                  g_io_channel_unref (channel);\n                  close (pipefd[0]);\n                  g_free (error_msg);\n                  return FALSE;\n              } else {\n                  close (pipefd[0]);\n                  return TRUE;\n              }\n            } else if (WIFSIGNALED (status)) {\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Killed by signal %d.\", WTERMSIG(status));\n                close (pipefd[0]);\n                return FALSE;\n            }\n\n        } while (!WIFEXITED (status) && !WIFSIGNALED (status));\n        close (pipefd[0]);\n    }\n\n    return FALSE;\n}\n\n/**\n * bd_fs_unmount:\n * @spec: mount point or device to unmount\n * @lazy: enable/disable lazy unmount\n * @force: enable/disable force unmount\n * @extra: (nullable) (array zero-terminated=1): extra options for the unmount;\n *                                               currently only 'run_as_uid'\n *                                               and 'run_as_gid' are supported;\n *                                               value must be a valid non zero\n *                                               uid (gid), if you specify one of\n *                                               these, the function will run in\n *                                               a child process with real user\n * @error: (out) (optional): place to store error (if any)\n *\n * Returns: whether @spec was successfully unmounted or not\n *\n * Tech category: %BD_FS_TECH_GENERIC (no mode, ignored)\n */\ngboolean bd_fs_unmount (const gchar *spec, gboolean lazy, gboolean force, const BDExtraArg **extra, GError **error) {\n    uid_t run_as_uid = -1;\n    gid_t run_as_gid = -1;\n    uid_t current_uid = -1;\n    gid_t current_gid = -1;\n    const BDExtraArg **extra_p = NULL;\n    gchar *endptr = NULL;\n    MountArgs args = ZERO_INIT;\n    GError *l_error = NULL;\n    gboolean ret = FALSE;\n\n    args.spec = spec;\n    args.lazy = lazy;\n    args.force = force;\n\n    current_uid = getuid ();\n    run_as_uid = current_uid;\n\n    current_gid = getgid ();\n    run_as_gid = current_gid;\n\n    if (extra) {\n        for (extra_p=extra; *extra_p; extra_p++) {\n            if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_uid\") == 0)) {\n                run_as_uid = g_ascii_strtoull ((*extra_p)->val, &endptr, 0);\n\n                /* g_ascii_strtoull returns 0 in case of error */\n                if (run_as_uid == 0 && endptr == (*extra_p)->val) {\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Invalid specification of UID: '%s'\", (*extra_p)->val);\n                    return FALSE;\n                }\n            } else if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_gid\") == 0)) {\n                run_as_gid = g_ascii_strtoull ((*extra_p)->val, &endptr, 0);\n\n                /* g_ascii_strtoull returns 0 in case of error */\n                if (run_as_gid == 0 && endptr == (*extra_p)->val) {\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Invalid specification of GID: '%s'\", (*extra_p)->val);\n                    return FALSE;\n                }\n            } else {\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Unsupported argument for unmount: '%s'\", (*extra_p)->opt);\n                return FALSE;\n            }\n        }\n    }\n\n    if (run_as_uid != current_uid || run_as_gid != current_gid) {\n        ret = run_as_user ((MountFunc) do_unmount, &args, run_as_uid, run_as_gid, &l_error);\n        if (!ret)\n            g_propagate_error (error, l_error);\n        return ret;\n    } else\n        return do_unmount (&args, error);\n\n    return TRUE;\n}\n\n/**\n * bd_fs_mount:\n * @device: (nullable): device to mount, if not specified @mountpoint entry\n *                        from fstab will be used\n * @mountpoint: (nullable): mountpoint for @device, if not specified @device\n *                            entry from fstab will be used\n * @fstype: (nullable): filesystem type\n * @options: (nullable): comma delimited options for mount\n * @extra: (nullable) (array zero-terminated=1): extra options for the mount;\n *                                               currently only 'run_as_uid'\n *                                               and 'run_as_gid' are supported;\n *                                               value must be a valid non zero\n *                                               uid (gid), if you specify one of\n *                                               these, the function will run in\n *                                               a child process with real user\n *                                               and/or group ID set to these values.\n * @error: (out) (optional): place to store error (if any)\n *\n * Returns: whether @device (or @mountpoint) was successfully mounted or not\n *\n * Tech category: %BD_FS_TECH_MOUNT (no mode, ignored)\n */\ngboolean bd_fs_mount (const gchar *device, const gchar *mountpoint, const gchar *fstype, const gchar *options, const BDExtraArg **extra, GError **error) {\n    uid_t run_as_uid = -1;\n    gid_t run_as_gid = -1;\n    uid_t current_uid = -1;\n    gid_t current_gid = -1;\n    const BDExtraArg **extra_p = NULL;\n    gchar *endptr = NULL;\n    MountArgs args = ZERO_INIT;\n    GError *l_error = NULL;\n    gboolean ret = FALSE;\n\n    args.device = device;\n    args.mountpoint = mountpoint;\n    args.fstype = fstype;\n    args.options = options;\n\n    current_uid = getuid ();\n    run_as_uid = current_uid;\n\n    current_gid = getgid ();\n    run_as_gid = current_gid;\n\n    if (extra) {\n        for (extra_p=extra; *extra_p; extra_p++) {\n            if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_uid\") == 0)) {\n                run_as_uid = g_ascii_strtoull ((*extra_p)->val, &endptr, 0);\n\n                /* g_ascii_strtoull returns 0 in case of error */\n                if (run_as_uid == 0 && endptr == (*extra_p)->val) {\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Invalid specification of UID: '%s'\", (*extra_p)->val);\n                    return FALSE;\n                }\n            } else if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_gid\") == 0)) {\n                run_as_gid = g_ascii_strtoull ((*extra_p)->val, &endptr, 0);\n\n                /* g_ascii_strtoull returns 0 in case of error */\n                if (run_as_gid == 0 && endptr == (*extra_p)->val) {\n                    g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                                 \"Invalid specification of GID: '%s'\", (*extra_p)->val);\n                    return FALSE;\n                }\n            } else {\n                g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                             \"Unsupported argument for unmount: '%s'\", (*extra_p)->opt);\n                return FALSE;\n            }\n        }\n    }\n\n    if (run_as_uid != current_uid || run_as_gid != current_gid) {\n        ret = run_as_user ((MountFunc) do_mount, &args, run_as_uid, run_as_gid, &l_error);\n        if (!ret)\n            g_propagate_error (error, l_error);\n        return ret;\n    } else\n       return do_mount (&args, error);\n\n    return TRUE;\n}\n\n/**\n * bd_fs_get_mountpoint:\n * @device: device to find mountpoint for\n * @error: (out) (optional): place to store error (if any)\n *\n * Get mountpoint for @device. If @device is mounted multiple times only\n * one mountpoint will be returned.\n *\n * Returns: (transfer full): mountpoint for @device, %NULL in case device is\n *                           not mounted or in case of an error (@error is set\n *                           in this case)\n *\n * Tech category: %BD_FS_TECH_MOUNT (no mode, ignored)\n */\ngchar* bd_fs_get_mountpoint (const gchar *device, GError **error) {\n    struct libmnt_table *table = NULL;\n    struct libmnt_fs *fs = NULL;\n    struct libmnt_cache *cache = NULL;\n    gint ret = 0;\n    gchar *mountpoint = NULL;\n    const gchar *target = NULL;\n\n    table = mnt_new_table ();\n    cache = mnt_new_cache ();\n\n    ret = mnt_table_set_cache (table, cache);\n    if (ret != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Failed to set cache for mount info table.\");\n        mnt_free_table (table);\n        return NULL;\n    }\n\n    ret = mnt_table_parse_mtab (table, NULL);\n    if (ret != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Failed to parse mount info.\");\n        mnt_free_table (table);\n        mnt_free_cache (cache);\n        return NULL;\n    }\n\n    fs = mnt_table_find_source (table, device, MNT_ITER_FORWARD);\n    if (!fs) {\n        mnt_free_table (table);\n        mnt_free_cache (cache);\n        return NULL;\n    }\n\n    target = mnt_fs_get_target (fs);\n    if (!target) {\n        mnt_free_fs (fs);\n        mnt_free_table (table);\n        mnt_free_cache (cache);\n        return NULL;\n    }\n\n    mountpoint = g_strdup (target);\n    mnt_free_fs (fs);\n    mnt_free_table (table);\n    mnt_free_cache (cache);\n    return mountpoint;\n}\n\n/**\n * bd_fs_is_mountpoint:\n * @path: path (folder) to check\n * @error: (out) (optional): place to store error (if any)\n *\n * Returns: whether @path is a mountpoint or not\n *\n * Tech category: %BD_FS_TECH_MOUNT (no mode, ignored)\n */\ngboolean bd_fs_is_mountpoint (const gchar *path, GError **error) {\n    struct libmnt_table *table = NULL;\n    struct libmnt_fs *fs = NULL;\n    struct libmnt_cache *cache = NULL;\n    const gchar *target = NULL;\n    gint ret = 0;\n\n    table = mnt_new_table ();\n    cache = mnt_new_cache ();\n\n    ret = mnt_table_set_cache (table, cache);\n    if (ret != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Failed to set cache for mount info table.\");\n        mnt_free_table (table);\n        return FALSE;\n    }\n\n    ret = mnt_table_parse_mtab (table, NULL);\n    if (ret != 0) {\n        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Failed to parse mount info.\");\n        mnt_free_table (table);\n        mnt_free_cache (cache);\n        return FALSE;\n    }\n\n    fs = mnt_table_find_target (table, path, MNT_ITER_BACKWARD);\n    if (!fs) {\n        mnt_free_table (table);\n        mnt_free_cache (cache);\n        return FALSE;\n    }\n\n    target = mnt_fs_get_target (fs);\n    if (!target) {\n        mnt_free_fs (fs);\n        mnt_free_table (table);\n        mnt_free_cache (cache);\n        return FALSE;\n    }\n\n    mnt_free_fs (fs);\n    mnt_free_table (table);\n    mnt_free_cache (cache);\n    return TRUE;\n}\n"},
                          "roles": ["analysisTarget",
                                    "tracedFile"]},
                         {"location": {"uri": "/usr/lib64/glib-2.0/include/glibconfig.h"},
                          "sourceLanguage": "c"},
                         {"location": {"uri": "/usr/include/glib-2.0/glib/gtypes.h"},
                          "sourceLanguage": "c"},
                         {"location": {"uri": "/usr/include/glib-2.0/glib/galloca.h"},
                          "sourceLanguage": "c"},
                         {"location": {"uri": "/usr/include/glib-2.0/glib.h"},
                          "sourceLanguage": "c"}],
           "results": [{"ruleId": "-Wanalyzer-fd-leak",
                        "taxa": [{"id": "775",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2989},
                                       "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                       "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                       "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                       "gcc/analyzer/saved_diagnostic/idx": 12,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 682},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 2,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 682},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 0,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 1068},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 6,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2652},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 8,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2652},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 10,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 1068},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 4,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2989},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[0]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)0])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 14,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "fd_leak"},
                        "level": "warning",
                        "message": {"text": "leak of file descriptor 'pipefd[0]'"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 491,
                                                                       "startColumn": 16,
                                                                       "endColumn": 17},
                                                            "contextRegion": {"startLine": 491,
                                                                              "snippet": {"text": "        return FALSE;\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "run_as_user"}],
                                       "id": 0,
                                       "relationships": [{"target": 1,
                                                          "kinds": ["isIncludedBy"]}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 631,
                                                                                                                    "startColumn": 10,
                                                                                                                    "endColumn": 23},
                                                                                                         "contextRegion": {"startLine": 631,
                                                                                                                           "snippet": {"text": "gboolean bd_fs_unmount (const gchar *spec, gboolean lazy, gboolean force, const BDExtraArg **extra, GError **error) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "entry to 'bd_fs_unmount'"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 192,
                                                                                                                                 "dst_id": 195}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 652,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 652,
                                                                                                                           "snippet": {"text": "    if (extra) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch (when 'extra' is non-NULL)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 192,
                                                                                                                                 "dst_id": 195}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 652,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 652,
                                                                                                                           "snippet": {"text": "    if (extra) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "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": 198,
                                                                                                                                 "dst_id": 199}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 653,
                                                                                                                    "startColumn": 29,
                                                                                                                    "endColumn": 30},
                                                                                                         "contextRegion": {"startLine": 653,
                                                                                                                           "snippet": {"text": "        for (extra_p=extra; *extra_p; extra_p++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "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": 198,
                                                                                                                                 "dst_id": 199}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 654,
                                                                                                                    "startColumn": 17,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 654,
                                                                                                                           "snippet": {"text": "            if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_uid\") == 0)) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_consolidated_cfg_edges"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 654,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 17},
                                                                                                         "contextRegion": {"startLine": 654,
                                                                                                                           "snippet": {"text": "            if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_uid\") == 0)) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_consolidated_cfg_edges"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 655,
                                                                                                                    "startColumn": 48,
                                                                                                                    "endColumn": 58},
                                                                                                         "contextRegion": {"startLine": 655,
                                                                                                                           "snippet": {"text": "                run_as_uid = g_ascii_strtoull ((*extra_p)->val, &endptr, 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "nestingLevel": 1,
                                                                       "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": 257,
                                                                                                                                 "dst_id": 258}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 680,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 680,
                                                                                                                           "snippet": {"text": "    if (run_as_uid != current_uid || run_as_gid != current_gid) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "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": 257,
                                                                                                                                 "dst_id": 258}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 681,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 92},
                                                                                                         "contextRegion": {"startLine": 681,
                                                                                                                           "snippet": {"text": "        ret = run_as_user ((MountFunc) do_unmount, &args, run_as_uid, run_as_gid, &l_error);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 258,
                                                                                                                                 "dst_id": 259}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 681,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 92},
                                                                                                         "contextRegion": {"startLine": 681,
                                                                                                                           "snippet": {"text": "        ret = run_as_user ((MountFunc) do_unmount, &args, run_as_uid, run_as_gid, &l_error);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "calling 'run_as_user' from 'bd_fs_unmount'"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 473,
                                                                                                                    "startColumn": 17,
                                                                                                                    "endColumn": 28},
                                                                                                         "contextRegion": {"startLine": 473,
                                                                                                                           "snippet": {"text": "static gboolean run_as_user (MountFunc func, MountArgs *args, uid_t run_as_uid, gid_t run_as_gid, GError ** error) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "entry to 'run_as_user'"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "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": 286,
                                                                                                                                 "dst_id": 290}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 488,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 488,
                                                                                                                           "snippet": {"text": "    if (geteuid () != 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "following 'false' branch..."}},
                                                                       "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": 286,
                                                                                                                                 "dst_id": 290}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "opened here as read-write"}},
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "custom"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "when 'pipe' succeeds"}},
                                                                       "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": 291,
                                                                                                                                 "dst_id": 295}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "following 'false' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "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": 291,
                                                                                                                                 "dst_id": 295}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 500,
                                                                                                                    "startColumn": 11,
                                                                                                                    "endColumn": 18},
                                                                                                         "contextRegion": {"startLine": 500,
                                                                                                                           "snippet": {"text": "    pid = fork ();\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 17},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(18)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 296,
                                                                                                                                 "dst_id": 297}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 502,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 502,
                                                                                                                           "snippet": {"text": "    if (pid == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "following 'true' branch (when 'pid == -1')..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 18},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(19)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 296,
                                                                                                                                 "dst_id": 297}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 503,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endLine": 504,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 503,
                                                                                                                           "endLine": 504,
                                                                                                                           "snippet": {"text": "        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Error forking.\");\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 19},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(20)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 491,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 17},
                                                                                                         "contextRegion": {"startLine": 491,
                                                                                                                           "snippet": {"text": "        return FALSE;\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "'pipefd[0]' leaks here"},
                                                                                    "id": 2,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 20}]}]}],
                        "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "/usr/lib64/glib-2.0/include/glibconfig.h"},
                                                                   "region": {"startLine": 9},
                                                                   "contextRegion": {"startLine": 9,
                                                                                     "snippet": {"text": "#include <glib/gmacros.h>\n"}}},
                                              "relationships": [{"target": 0,
                                                                 "kinds": ["includes"]},
                                                                {"target": 2,
                                                                 "kinds": ["includes"]},
                                                                {"target": 3,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 1},
                                             {"physicalLocation": {"artifactLocation": {"uri": "/usr/include/glib-2.0/glib/gtypes.h"},
                                                                   "region": {"startLine": 34},
                                                                   "contextRegion": {"startLine": 34,
                                                                                     "snippet": {"text": "#include <glibconfig.h>\n"}}},
                                              "relationships": [{"target": 1,
                                                                 "kinds": ["includes"]},
                                                                {"target": 4,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 3},
                                             {"physicalLocation": {"artifactLocation": {"uri": "/usr/include/glib-2.0/glib/galloca.h"},
                                                                   "region": {"startLine": 34},
                                                                   "contextRegion": {"startLine": 34,
                                                                                     "snippet": {"text": "#include <glib/gtypes.h>\n"}}},
                                              "relationships": [{"target": 3,
                                                                 "kinds": ["includes"]},
                                                                {"target": 5,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 4},
                                             {"physicalLocation": {"artifactLocation": {"uri": "/usr/include/glib-2.0/glib.h"},
                                                                   "region": {"startLine": 32},
                                                                   "contextRegion": {"startLine": 32,
                                                                                     "snippet": {"text": "#include <glib/galloca.h>\n"}}},
                                              "relationships": [{"target": 4,
                                                                 "kinds": ["includes"]},
                                                                {"target": 6,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 5},
                                             {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 23},
                                                                   "contextRegion": {"startLine": 23,
                                                                                     "snippet": {"text": "#include <glib.h>\n"}}},
                                              "relationships": [{"target": 5,
                                                                 "kinds": ["includes"]}],
                                              "id": 6}]},
                       {"ruleId": "-Wanalyzer-fd-leak",
                        "taxa": [{"id": "775",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2989},
                                       "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                       "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                       "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                       "gcc/analyzer/saved_diagnostic/idx": 13,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 682},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 3,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 682},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 1,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 1068},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 7,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2652},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 9,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2652},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 11,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 1068},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 5,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "file-descriptor",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 2989},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "pipefd[1]",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "CONJURED(_2 = pipe (&pipefd);, pipefd[(int)1])",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "fd-valid-read-write",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 15,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "fd_leak"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "fd_leak"},
                        "level": "warning",
                        "message": {"text": "leak of file descriptor 'pipefd[1]'"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 491,
                                                                       "startColumn": 16,
                                                                       "endColumn": 17},
                                                            "contextRegion": {"startLine": 491,
                                                                              "snippet": {"text": "        return FALSE;\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "run_as_user"}],
                                       "id": 0,
                                       "relationships": [{"target": 1,
                                                          "kinds": ["isIncludedBy"]}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 631,
                                                                                                                    "startColumn": 10,
                                                                                                                    "endColumn": 23},
                                                                                                         "contextRegion": {"startLine": 631,
                                                                                                                           "snippet": {"text": "gboolean bd_fs_unmount (const gchar *spec, gboolean lazy, gboolean force, const BDExtraArg **extra, GError **error) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "entry to 'bd_fs_unmount'"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 192,
                                                                                                                                 "dst_id": 195}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 652,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 652,
                                                                                                                           "snippet": {"text": "    if (extra) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch (when 'extra' is non-NULL)..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 192,
                                                                                                                                 "dst_id": 195}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 652,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 652,
                                                                                                                           "snippet": {"text": "    if (extra) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "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": 198,
                                                                                                                                 "dst_id": 199}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 653,
                                                                                                                    "startColumn": 29,
                                                                                                                    "endColumn": 30},
                                                                                                         "contextRegion": {"startLine": 653,
                                                                                                                           "snippet": {"text": "        for (extra_p=extra; *extra_p; extra_p++) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "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": 198,
                                                                                                                                 "dst_id": 199}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 654,
                                                                                                                    "startColumn": 17,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 654,
                                                                                                                           "snippet": {"text": "            if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_uid\") == 0)) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_consolidated_cfg_edges"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 654,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 17},
                                                                                                         "contextRegion": {"startLine": 654,
                                                                                                                           "snippet": {"text": "            if ((*extra_p)->opt && (g_strcmp0 ((*extra_p)->opt, \"run_as_uid\") == 0)) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_consolidated_cfg_edges"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 655,
                                                                                                                    "startColumn": 48,
                                                                                                                    "endColumn": 58},
                                                                                                         "contextRegion": {"startLine": 655,
                                                                                                                           "snippet": {"text": "                run_as_uid = g_ascii_strtoull ((*extra_p)->val, &endptr, 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "nestingLevel": 1,
                                                                       "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": 257,
                                                                                                                                 "dst_id": 258}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 680,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 680,
                                                                                                                           "snippet": {"text": "    if (run_as_uid != current_uid || run_as_gid != current_gid) {\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "following 'true' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "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": 257,
                                                                                                                                 "dst_id": 258}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 681,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 92},
                                                                                                         "contextRegion": {"startLine": 681,
                                                                                                                           "snippet": {"text": "        ret = run_as_user ((MountFunc) do_unmount, &args, run_as_uid, run_as_gid, &l_error);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 258,
                                                                                                                                 "dst_id": 259}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 681,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 92},
                                                                                                         "contextRegion": {"startLine": 681,
                                                                                                                           "snippet": {"text": "        ret = run_as_user ((MountFunc) do_unmount, &args, run_as_uid, run_as_gid, &l_error);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "bd_fs_unmount"}],
                                                                                    "message": {"text": "calling 'run_as_user' from 'bd_fs_unmount'"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 473,
                                                                                                                    "startColumn": 17,
                                                                                                                    "endColumn": 28},
                                                                                                         "contextRegion": {"startLine": 473,
                                                                                                                           "snippet": {"text": "static gboolean run_as_user (MountFunc func, MountArgs *args, uid_t run_as_uid, gid_t run_as_gid, GError ** error) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "entry to 'run_as_user'"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "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": 286,
                                                                                                                                 "dst_id": 290}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 488,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 488,
                                                                                                                           "snippet": {"text": "    if (geteuid () != 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "following 'false' branch..."}},
                                                                       "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": 286,
                                                                                                                                 "dst_id": 290}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "opened here as read-write"}},
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "custom"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 21},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "when 'pipe' succeeds"}},
                                                                       "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": 291,
                                                                                                                                 "dst_id": 295}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 494,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 494,
                                                                                                                           "snippet": {"text": "    if (pipe(pipefd) == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "following 'false' branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "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": 291,
                                                                                                                                 "dst_id": 295}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 500,
                                                                                                                    "startColumn": 11,
                                                                                                                    "endColumn": 18},
                                                                                                         "contextRegion": {"startLine": 500,
                                                                                                                           "snippet": {"text": "    pid = fork ();\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 17},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(18)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 296,
                                                                                                                                 "dst_id": 297}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 502,
                                                                                                                    "startColumn": 8,
                                                                                                                    "endColumn": 9},
                                                                                                         "contextRegion": {"startLine": 502,
                                                                                                                           "snippet": {"text": "    if (pid == -1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "following 'true' branch (when 'pid == -1')..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 18},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(19)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 296,
                                                                                                                                 "dst_id": 297}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 503,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endLine": 504,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 503,
                                                                                                                           "endLine": 504,
                                                                                                                           "snippet": {"text": "        g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_FAIL,\n                     \"Error forking.\");\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 19},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(20)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 491,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 17},
                                                                                                         "contextRegion": {"startLine": 491,
                                                                                                                           "snippet": {"text": "        return FALSE;\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "run_as_user"}],
                                                                                    "message": {"text": "'pipefd[1]' leaks here"},
                                                                                    "id": 2,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 20}]}]}],
                        "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "/usr/lib64/glib-2.0/include/glibconfig.h"},
                                                                   "region": {"startLine": 9},
                                                                   "contextRegion": {"startLine": 9,
                                                                                     "snippet": {"text": "#include <glib/gmacros.h>\n"}}},
                                              "relationships": [{"target": 0,
                                                                 "kinds": ["includes"]},
                                                                {"target": 2,
                                                                 "kinds": ["includes"]},
                                                                {"target": 3,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 1},
                                             {"physicalLocation": {"artifactLocation": {"uri": "/usr/include/glib-2.0/glib/gtypes.h"},
                                                                   "region": {"startLine": 34},
                                                                   "contextRegion": {"startLine": 34,
                                                                                     "snippet": {"text": "#include <glibconfig.h>\n"}}},
                                              "relationships": [{"target": 1,
                                                                 "kinds": ["includes"]},
                                                                {"target": 4,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 3},
                                             {"physicalLocation": {"artifactLocation": {"uri": "/usr/include/glib-2.0/glib/galloca.h"},
                                                                   "region": {"startLine": 34},
                                                                   "contextRegion": {"startLine": 34,
                                                                                     "snippet": {"text": "#include <glib/gtypes.h>\n"}}},
                                              "relationships": [{"target": 3,
                                                                 "kinds": ["includes"]},
                                                                {"target": 5,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 4},
                                             {"physicalLocation": {"artifactLocation": {"uri": "/usr/include/glib-2.0/glib.h"},
                                                                   "region": {"startLine": 32},
                                                                   "contextRegion": {"startLine": 32,
                                                                                     "snippet": {"text": "#include <glib/galloca.h>\n"}}},
                                              "relationships": [{"target": 4,
                                                                 "kinds": ["includes"]},
                                                                {"target": 6,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 5},
                                             {"physicalLocation": {"artifactLocation": {"uri": "mount.c",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 23},
                                                                   "contextRegion": {"startLine": 23,
                                                                                     "snippet": {"text": "#include <glib.h>\n"}}},
                                              "relationships": [{"target": 5,
                                                                 "kinds": ["includes"]}],
                                              "id": 6}]}],
           "logicalLocations": [{"name": "run_as_user",
                                 "fullyQualifiedName": "run_as_user",
                                 "decoratedName": "run_as_user",
                                 "kind": "function",
                                 "index": 0},
                                {"name": "bd_fs_unmount",
                                 "fullyQualifiedName": "bd_fs_unmount",
                                 "decoratedName": "bd_fs_unmount",
                                 "kind": "function",
                                 "index": 1}]}]}
