-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67401/
-----------------------------------------------------------

(Updated May 31, 2018, 4:11 p.m.)


Review request for mesos, Alexander Rukletsov and Benjamin Mahler.


Summary (updated)
-----------------

Removed undefined behaviour in libprocess due to order-of-evaluation bug.


Bugs: MESOS-8970
    https://issues.apache.org/jira/browse/MESOS-8970


Repository: mesos


Description
-------

Up to C++17, the only ordering constraint on the evaluation of
expressions between synchronization points was that function
arguments shall be evaluated before calling a function.

This could lead to the situation where `std::move(futures)` could be
called before `await(futures.values())`, leading to a function call
on a moved-from object and thus undefined behaviour.


Diffs
-----

  3rdparty/libprocess/src/metrics/metrics.cpp 
e0d0ee4c8d0df66779c7ef296a1a18d988e889b8 


Diff: https://reviews.apache.org/r/67401/diff/1/


Testing (updated)
-------

`./libprocess-tests`

Internal CI run including this fix w/o libprocess segfaults: 
https://jenkins.mesosphere.com/service/jenkins/job/mesos/job/Mesos_CI-build/3655


Thanks,

Benno Evers

Reply via email to