+rabbitmq-server (3.5.6-1~u14.04+mos5) mos8.0; urgency=medium
+
+ * Backport https://github.com/rabbitmq/rabbitmq-common/pull/54
+
+ -- Alexey Lebedeff <alebedev@mirantis.com> Mon, 15 Feb 2016 19:17:40 +0300
+
rabbitmq-server (3.5.6-1~u14.04+mos4) mos8.0; urgency=medium
* Backport https://github.com/rabbitmq/rabbitmq-common/pull/26
--- /dev/null
+Description: Fix rabbitmqctl segfault
+ Rabbitmq contains code that is actually undefined behaviour. While it worked in R16, 17 and will
+ work in 19, it was causing segfaults in 18.X
+Author: Alexey Lebedeff <alebedev@mirantis.com>
+Origin: upstream
+Bug: https://github.com/rabbitmq/rabbitmq-common/issues/53
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/rabbit_misc.erl
++++ b/src/rabbit_misc.erl
+@@ -652,19 +652,7 @@ format_many(List) ->
+ lists:flatten([io_lib:format(F ++ "~n", A) || {F, A} <- List]).
+
+ format_stderr(Fmt, Args) ->
+- case os:type() of
+- {unix, _} ->
+- Port = open_port({fd, 0, 2}, [out]),
+- port_command(Port, io_lib:format(Fmt, Args)),
+- port_close(Port);
+- {win32, _} ->
+- %% stderr on Windows is buffered and I can't figure out a
+- %% way to trigger a fflush(stderr) in Erlang. So rather
+- %% than risk losing output we write to stdout instead,
+- %% which appears to be unbuffered.
+- io:format(Fmt, Args)
+- end,
+- ok.
++ io:format(standard_error, Fmt, Args).
+
+ unfold(Fun, Init) ->
+ unfold(Fun, [], Init).