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
072086f8
Commit
072086f8
authored
Aug 20, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory corruption in upstream messages
parent
e958fb43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
libcaf_core/src/inbound_path.cpp
libcaf_core/src/inbound_path.cpp
+8
-4
No files found.
libcaf_core/src/inbound_path.cpp
View file @
072086f8
...
@@ -150,8 +150,11 @@ void inbound_path::emit_regular_shutdown(local_actor* self) {
...
@@ -150,8 +150,11 @@ void inbound_path::emit_regular_shutdown(local_actor* self) {
void
inbound_path
::
emit_irregular_shutdown
(
local_actor
*
self
,
error
reason
)
{
void
inbound_path
::
emit_irregular_shutdown
(
local_actor
*
self
,
error
reason
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
slots
)
<<
CAF_ARG
(
reason
));
CAF_LOG_TRACE
(
CAF_ARG
(
slots
)
<<
CAF_ARG
(
reason
));
unsafe_send_as
(
self
,
hdl
,
/// Note that we always send abort messages anonymous. They can get send
make
<
upstream_msg
::
forced_drop
>
(
/// after `self` already terminated and we must not form strong references
/// after that point. Since upstream messages contain the sender address
/// anyway, we only omit redundant information anyways.
anon_send
(
hdl
,
make
<
upstream_msg
::
forced_drop
>
(
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
}
}
...
@@ -159,8 +162,9 @@ void inbound_path::emit_irregular_shutdown(local_actor* self,
...
@@ -159,8 +162,9 @@ void inbound_path::emit_irregular_shutdown(local_actor* self,
stream_slots
slots
,
stream_slots
slots
,
const
strong_actor_ptr
&
hdl
,
const
strong_actor_ptr
&
hdl
,
error
reason
)
{
error
reason
)
{
unsafe_send_as
(
self
,
hdl
,
/// Note that we always send abort messages anonymous. See reasoning in first
make
<
upstream_msg
::
forced_drop
>
(
/// function overload.
anon_send
(
hdl
,
make
<
upstream_msg
::
forced_drop
>
(
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
}
}
...
...
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