Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
1248-erts-Fix-debug-functionalty-for-monitors-l...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1248-erts-Fix-debug-functionalty-for-monitors-links.patch of Package erlang
From f5a9c68de0523608c0cb96fd870b671305b5c2eb Mon Sep 17 00:00:00 2001 From: Rickard Green <rickard@erlang.org> Date: Wed, 12 Apr 2023 12:37:13 +0200 Subject: [PATCH] [erts] Fix debug functionalty for monitors/links --- erts/emulator/beam/erl_monitor_link.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/erts/emulator/beam/erl_monitor_link.c b/erts/emulator/beam/erl_monitor_link.c index e103807940..c25ca8d5e5 100644 --- a/erts/emulator/beam/erl_monitor_link.c +++ b/erts/emulator/beam/erl_monitor_link.c @@ -703,10 +703,15 @@ erts_debug_monitor_tree_destroying_foreach(ErtsMonitor *root, void *arg, void *vysp) { - void *tmp_vysp = erts_alloc(ERTS_ALC_T_ML_YIELD_STATE, - sizeof(ErtsMonLnkYieldState)); + void *tmp_vysp; Sint reds; - sys_memcpy(tmp_vysp, tmp_vysp, sizeof(ErtsMonLnkYieldState)); + if (!vysp) + tmp_vysp = NULL; + else { + tmp_vysp = erts_alloc(ERTS_ALC_T_ML_YIELD_STATE, + sizeof(ErtsMonLnkYieldState)); + sys_memcpy(tmp_vysp, tmp_vysp, sizeof(ErtsMonLnkYieldState)); + } do { reds = ml_rbt_foreach_yielding((ErtsMonLnkNode *) root, (ErtsMonLnkNodeFunc) func, @@ -1348,10 +1353,15 @@ erts_debug_link_tree_destroying_foreach(ErtsLink *root, void *arg, void *vysp) { - void *tmp_vysp = erts_alloc(ERTS_ALC_T_ML_YIELD_STATE, - sizeof(ErtsMonLnkYieldState)); + void *tmp_vysp; Sint reds; - sys_memcpy(tmp_vysp, vysp, sizeof(ErtsMonLnkYieldState)); + if (!vysp) + tmp_vysp = NULL; + else { + tmp_vysp = erts_alloc(ERTS_ALC_T_ML_YIELD_STATE, + sizeof(ErtsMonLnkYieldState)); + sys_memcpy(tmp_vysp, vysp, sizeof(ErtsMonLnkYieldState)); + } do { reds = ml_rbt_foreach_yielding((ErtsMonLnkNode *) root, (ErtsMonLnkNodeFunc) func, -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor