[systemd-devel] Clarification around a segmentation fault from an udevd worker

Daniel Mack daniel at zonque.org
Wed Jul 29 04:54:52 PDT 2015


On 07/29/2015 01:40 PM, SF Markus Elfring wrote:
>> Do you have *any* local modifications in your tree?
> 
> Yes. - It seems that I was bitten by a format string mismatch during
> an attempt to display a few more implementation details for my needs.
> 
> 
> diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c
> index 2e60433..b5a31ec 100644
> --- a/src/libsystemd/sd-device/device-private.c
> +++ b/src/libsystemd/sd-device/device-private.c
> @@ -1076,7 +1076,7 @@ int device_update_db(sd_device *device) {
>                  goto fail;
>          }
>  
> -        log_debug("created %s file '%s' for '%s'", has_info ? "db" : "empty",
> +        log_debug("%s:%s:%d: created %s file '%s' for '%s'", has_info ? "db" : "empty", __FUNCTION__, __FILE__, __LINE__,
>                    path, device->devpath);

Which is completely wrong, obviously.

> Should my compiler "gcc 5.2.0" be able to detect and warn about misplaced
> parameters in such an use case?

I'm sure you got a warning on this.

Such reports really waste our time, which is annoying.


Daniel



More information about the systemd-devel mailing list