File 3574-erts-Fix-process_info-_-garbage_collection-for-max_h.patch of Package erlang

From 887435b2fe230986f2b7da73ca83d607a88b1cde Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Mon, 27 Feb 2023 12:54:12 +0100
Subject: [PATCH] erts: Fix process_info(_, garbage_collection) for
 max_heap_size

The 2-tuple {max_heap_size, Map} was accidentally lost.

https://github.com/erlang/otp/issues/6922

Introduced by 8d5f5ef0b5bd87a79390fe767cbfed9827ba66fe
in OTP 26.0-rc1.
---
 erts/emulator/beam/erl_bif_info.c    |  4 ++--
 erts/emulator/test/process_SUITE.erl | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 1665b09503..8ba4a7a3ae 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -1954,8 +1954,8 @@ process_info_aux(Process *c_p,
 	t = TUPLE2(hp, am_min_bin_vheap_size, make_small(rp->min_vheap_size)); hp += 3;
 	res = CONS(hp, t, res); hp += 2;
 
-	t = TUPLE2(hp, am_max_heap_size, t); hp += 3;
-	res = CONS(hp, mhs_map, res); hp += 2;
+	t = TUPLE2(hp, am_max_heap_size, mhs_map); hp += 3;
+	res = CONS(hp, t, res); hp += 2;
 	break;
     }
 
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl
index 506e8d70e7..f6c6526f54 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -1084,6 +1084,20 @@ check_proc_infos(A, B) ->
 
     GC = lists:keysearch(garbage_collection, 1, A),
     GC = lists:keysearch(garbage_collection, 1, B),
+    {value, {garbage_collection, GClist}} = GC,
+
+    %% This is not really documented
+    true = is_integer(gv(minor_gcs, GClist)),
+    true = is_integer(gv(fullsweep_after, GClist)),
+    true = is_integer(gv(min_heap_size, GClist)),
+    #{error_logger := Bool1,
+      include_shared_binaries := Bool2,
+      kill := Bool3,
+      size := MaxHeapSize} = gv(max_heap_size, GClist),
+    true = is_boolean(Bool1),
+    true = is_boolean(Bool2),
+    true = is_boolean(Bool3),
+    true = is_integer(MaxHeapSize),
 
     ok.
 
-- 
2.35.3

openSUSE Build Service is sponsored by