File 0329-erts-Add-ASSERT-to-silence-clang-sa-warning.patch of Package erlang
From 18fe0409fb7b5cbc3781fb3b33903663549ff6a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= <lukas@erlang.org>
Date: Wed, 9 Apr 2025 09:37:46 +0200
Subject: [PATCH 1/3] erts: Add ASSERT to silence clang-sa warning
---
erts/emulator/beam/erl_bits.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/erts/emulator/beam/erl_bits.h b/erts/emulator/beam/erl_bits.h
index 837580fc95..94c410bff5 100644
--- a/erts/emulator/beam/erl_bits.h
+++ b/erts/emulator/beam/erl_bits.h
@@ -389,6 +389,7 @@ Eterm erts_wrap_refc_bitstring(struct erl_off_heap_header **oh,
/* If the source was writable its underlying binary may */ \
/* move at any point, so we need to follow it instead of */ \
/* using the stored pointer. */ \
+ ASSERT(_br); \
Base = (byte*)((_br->val)->orig_bytes); \
if (!((_br->val)->intern.flags & BIN_FLAG_WRITABLE)) { \
_sb->base_flags = (UWord)Base; \
--
2.43.0