From: Ian Jackson Date: Wed, 13 Jun 2012 23:36:15 +0000 (+0100) Subject: log: Eliminate potential out-of-control recursion X-Git-Tag: debian/0.3.0_beta1~18 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/secnet/commitdiff_plain/ba72e2bf5e1a1cedc74f7de35e29cce7a0f4fca1?ds=inline;hp=ba72e2bf5e1a1cedc74f7de35e29cce7a0f4fca1 log: Eliminate potential out-of-control recursion vMessage looks for the system log instance. If there is one, it uses it; otherwise it just uses stderr or stdout. The system log instance consists, eventually, of syslog_vlog or logfile_vlog. Both of these functions have a fallback: if they are properly set up they do their thing; otherwise they call vMessage. This is wrong because in this situation they have probably been called by vMessage so it doesn't help. At first sight this ought to produce unbounded recursion but for complicated reasons another bug prevents this. Instead, messages can just vanish. Break out the fallback mode of [v]Message into [v]MessageFallback so that syslog_vlog and logfile_vlog can use it directly. Signed-off-by: Ian Jackson ---