Fix infinite recursion of g_log() -> g_vasprintf() -> g_log().

John Lindgren requested to merge jlindgren90/glib:log-recursion into main

Infinite recursion happened in the ENOMEM error case and eventually led to a stack overflow. To avoid recursion, bypass full g_log() and call _g_log_fallback_handler() directly.

Also append a newline in _g_log_fallback_handler(), so that we don't print (all on one line):

gprintf.c:348: failed to allocate memoryAborted (core dumped)

Fixes #2753 (closed)

Merge request reports