File 0814-erts-Do-not-put-invalid-term-on-heap.patch of Package erlang

From db8a55942825ded9c6a7d6a6ed4af10709449100 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Thu, 21 Oct 2021 10:39:34 +0200
Subject: [PATCH] erts: Do not put invalid term on heap

When an exception happens in a nif, that return value cannot
be used as a term.
---
 erts/emulator/test/nif_SUITE_data/nif_SUITE.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
index f3cab31f33..61af12dd7b 100644
--- a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
+++ b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c
@@ -2074,7 +2074,7 @@ static ERL_NIF_TERM call_nif_nan_or_inf(ErlNifEnv* env, int argc, const ERL_NIF_
     assert(enif_is_exception(env, res));
     assert(enif_has_pending_exception(env, NULL));
     if (strcmp(arg, "tuple") == 0) {
-        return enif_make_tuple2(env, argv[0], res);
+        return enif_make_tuple2(env, argv[0], argv[0]);
     } else {
         return res;
     }
-- 
2.31.1

openSUSE Build Service is sponsored by