[
https://issues.apache.org/jira/browse/MESOS-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joerg Schad reassigned MESOS-1353:
----------------------------------
Assignee: Joerg Schad
> Operands don't affect result in mesos_containerizer.cpp
> -------------------------------------------------------
>
> Key: MESOS-1353
> URL: https://issues.apache.org/jira/browse/MESOS-1353
> Project: Mesos
> Issue Type: Bug
> Reporter: Niklas Quarfot Nielsen
> Assignee: Joerg Schad
> Priority: Minor
> Labels: coverity, newbie
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)