File 2762-erts-Fix-NIL-to-be-correct-size.patch of Package erlang
From 42455fb53d4becc2e9a6b8c73fe5f3b54b6ee307 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Tue, 1 Dec 2020 13:25:30 +0100
Subject: [PATCH] erts: Fix NIL to be correct size
When used as an argument to a variadic function NIL has to
have the correct size otherwise it is assumed to be an int
which is not what the va_list function expects.
This was broken in: 8b8c7a63030360436f2ee6d6390d120199260823
---
erts/emulator/beam/erl_term.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erts/emulator/beam/erl_term.h b/erts/emulator/beam/erl_term.h
index d11e124855..ea0cb1ccad 100644
--- a/erts/emulator/beam/erl_term.h
+++ b/erts/emulator/beam/erl_term.h
@@ -283,7 +283,7 @@ _ET_DECLARE_CHECKED(Sint,signed_val,Eterm)
#endif
/* NIL access methods */
-#define NIL _TAG_IMMED2_NIL
+#define NIL ((Eterm)(_TAG_IMMED2_NIL))
#define is_nil(x) ((x) == NIL)
#define is_not_nil(x) ((x) != NIL)
--
2.26.2