You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <be...@mesosphere.io> on 2016/12/02 15:45:20 UTC
Review Request 54309: Fixed ownership semantics of `DynamicLibrary`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54309/
-----------------------------------------------------------
Review request for mesos and Joseph Wu.
Bugs: MESOS-6672
https://issues.apache.org/jira/browse/MESOS-6672
Repository: mesos
Description
-------
The class `DynamicLibrary` is a RAII wrapper around a handle to a
`dlopen`'ed library. To ensure consistent state any `dlopen`'ed library
will be `dlcose`'ed when the "owning" `DynamicLibrary` gets destructed
(e.g., when the wrapper goes out of scope, or when the library holding
a `static` `DynamicLibrary` gets unloaded).
This patch ensure that `DynamicLibraries` can be neither copy- nor
move-constructed. A copy constructor would lead to two wrappers
managing the same library handle which will lead to inconsistent state
(e.g., a library might be unloaded when a copy gets destructed even
though another copy still exists). While it might be possible to
implement a wrapper allowing move-construction, the current wrapper
does not support this.
Diffs
-----
3rdparty/stout/include/stout/posix/dynamiclibrary.hpp 2b343222299c7ca09f919c527c7682f6aebb4439
3rdparty/stout/include/stout/windows/dynamiclibrary.hpp cfa6c88d5d852292bcc931e0598f916833d490ba
Diff: https://reviews.apache.org/r/54309/diff/
Testing
-------
`make check` (default ubuntu-14)
Thanks,
Benjamin Bannier
Re: Review Request 54309: Fixed ownership semantics of
`DynamicLibrary`.
Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54309/#review157856
-----------------------------------------------------------
Ship it!
Ship It!
- Joseph Wu
On Dec. 2, 2016, 7:45 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54309/
> -----------------------------------------------------------
>
> (Updated Dec. 2, 2016, 7:45 a.m.)
>
>
> Review request for mesos and Joseph Wu.
>
>
> Bugs: MESOS-6672
> https://issues.apache.org/jira/browse/MESOS-6672
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The class `DynamicLibrary` is a RAII wrapper around a handle to a
> `dlopen`'ed library. To ensure consistent state any `dlopen`'ed library
> will be `dlcose`'ed when the "owning" `DynamicLibrary` gets destructed
> (e.g., when the wrapper goes out of scope, or when the library holding
> a `static` `DynamicLibrary` gets unloaded).
>
> This patch ensure that `DynamicLibraries` can be neither copy- nor
> move-constructed. A copy constructor would lead to two wrappers
> managing the same library handle which will lead to inconsistent state
> (e.g., a library might be unloaded when a copy gets destructed even
> though another copy still exists). While it might be possible to
> implement a wrapper allowing move-construction, the current wrapper
> does not support this.
>
>
> Diffs
> -----
>
> 3rdparty/stout/include/stout/posix/dynamiclibrary.hpp 2b343222299c7ca09f919c527c7682f6aebb4439
> 3rdparty/stout/include/stout/windows/dynamiclibrary.hpp cfa6c88d5d852292bcc931e0598f916833d490ba
>
> Diff: https://reviews.apache.org/r/54309/diff/
>
>
> Testing
> -------
>
> `make check` (default ubuntu-14)
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 54309: Fixed ownership semantics of
`DynamicLibrary`.
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54309/#review157815
-----------------------------------------------------------
Patch looks great!
Reviews applied: [54309]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh
- Mesos ReviewBot
On Dec. 2, 2016, 3:45 p.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54309/
> -----------------------------------------------------------
>
> (Updated Dec. 2, 2016, 3:45 p.m.)
>
>
> Review request for mesos and Joseph Wu.
>
>
> Bugs: MESOS-6672
> https://issues.apache.org/jira/browse/MESOS-6672
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The class `DynamicLibrary` is a RAII wrapper around a handle to a
> `dlopen`'ed library. To ensure consistent state any `dlopen`'ed library
> will be `dlcose`'ed when the "owning" `DynamicLibrary` gets destructed
> (e.g., when the wrapper goes out of scope, or when the library holding
> a `static` `DynamicLibrary` gets unloaded).
>
> This patch ensure that `DynamicLibraries` can be neither copy- nor
> move-constructed. A copy constructor would lead to two wrappers
> managing the same library handle which will lead to inconsistent state
> (e.g., a library might be unloaded when a copy gets destructed even
> though another copy still exists). While it might be possible to
> implement a wrapper allowing move-construction, the current wrapper
> does not support this.
>
>
> Diffs
> -----
>
> 3rdparty/stout/include/stout/posix/dynamiclibrary.hpp 2b343222299c7ca09f919c527c7682f6aebb4439
> 3rdparty/stout/include/stout/windows/dynamiclibrary.hpp cfa6c88d5d852292bcc931e0598f916833d490ba
>
> Diff: https://reviews.apache.org/r/54309/diff/
>
>
> Testing
> -------
>
> `make check` (default ubuntu-14)
>
>
> Thanks,
>
> Benjamin Bannier
>
>