[systemd-devel] BUG: several bugs in core/main.c (v218)
Lennart Poettering
mztabzr at 0pointer.de
Mon Feb 2 03:44:25 PST 2015
On Thu, 29.01.15 21:54, tomazzi (tomazzi at wp.pl) wrote:
> But that's not really a problem, since the handler is not even re-entrant
> (f.e. due to dynamic memory allocation performed trough log_xxxx macros ->
> log_full_errno -> log_internal -> journal-send.c::_printf_() -> vasprintf()
> )
There is no such call chain. log_internal() does not invoke any
function from journal-send.c.
Our internal non-structured logging code does not allocate dynamic
memory, since we want to be able to aclal it in signal handlers, and
allocating dynamic memory is not OK in signal handlers.
The structured logging code does allocate memory (log_struct() and
friends), simply because I couldn't find a nice way how to pull that
off. However this should not really be a limitation, the rule is
simply that our signal handlers should not invoke structured logging
functions, but only the non-structured ones.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list