You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Bannier (JIRA)" <ji...@apache.org> on 2017/01/11 21:16:16 UTC

[jira] [Comment Edited] (MESOS-6606) Reject optimized builds with libcxx before 3.9

    [ https://issues.apache.org/jira/browse/MESOS-6606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15819195#comment-15819195 ] 

Benjamin Bannier edited comment on MESOS-6606 at 1/11/17 9:15 PM:
------------------------------------------------------------------

An alternative to rejecting hardcoded versions would be to turn the upstream reproducer of https://issues.apache.org/jira/browse/MESOS-5745 into a configure check,
{quote}
{code}
#include <functional>
#include <map>

struct F {
  std::map<int, std::function<void()>> m;
  F() { m[42] = []() {}; }
};

int main() {
  F f;
  f = F{};
}
{code}
Gives:
{code}
% clang++  -O2 --std=c++11 f.cpp && ./a.out
[1]    12965 segmentation fault  ./a.out`
{code}
{quote}


was (Author: bbannier):
An alternative to reject hardcoded versions would be to turn the upstream reproducer of https://issues.apache.org/jira/browse/MESOS-5745?jql=text%20~%20%27assign_multi%27 into a configure check,
{quote}
{code}
#include <functional>
#include <map>

struct F {
  std::map<int, std::function<void()>> m;
  F() { m[42] = []() {}; }
};

int main() {
  F f;
  f = F{};
}
{code}
Gives:
{code}
% clang++  -O2 --std=c++11 f.cpp && ./a.out
[1]    12965 segmentation fault  ./a.out`
{code}
{quote}

> Reject optimized builds with libcxx before 3.9
> ----------------------------------------------
>
>                 Key: MESOS-6606
>                 URL: https://issues.apache.org/jira/browse/MESOS-6606
>             Project: Mesos
>          Issue Type: Bug
>          Components: libprocess, stout
>            Reporter: Benjamin Bannier
>
> Recent clang versions optimize more aggressively which leads to runtime errors using valid code, see e.g., MESOS-5745, due to code exposing undefined behavior in libcxx-3.8 and earlier. This was fixed with upstream libcxx-3.9. See https://reviews.llvm.org/D20786 for the patch and https://llvm.org/bugs/show_bug.cgi?id=28469 for the code example extracted from our code base.
> We should consider rejecting builds if libcxx-3.8 or older is detected since not all users compiling Mesos might run the test suite. In our decision to reject we could possibly also take the used clang versions into account (which would just ensure we don't run into the known problems from the UB in libcxx).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)