mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <>
Subject Review Request 46822: Avoided slicing of flags in subprocess.
Date Fri, 29 Apr 2016 09:37:46 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos, Alexander Rukletsov and Vinod Kone.

Bugs: MESOS-3335

Repository: mesos


While `FlagsBase` internally stores just maps of names and
flags, the functions stored in a `Flag` rely on the original type of
the `Flags` containing them (e.g., we perform dynamic casts to detect
their types).

Since `Option<T>` stores `T` as a value (i.e., it cannot contain
reference types) any interface taking an `Option<T>` cannot rely on
polymorphic behavior of `T`. To make use of polymorphism we should
instead store e.g., a pointer type to avoid slicing.

Here we change `Flags` arguments of `subprocess` to allow preserving
the original type so `Flag` function can work reliably.


  src/slave/container_loggers/lib_logrotate.cpp 1f228806da32832c9ca1ae4defcd1bdc154adc18 
  src/slave/containerizer/docker.cpp 7af14f4472283ceefd73c06dd8df60af4cf6f7e8 
  src/slave/containerizer/mesos/containerizer.cpp 8d538954d6e1f13e833d75c2eaa37e700278ee0c

  src/slave/containerizer/mesos/isolators/network/cni/cni.cpp ef0bc1092d761804ca6bd73016c0f3dd23719257

  src/slave/containerizer/mesos/launcher.hpp 5977c30c0aacc569019f7b34bb0c6577823ec887 
  src/slave/containerizer/mesos/launcher.cpp a5c8c31b72773d0bd10b9d02675a01f1d641d41c 
  src/slave/containerizer/mesos/linux_launcher.hpp 89bb2958a41dffe4ade9c2492b9a7412f90a432d

  src/slave/containerizer/mesos/linux_launcher.cpp 5028854fa003615f158120e030866b7ec4402b66

  src/tests/containerizer/launch_tests.cpp 3e36f2f7ab89b98de2c1a971e4ecca58c13ad642 
  src/tests/containerizer/launcher.hpp c352634c4766d289706c7cc738677619d7d02ccd 



Tested on various platforms in internal CI.


Benjamin Bannier

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message