File 0402-erts-Fix-printing-of-lc-locks-in-non-lc-thread.patch of Package erlang

From a8c568f1b39c8bc2dbe03fea097e64764b4a717b Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Thu, 25 Jun 2020 11:37:56 +0200
Subject: [PATCH 02/34] erts: Fix printing of lc locks in non-lc thread

---
 erts/emulator/beam/erl_lock_check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/erts/emulator/beam/erl_lock_check.c b/erts/emulator/beam/erl_lock_check.c
index 1ffe42b620..6613707e3f 100644
--- a/erts/emulator/beam/erl_lock_check.c
+++ b/erts/emulator/beam/erl_lock_check.c
@@ -465,7 +465,7 @@ print_curr_locks(lc_thread_t *thr)
     if (!thr || !thr->locked.first)
 	erts_fprintf(stderr,
 		     "Currently no locks are locked by the %s thread.\n",
-		     thr->thread_name);
+		     thr ? thr->thread_name : "unknown");
     else {
 	erts_fprintf(stderr,
 		     "Currently these locks are locked by the %s thread:\n",
-- 
2.26.2

openSUSE Build Service is sponsored by