Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
50526ff3
Commit
50526ff3
authored
Jul 19, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix possible double-free in brokers
parent
8d5b9909
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
libcaf_io/caf/io/broker_servant.hpp
libcaf_io/caf/io/broker_servant.hpp
+4
-0
No files found.
libcaf_io/caf/io/broker_servant.hpp
View file @
50526ff3
...
@@ -87,10 +87,14 @@ protected:
...
@@ -87,10 +87,14 @@ protected:
}
}
bool
invoke_mailbox_element
(
execution_unit
*
ctx
)
{
bool
invoke_mailbox_element
(
execution_unit
*
ctx
)
{
// hold on to a strong reference while "messing" with the parent actor
strong_actor_ptr
ptr_guard
{
this
->
parent
()
->
ctrl
()};
auto
prev
=
activity_tokens_
;
auto
prev
=
activity_tokens_
;
invoke_mailbox_element_impl
(
ctx
,
value_
);
invoke_mailbox_element_impl
(
ctx
,
value_
);
// only consume an activity token if actor did not produce them now
// only consume an activity token if actor did not produce them now
if
(
prev
&&
activity_tokens_
&&
--
(
*
activity_tokens_
)
==
0
)
{
if
(
prev
&&
activity_tokens_
&&
--
(
*
activity_tokens_
)
==
0
)
{
if
(
this
->
parent
()
->
is_terminated
())
return
false
;
// tell broker it entered passive mode, this can result in
// tell broker it entered passive mode, this can result in
// producing, why we check the condition again afterwards
// producing, why we check the condition again afterwards
using
passiv_t
=
using
passiv_t
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment