File 0128-erts-the-esdp-is-not-always-available-in-matchspec.patch of Package erlang
From 900affc2420905ec70f3cf906324093fc0c2e8a8 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Fri, 5 May 2017 14:55:36 +0200
Subject: [PATCH] erts: the esdp is not always available in matchspec
This happens for instance when a receive_trace is run in the
sys_msg_dispatcher thread when the trace_delivered trace message
is traced.
---
erts/emulator/beam/erl_db_util.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index 91ac53ad0..16142e69f 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -2006,7 +2006,8 @@ restart:
do_catch = 0;
fail_label = -1;
build_proc = psp;
- esdp->current_process = psp;
+ if (esdp)
+ esdp->current_process = psp;
#ifdef DEBUG
ASSERT(variables == mpsp->u.variables);
@@ -2675,7 +2676,8 @@ restart:
do_catch = 1;
if (in_flags & ERTS_PAM_COPY_RESULT) {
build_proc = c_p;
- esdp->current_process = c_p;
+ if (esdp)
+ esdp->current_process = c_p;
}
break;
case matchHalt:
--
2.13.0