public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/erlang-amf] rawhide: Fix FTBFS
@ 2026-07-29 12:44 Peter Lemenkov
0 siblings, 0 replies; only message in thread
From: Peter Lemenkov @ 2026-07-29 12:44 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/erlang-amf
Branch : rawhide
Commit : 74ceb89c65babcb9dd5134f8eef6d58ac9c5083b
Author : Peter Lemenkov <lemenkov@gmail.com>
Date : 2026-07-29T14:39:23+02:00
Stats : +35/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/erlang-amf/c/74ceb89c65babcb9dd5134f8eef6d58ac9c5083b?branch=rawhide
Log:
Fix FTBFS
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
diff --git a/erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch b/erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch
new file mode 100644
index 0000000..1987aa3
--- /dev/null
+++ b/erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Wed, 29 Jul 2026 14:36:18 +0200
+Subject: [PATCH] Fix gb_trees iterator exhaustion for OTP 27
+
+In OTP 27, gb_trees:next/1 returns 'none' when the iterator is
+exhausted, instead of the empty list '[]' as in previous versions. The
+encode_as_reference/2 function only handled the '[]' case via a function
+clause, causing a {case_clause, none} crash at runtime when encoding
+objects, arrays or typed objects.
+
+Add a 'none' clause to the case expression to handle iterator exhaustion
+correctly under OTP 27 while remaining compatible with older OTP
+versions.
+
+Fixes FTBFS on Fedora Rawhide (OTP 27).
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Assisted-by: Claude (Anthropic) <https://claude.ai>
+
+diff --git a/src/amf0.erl b/src/amf0.erl
+index 33145c3..463c290 100644
+--- a/src/amf0.erl
++++ b/src/amf0.erl
+@@ -248,6 +248,8 @@ encode_as_reference(_Value, []) ->
+ inline;
+ encode_as_reference(Value, Iterator0) ->
+ case gb_trees:next(Iterator0) of
++ none ->
++ inline;
+ {Key, Value, _} ->
+ {ok, <<?REFERENCE, Key:16>>};
+ {_, _, Iterator1} ->
diff --git a/erlang-amf.spec b/erlang-amf.spec
index 57ce169..f61db1a 100644
--- a/erlang-amf.spec
+++ b/erlang-amf.spec
@@ -10,7 +10,8 @@ Summary: Erlang Action Message Format Library
License: BSD-2-Clause
URL: https://github.com/abuibrahim/erlang-%{realname}
VCS: git:%{url}.git
-Source0: %{url}/archive/%{git_commit}/%{realname}-%{version}.tar.gz
+Source: %{url}/archive/%{git_commit}/%{realname}-%{version}.tar.gz
+Patch: erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch
BuildSystem: rebar3
%description
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-29 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-29 12:44 [rpms/erlang-amf] rawhide: Fix FTBFS Peter Lemenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox