Skip to content

Commit 19eeb0e

Browse files
committed
Add a regression test that fails on OTP 25
1 parent 63d2c63 commit 19eeb0e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/protobuf/conformance_regressions_test.exs

+11
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ defmodule Protobuf.ConformanceRegressionsTest do
9393
end
9494
end
9595

96+
# Fails on OTP 25.
97+
test "memory leak and infinite loop regression" do
98+
mod = ProtobufTestMessages.Proto2.TestAllTypesProto2
99+
100+
problematic_payload =
101+
<<224, 4, 0, 224, 4, 185, 96, 224, 4, 255, 255, 255, 255, 255, 255, 255, 255, 127, 224, 4,
102+
128, 128, 128, 128, 128, 128, 128, 128, 128, 1>>
103+
104+
assert %^mod{} = mod.decode(problematic_payload)
105+
end
106+
96107
defp url_to_message(%{message_type: type_url}) do
97108
case type_url do
98109
"protobuf_test_messages.proto3.TestAllTypesProto3" ->

0 commit comments

Comments
 (0)