Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-1353

Operands don't affect result in mesos_containerizer.cpp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Cannot Reproduce
    • None
    • None
    • None

    Description

      May be a false positive - should be investigated.
      ________________________________________________________________________________________________________

          • CID 1213887: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
            /src/slave/containerizer/mesos_containerizer.cpp: 416 in mesos::internal::slave::execute(const mesos::CommandInfo &, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const Option<std::basic_string<char, std::char_traits<char>, std::allocator<char>>> &, const std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> &, bool, int, int, const std::list<Option<mesos::CommandInfo>, std::allocator<Option<mesos::CommandInfo>>> &)()
            410 if (chown.isError()) { 411 ABORT("Failed to chown work directory"); 412 }

            413 }
            414
            415 // Enter working directory.
            >>> CID 1213887: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
            >>> "chdir(directory) < 0" is always false regardless of the values of its operands. This occurs as the logical operand of if.
            416 if (os::chdir(directory) < 0)

            { 417 ABORT("Failed to chdir into work directory"); 418 }

            419
            420 // Redirect output to files in working dir if required. We append because
            421 // others (e.g., mesos-fetcher) may have already logged to the files.

      Attachments

        Activity

          People

            js84 Jörg Schad
            nnielsen Niklas Quarfot Nielsen
            Till Toenshoff Till Toenshoff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: