[systemd-devel] [PATCH] crash on suspend/resume ...
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Tue Feb 11 07:11:10 PST 2014
On Tue, Feb 11, 2014 at 02:48:35PM +0000, Michael Meeks wrote:
> Hi Lennart,
>
> Great to see you, albeit too briefly at FOSDEM; my first ever systemd
> crash (on suspend/resume) after many moons of use turned out not to be a
> vendor patch but a core issue (well at least the crash part ;-).
>
> https://bugzilla.novell.com/show_bug.cgi?id=861488
>
> Has the trace, no doubt there is some other problem feeding that,
> unless I'm completely confused - which is more than likely.
>
> All the best,
>
> Michael.
>
> --
> michael.meeks at collabora.com <><, Pseudo Engineer, itinerant idiot
> From 5effdfa831d75306fc0ff9b47d39997e4ae87f16 Mon Sep 17 00:00:00 2001
> From: Michael Meeks <michael.meeks at collabora.com>
> Date: Tue, 11 Feb 2014 14:42:26 +0000
> Subject: [PATCH] Don't snprintf a potentially NULL pointer.
>
> ---
> src/shared/log.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/shared/log.c b/src/shared/log.c
> index 2a075ff..d6b138f 100644
> --- a/src/shared/log.c
> +++ b/src/shared/log.c
> @@ -479,7 +479,7 @@ static int log_do_header(char *header, size_t size,
> func ? "CODE_FUNCTION=" : "",
> func ? LINE_MAX : 0, func,
> func ? "\n" : "",
> - object ? object_name : "",
> + object_name ? object_name : "",
> object ? LINE_MAX : 0, object, /* %.0s means no output */
Printing of the three arguments is supposed to be conditional on the
same condtion (object != NULL). Anyway, in your backtrace:
#9 log_do_header (header=header at entry=0xbfeef2ec
"PRIORITY=6\nSYSLOG_FACILITY=3\nCODE_FILE=", level=level at entry=30,
file=file at entry=0x80e5c6e "src/core/manager.c", line=line at entry=1736,
func=func at entry=0x80e7556 <__func__.13183> "process_event",
object_name=object_name at entry=0x0, object=object at entry=0x0, size=2048) at
src/shared/log.c:445
...they are both null, so the patch shouldn't change anything.
Zbyszek
More information about the systemd-devel
mailing list