The following issues were found

src/third_party/gperftools/dist/src/symbolize.cc
7 issues
access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 149 Column: 7 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

                  PrintError("Cannot figure out the name of this executable (argv0)");
    return 0;
  }
  if (access(get_pprof_path(), R_OK) != 0) {
    PrintError("Cannot find 'pprof' (is PPROF_PATH set correctly?)");
    return 0;
  }

  // All this work is to do two-way communication.  ugh.

            

Reported by FlawFinder.

execlp - This causes a new program to execute and is difficult to use safely
Security

Line: 211 Column: 7 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

                    unsetenv("HEAPPROFILE");
      unsetenv("HEAPCHECK");
      unsetenv("PERFTOOLS_VERBOSE");
      execlp(get_pprof_path(), get_pprof_path(),
             "--symbols", argv0, NULL);
      _exit(3);  // if execvp fails, it's bad news for us
    }
    default: {  // parent
      close(child_in[0]);   // child uses the 0's, parent uses the 1's

            

Reported by FlawFinder.

snprintf - If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate
Security

Line: 247 Column: 20 CWE codes: 134
Suggestion: Use a constant for the format specification

                    int written = 0;
      for (SymbolMap::const_iterator iter = symbolization_table_.begin();
           iter != symbolization_table_.end(); ++iter) {
        written += snprintf(pprof_buffer + written, kOutBufSize - written,
                 // pprof expects format to be 0xXXXXXX
                 "0x%" PRIxPTR "\n", reinterpret_cast<uintptr_t>(iter->first));
      }
      write(child_in[1], pprof_buffer, strlen(pprof_buffer));
      close(child_in[1]);             // that's all we need to write

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 95 Column: 10 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              #elif defined(__MACH__)
  // We don't want to allocate memory for this since we may be
  // calculating it when memory is corrupted.
  static char program_invocation_name[PATH_MAX];
  if (program_invocation_name[0] == '\0') {  // first time calculating
    uint32_t length = sizeof(program_invocation_name);
    if (_NSGetExecutablePath(program_invocation_name, &length))
      return NULL;
  }

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 103 Column: 10 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                }
  return program_invocation_name;
#elif defined(__FreeBSD__)
  static char program_invocation_name[PATH_MAX];
  size_t len = sizeof(program_invocation_name);
  static const int name[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
  if (!sysctl(name, 4, program_invocation_name, &len, NULL, 0))
    return program_invocation_name;
  return NULL;

            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 251 Column: 40 CWE codes: 126

                               // pprof expects format to be 0xXXXXXX
                 "0x%" PRIxPTR "\n", reinterpret_cast<uintptr_t>(iter->first));
      }
      write(child_in[1], pprof_buffer, strlen(pprof_buffer));
      close(child_in[1]);             // that's all we need to write
      delete[] pprof_buffer;

      const int kSymbolBufferSize = kSymbolSize * symbolization_table_.size();
      int total_bytes_read = 0;

            

Reported by FlawFinder.

read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 261 Column: 26 CWE codes: 120 20

                    symbol_buffer_ = new char[kSymbolBufferSize];
      memset(symbol_buffer_, '\0', kSymbolBufferSize);
      while (1) {
        int bytes_read = read(child_out[1], symbol_buffer_ + total_bytes_read,
                              kSymbolBufferSize - total_bytes_read);
        if (bytes_read < 0) {
          close(child_out[1]);
          PrintError("Cannot read data from pprof");
          return 0;

            

Reported by FlawFinder.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/sgic++.py
7 issues
Unused import exists from wildcard import
Error

Line: 37 Column: 1

              __revision__ = "src/engine/SCons/Tool/sgic++.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

#forward proxy to the preffered cxx version
from SCons.Tool.sgicxx import *

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:

            

Reported by Pylint.

Unused import cplusplus from wildcard import
Error

Line: 37 Column: 1

              __revision__ = "src/engine/SCons/Tool/sgic++.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

#forward proxy to the preffered cxx version
from SCons.Tool.sgicxx import *

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:

            

Reported by Pylint.

Unused import SCons from wildcard import
Error

Line: 37 Column: 1

              __revision__ = "src/engine/SCons/Tool/sgic++.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

#forward proxy to the preffered cxx version
from SCons.Tool.sgicxx import *

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:

            

Reported by Pylint.

Wildcard import SCons.Tool.sgicxx
Error

Line: 37 Column: 1

              __revision__ = "src/engine/SCons/Tool/sgic++.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

#forward proxy to the preffered cxx version
from SCons.Tool.sgicxx import *

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:

            

Reported by Pylint.

Unused import generate from wildcard import
Error

Line: 37 Column: 1

              __revision__ = "src/engine/SCons/Tool/sgic++.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

#forward proxy to the preffered cxx version
from SCons.Tool.sgicxx import *

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
# End:

            

Reported by Pylint.

Module name "sgic++" doesn't conform to snake_case naming style
Error

Line: 1 Column: 1

              """SCons.Tool.sgic++

Tool-specific initialization for MIPSpro C++ on SGI.

There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.

"""

            

Reported by Pylint.

Line too long (117/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/sgic++.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

#forward proxy to the preffered cxx version
from SCons.Tool.sgicxx import *

# Local Variables:

            

Reported by Pylint.

src/third_party/gperftools/dist/src/base/logging.h
7 issues
vsnprintf - If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate
Security

Line: 70 Column: 30 CWE codes: 134
Suggestion: Use a constant for the format specification

              // windows one in broken) in port.cc.  Everyone else can use the
// version here.  We had to give it a unique name for windows.
#ifndef _WIN32
# define perftools_vsnprintf vsnprintf
#endif


// We log all messages at this log-level and below.
// INFO == -1, WARNING == -2, ERROR == -3, FATAL == -4

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 201 Column: 3 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              inline void LogPrintf(int severity, const char* pat, va_list ap) {
  // We write directly to the stderr file descriptor and avoid FILE
  // buffering because that may invoke malloc()
  char buf[600];
  perftools_vsnprintf(buf, sizeof(buf)-1, pat, ap);
  if (buf[0] != '\0' && buf[strlen(buf)-1] != '\n') {
    assert(strlen(buf)+1 < sizeof(buf));
    strcat(buf, "\n");
  }

            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 120 Column: 41 CWE codes: 126

                    const int err_no = errno;                                         \
      WRITE_TO_STDERR("Check failed: " #condition ": ",                 \
                      sizeof("Check failed: " #condition ": ")-1);      \
      WRITE_TO_STDERR(strerror(err_no), strlen(strerror(err_no)));      \
      WRITE_TO_STDERR("\n", sizeof("\n")-1);                            \
      abort();                                                          \
    }                                                                   \
  } while (0)


            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 203 Column: 29 CWE codes: 126

                // buffering because that may invoke malloc()
  char buf[600];
  perftools_vsnprintf(buf, sizeof(buf)-1, pat, ap);
  if (buf[0] != '\0' && buf[strlen(buf)-1] != '\n') {
    assert(strlen(buf)+1 < sizeof(buf));
    strcat(buf, "\n");
  }
  WRITE_TO_STDERR(buf, strlen(buf));
  if ((severity) == FATAL)

            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 204 Column: 12 CWE codes: 126

                char buf[600];
  perftools_vsnprintf(buf, sizeof(buf)-1, pat, ap);
  if (buf[0] != '\0' && buf[strlen(buf)-1] != '\n') {
    assert(strlen(buf)+1 < sizeof(buf));
    strcat(buf, "\n");
  }
  WRITE_TO_STDERR(buf, strlen(buf));
  if ((severity) == FATAL)
    abort(); // LOG(FATAL) indicates a big problem, so don't run atexit() calls

            

Reported by FlawFinder.

strcat - Does not check for buffer overflows when concatenating to destination [MS-banned]
Security

Line: 205 Column: 5 CWE codes: 120
Suggestion: Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused)

                perftools_vsnprintf(buf, sizeof(buf)-1, pat, ap);
  if (buf[0] != '\0' && buf[strlen(buf)-1] != '\n') {
    assert(strlen(buf)+1 < sizeof(buf));
    strcat(buf, "\n");
  }
  WRITE_TO_STDERR(buf, strlen(buf));
  if ((severity) == FATAL)
    abort(); // LOG(FATAL) indicates a big problem, so don't run atexit() calls
}

            

Reported by FlawFinder.

strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 207 Column: 24 CWE codes: 126

                  assert(strlen(buf)+1 < sizeof(buf));
    strcat(buf, "\n");
  }
  WRITE_TO_STDERR(buf, strlen(buf));
  if ((severity) == FATAL)
    abort(); // LOG(FATAL) indicates a big problem, so don't run atexit() calls
}

// Note that since the order of global constructors is unspecified,

            

Reported by FlawFinder.

src/third_party/wiredtiger/test/3rdparty/testtools-0.9.34/testtools/tests/test_helpers.py
7 issues
Missing module docstring
Error

Line: 1 Column: 1

              # Copyright (c) 2010-2012 testtools developers. See LICENSE for details.

from testtools import TestCase
from testtools.tests.helpers import (
    FullStackRunTest,
    hide_testtools_stack,
    is_stack_hidden,
    )


            

Reported by Pylint.

Missing class docstring
Error

Line: 11 Column: 1

                  )


class TestStackHiding(TestCase):

    run_tests_with = FullStackRunTest

    def setUp(self):
        super(TestStackHiding, self).setUp()

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 16 Column: 9

                  run_tests_with = FullStackRunTest

    def setUp(self):
        super(TestStackHiding, self).setUp()
        self.addCleanup(hide_testtools_stack, is_stack_hidden())

    def test_is_stack_hidden_consistent_true(self):
        hide_testtools_stack(True)
        self.assertEqual(True, is_stack_hidden())

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 19 Column: 5

                      super(TestStackHiding, self).setUp()
        self.addCleanup(hide_testtools_stack, is_stack_hidden())

    def test_is_stack_hidden_consistent_true(self):
        hide_testtools_stack(True)
        self.assertEqual(True, is_stack_hidden())

    def test_is_stack_hidden_consistent_false(self):
        hide_testtools_stack(False)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 23 Column: 5

                      hide_testtools_stack(True)
        self.assertEqual(True, is_stack_hidden())

    def test_is_stack_hidden_consistent_false(self):
        hide_testtools_stack(False)
        self.assertEqual(False, is_stack_hidden())


def test_suite():

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 28 Column: 1

                      self.assertEqual(False, is_stack_hidden())


def test_suite():
    from unittest import TestLoader
    return TestLoader().loadTestsFromName(__name__)

            

Reported by Pylint.

Import outside toplevel (unittest.TestLoader)
Error

Line: 29 Column: 5

              

def test_suite():
    from unittest import TestLoader
    return TestLoader().loadTestsFromName(__name__)

            

Reported by Pylint.

src/third_party/boost/libs/timer/src/cpu_timer.cpp
7 issues
system - This causes a new program to execute and is difficult to use safely
Security

Line: 78 Column: 43 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

                        os << static_cast<double>(times.user) / sec;
          break;
        case 's':
          os << static_cast<double>(times.system) / sec;
          break;
        case 't':
          os << total_sec;
          break;
        case 'p':

            

Reported by FlawFinder.

system - This causes a new program to execute and is difficult to use safely
Security

Line: 129 Column: 34 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

              #  if BOOST_PLAT_WINDOWS_DESKTOP || defined(__CYGWIN__)
    FILETIME creation, exit;
    if (::GetProcessTimes(::GetCurrentProcess(), &creation, &exit,
            (LPFILETIME)&current.system, (LPFILETIME)&current.user))
    {
      current.user   *= 100;  // Windows uses 100 nanosecond ticks
      current.system *= 100;
    }
    else

            

Reported by FlawFinder.

system - This causes a new program to execute and is difficult to use safely
Security

Line: 132 Column: 15 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

                          (LPFILETIME)&current.system, (LPFILETIME)&current.user))
    {
      current.user   *= 100;  // Windows uses 100 nanosecond ticks
      current.system *= 100;
    }
    else
#  endif
    {
      current.system = current.user = boost::timer::nanosecond_type(-1);

            

Reported by FlawFinder.

system - This causes a new program to execute and is difficult to use safely
Security

Line: 154 Column: 17 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

                    if ((factor = tick_factor()) != -1)
      {
        current.user *= factor;
        current.system *= factor;
      }
      else
      {
        current.user = current.system = boost::timer::nanosecond_type(-1);
      }

            

Reported by FlawFinder.

system - This causes a new program to execute and is difficult to use safely
Security

Line: 208 Column: 50 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

                    get_cpu_times(current);
      m_times.wall = (current.wall - m_times.wall);
      m_times.user = (current.user - m_times.user);
      m_times.system = (current.system - m_times.system);
    }

    cpu_times cpu_timer::elapsed() const BOOST_NOEXCEPT
    {
      if (is_stopped())

            

Reported by FlawFinder.

system - This causes a new program to execute and is difficult to use safely
Security

Line: 219 Column: 33 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

                    get_cpu_times(current);
      current.wall -= m_times.wall;
      current.user -= m_times.user;
      current.system -= m_times.system;
      return current;
    }

    void cpu_timer::resume() BOOST_NOEXCEPT
    {

            

Reported by FlawFinder.

system - This causes a new program to execute and is difficult to use safely
Security

Line: 231 Column: 35 CWE codes: 78
Suggestion: try using a library call that implements the same functionality if available

                      start();
        m_times.wall   -= current.wall;
        m_times.user   -= current.user;
        m_times.system -= current.system;
      }
    }

    //  auto_cpu_timer  ----------------------------------------------------------------//


            

Reported by FlawFinder.

src/third_party/wiredtiger/test/suite/test_cursor09.py
7 issues
Unable to import 'wiredtiger'
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import wiredtiger, wttest
from wtdataset import SimpleDataSet, ComplexDataSet, ComplexLSMDataSet
from wtscenario import make_scenarios

# test_cursor09.py
#    JIRA WT-2217: insert resets key/value "set".

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import wiredtiger, wttest
from wtdataset import SimpleDataSet, ComplexDataSet, ComplexLSMDataSet
from wtscenario import make_scenarios

# test_cursor09.py
#    JIRA WT-2217: insert resets key/value "set".

            

Reported by Pylint.

Class name "test_cursor09" doesn't conform to PascalCase naming style
Error

Line: 35 Column: 1

              
# test_cursor09.py
#    JIRA WT-2217: insert resets key/value "set".
class test_cursor09(wttest.WiredTigerTestCase):
    scenarios = make_scenarios([
        ('file-r', dict(type='file:', keyfmt='r', dataset=SimpleDataSet)),
        ('file-S', dict(type='file:', keyfmt='S', dataset=SimpleDataSet)),
        ('lsm-S', dict(type='lsm:', keyfmt='S', dataset=SimpleDataSet)),
        ('table-r', dict(type='table:', keyfmt='r', dataset=SimpleDataSet)),

            

Reported by Pylint.

Missing class docstring
Error

Line: 35 Column: 1

              
# test_cursor09.py
#    JIRA WT-2217: insert resets key/value "set".
class test_cursor09(wttest.WiredTigerTestCase):
    scenarios = make_scenarios([
        ('file-r', dict(type='file:', keyfmt='r', dataset=SimpleDataSet)),
        ('file-S', dict(type='file:', keyfmt='S', dataset=SimpleDataSet)),
        ('lsm-S', dict(type='lsm:', keyfmt='S', dataset=SimpleDataSet)),
        ('table-r', dict(type='table:', keyfmt='r', dataset=SimpleDataSet)),

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 52 Column: 5

              
    # WT_CURSOR.insert doesn't leave the cursor positioned, verify any
    # subsequent cursor operation fails with a "key not set" message.
    def test_cursor09(self):
        uri = self.type + 'cursor09'

        ds = self.dataset(self, uri, 100, key_format=self.keyfmt)
        ds.populate()


            

Reported by Pylint.

Variable name "ds" doesn't conform to snake_case naming style
Error

Line: 55 Column: 9

                  def test_cursor09(self):
        uri = self.type + 'cursor09'

        ds = self.dataset(self, uri, 100, key_format=self.keyfmt)
        ds.populate()

        cursor = self.session.open_cursor(uri, None, None)
        cursor[ds.key(10)] = ds.value(10)
        msg = '/requires key be set/'

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_reconfig04.py
7 issues
Unable to import 'wiredtiger'
Error

Line: 33 Column: 1

              # session_api:reconfigure
# [END_TAGS]

import wiredtiger, wttest

# test_reconfig04.py
#    Test WT_SESSION::reconfigure
class test_reconfig04(wttest.WiredTigerTestCase):
    def test_session_reconfigure(self):

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 33 Column: 1

              # session_api:reconfigure
# [END_TAGS]

import wiredtiger, wttest

# test_reconfig04.py
#    Test WT_SESSION::reconfigure
class test_reconfig04(wttest.WiredTigerTestCase):
    def test_session_reconfigure(self):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 33 Column: 1

              # session_api:reconfigure
# [END_TAGS]

import wiredtiger, wttest

# test_reconfig04.py
#    Test WT_SESSION::reconfigure
class test_reconfig04(wttest.WiredTigerTestCase):
    def test_session_reconfigure(self):

            

Reported by Pylint.

Missing class docstring
Error

Line: 37 Column: 1

              
# test_reconfig04.py
#    Test WT_SESSION::reconfigure
class test_reconfig04(wttest.WiredTigerTestCase):
    def test_session_reconfigure(self):
        self.session.reconfigure('ignore_cache_size=false')

        self.session.reconfigure('isolation=snapshot')
        self.session.reconfigure('isolation=read-committed')

            

Reported by Pylint.

Class name "test_reconfig04" doesn't conform to PascalCase naming style
Error

Line: 37 Column: 1

              
# test_reconfig04.py
#    Test WT_SESSION::reconfigure
class test_reconfig04(wttest.WiredTigerTestCase):
    def test_session_reconfigure(self):
        self.session.reconfigure('ignore_cache_size=false')

        self.session.reconfigure('isolation=snapshot')
        self.session.reconfigure('isolation=read-committed')

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 38 Column: 5

              # test_reconfig04.py
#    Test WT_SESSION::reconfigure
class test_reconfig04(wttest.WiredTigerTestCase):
    def test_session_reconfigure(self):
        self.session.reconfigure('ignore_cache_size=false')

        self.session.reconfigure('isolation=snapshot')
        self.session.reconfigure('isolation=read-committed')
        self.session.reconfigure('isolation=read-uncommitted')

            

Reported by Pylint.

src/third_party/boost/libs/filesystem/src/path.cpp
7 issues
The iterator 'itr' is invalid before being assigned. Dereferencing or comparing it with another iterator is invalid operation.
Error

Line: 731 CWE codes: 664

                BOOST_FILESYSTEM_DECL path::iterator path::begin() const
  {
    iterator itr;
    itr.m_path_ptr = this;
    size_type element_size;
    first_element(m_pathname, itr.m_pos, element_size);
    itr.m_element = m_pathname.substr(itr.m_pos, element_size);
    if (itr.m_element.m_pathname == preferred_separator_string)
      itr.m_element.m_pathname = separator_string;  // needed for Windows, harmless on POSIX

            

Reported by Cppcheck.

The iterator 'itr' is invalid before being assigned. Dereferencing or comparing it with another iterator is invalid operation.
Error

Line: 733 CWE codes: 664

                  iterator itr;
    itr.m_path_ptr = this;
    size_type element_size;
    first_element(m_pathname, itr.m_pos, element_size);
    itr.m_element = m_pathname.substr(itr.m_pos, element_size);
    if (itr.m_element.m_pathname == preferred_separator_string)
      itr.m_element.m_pathname = separator_string;  // needed for Windows, harmless on POSIX
    return itr;
  }

            

Reported by Cppcheck.

The iterator 'itr' is invalid before being assigned. Dereferencing or comparing it with another iterator is invalid operation.
Error

Line: 734 CWE codes: 664

                  itr.m_path_ptr = this;
    size_type element_size;
    first_element(m_pathname, itr.m_pos, element_size);
    itr.m_element = m_pathname.substr(itr.m_pos, element_size);
    if (itr.m_element.m_pathname == preferred_separator_string)
      itr.m_element.m_pathname = separator_string;  // needed for Windows, harmless on POSIX
    return itr;
  }


            

Reported by Cppcheck.

The iterator 'itr' is invalid before being assigned. Dereferencing or comparing it with another iterator is invalid operation.
Error

Line: 735 CWE codes: 664

                  size_type element_size;
    first_element(m_pathname, itr.m_pos, element_size);
    itr.m_element = m_pathname.substr(itr.m_pos, element_size);
    if (itr.m_element.m_pathname == preferred_separator_string)
      itr.m_element.m_pathname = separator_string;  // needed for Windows, harmless on POSIX
    return itr;
  }

  BOOST_FILESYSTEM_DECL path::iterator path::end() const

            

Reported by Cppcheck.

The iterator 'itr' is invalid before being assigned. Dereferencing or comparing it with another iterator is invalid operation.
Error

Line: 736 CWE codes: 664

                  first_element(m_pathname, itr.m_pos, element_size);
    itr.m_element = m_pathname.substr(itr.m_pos, element_size);
    if (itr.m_element.m_pathname == preferred_separator_string)
      itr.m_element.m_pathname = separator_string;  // needed for Windows, harmless on POSIX
    return itr;
  }

  BOOST_FILESYSTEM_DECL path::iterator path::end() const
  {

            

Reported by Cppcheck.

The iterator 'itr' is invalid before being assigned. Dereferencing or comparing it with another iterator is invalid operation.
Error

Line: 743 CWE codes: 664

                BOOST_FILESYSTEM_DECL path::iterator path::end() const
  {
    iterator itr;
    itr.m_path_ptr = this;
    itr.m_pos = m_pathname.size();
    return itr;
  }

  BOOST_FILESYSTEM_DECL void path::m_path_iterator_increment(path::iterator & it)

            

Reported by Cppcheck.

The iterator 'itr' is invalid before being assigned. Dereferencing or comparing it with another iterator is invalid operation.
Error

Line: 744 CWE codes: 664

                {
    iterator itr;
    itr.m_path_ptr = this;
    itr.m_pos = m_pathname.size();
    return itr;
  }

  BOOST_FILESYSTEM_DECL void path::m_path_iterator_increment(path::iterator & it)
  {

            

Reported by Cppcheck.

src/third_party/wiredtiger/test/3rdparty/testscenarios-0.4/lib/testscenarios/tests/__init__.py
7 issues
Unused variable 'result'
Error

Line: 25 Column: 5

              

def test_suite():
    result = unittest.TestSuite()
    standard_tests = unittest.TestSuite()
    module = sys.modules['testscenarios.tests']
    loader = unittest.TestLoader()
    return load_tests(standard_tests, module, loader)


            

Reported by Pylint.

Unused argument 'module'
Error

Line: 32 Column: 32

                  return load_tests(standard_tests, module, loader)


def load_tests(standard_tests, module, loader):
    test_modules = [
        'testcase',
        'scenarios',
        ]
    prefix = "testscenarios.tests.test_"

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #  testscenarios: extensions to python unittest to allow declarative
#  dependency injection ('scenarios') by tests.
#
# Copyright (c) 2009, Robert Collins <robertc@robertcollins.net>
# 
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.

            

Reported by Pylint.

Trailing whitespace
Error

Line: 5 Column: 2

              #  dependency injection ('scenarios') by tests.
#
# Copyright (c) 2009, Robert Collins <robertc@robertcollins.net>
# 
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
# 

            

Reported by Pylint.

Trailing whitespace
Error

Line: 10 Column: 2

              # license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
# license you chose for the specific language governing permissions and
# limitations under that license.

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 24 Column: 1

              import testscenarios


def test_suite():
    result = unittest.TestSuite()
    standard_tests = unittest.TestSuite()
    module = sys.modules['testscenarios.tests']
    loader = unittest.TestLoader()
    return load_tests(standard_tests, module, loader)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 32 Column: 1

                  return load_tests(standard_tests, module, loader)


def load_tests(standard_tests, module, loader):
    test_modules = [
        'testcase',
        'scenarios',
        ]
    prefix = "testscenarios.tests.test_"

            

Reported by Pylint.

src/third_party/wiredtiger/test/3rdparty/testscenarios-0.4/lib/testscenarios/__init__.py
7 issues
Undefined variable name 'apply_scenarios' in __all__
Error

Line: 47 Column: 5

                  'TestWithScenarios',
    'WithScenarios',
    'apply_scenario',
    'apply_scenarios',
    'generate_scenarios',
    'load_tests_apply_scenarios',
    'multiply_scenarios',
    'per_module_scenarios',
    ]

            

Reported by Pylint.

Unused argument 'module'
Error

Line: 72 Column: 32

                  return testscenarios.tests.test_suite()


def load_tests(standard_tests, module, loader):
    standard_tests.addTests(loader.loadTestsFromNames(["testscenarios.tests"]))
    return standard_tests

            

Reported by Pylint.

Trailing whitespace
Error

Line: 5 Column: 2

              #  dependency injection ('scenarios') by tests.
#
# Copyright (c) 2009, Robert Collins <robertc@robertcollins.net>
# 
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
# 

            

Reported by Pylint.

Trailing whitespace
Error

Line: 10 Column: 2

              # license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
# license you chose for the specific language governing permissions and
# limitations under that license.

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 67 Column: 1

              from testscenarios.testcase import TestWithScenarios, WithScenarios


def test_suite():
    import testscenarios.tests
    return testscenarios.tests.test_suite()


def load_tests(standard_tests, module, loader):

            

Reported by Pylint.

Import outside toplevel (testscenarios.tests)
Error

Line: 68 Column: 5

              

def test_suite():
    import testscenarios.tests
    return testscenarios.tests.test_suite()


def load_tests(standard_tests, module, loader):
    standard_tests.addTests(loader.loadTestsFromNames(["testscenarios.tests"]))

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 72 Column: 1

                  return testscenarios.tests.test_suite()


def load_tests(standard_tests, module, loader):
    standard_tests.addTests(loader.loadTestsFromNames(["testscenarios.tests"]))
    return standard_tests

            

Reported by Pylint.