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

Operands don't affect result in mesos_containerizer.cpp

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: