From 5372d0eaf80855c455f86511a4ab4036480ab670 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 28 May 2024 19:18:02 +0200 Subject: [PATCH] erts: Fix no locking in export_table_sz() during crash dump --- erts/emulator/beam/export.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erts/emulator/beam/export.c b/erts/emulator/beam/export.c index fdaf1a15a534..dbe83ba1f4fa 100644 --- a/erts/emulator/beam/export.c +++ b/erts/emulator/beam/export.c @@ -364,13 +364,18 @@ int export_list_size(ErtsCodeIndex code_ix) int export_table_sz(void) { + const int lock = !ERTS_IS_CRASH_DUMPING; int i, bytes = 0; - export_staging_lock(); + if (lock) { + export_staging_lock(); + } for (i=0; i