1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-31 16:21:11 +03:00
systemd-stable/udev
Kay Sievers 5d6a1fa6e9 convert debug string arrays to functions
On Fri, Nov 7, 2008 at 13:07, Matthias Schwarzott <zzam@gentoo.org> wrote:
> I managed to let udev-131 segfault at startup.
>
> I configured it like this:
> CFLAGS="-Wall -ggdb" ./configure --prefix=/usr --sysconfdir=/etc --exec-prefix=
>
> Running it in gdb shows it segfaults at udev-rules.c:831
>
> (gdb) run
> Starting program: /tmp/udev-131/udev/udevd
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0804ea06 in get_key (udev=0x9175008, line=0xafcdc8f0, key=0xafcdc5d8,
> op=0xafcdc5d0, value=0xafcdc5d4)
>    at udev-rules.c:831
> 831             dbg(udev, "%s '%s'-'%s'\n", operation_str[*op], *key, *value);

If compiled without optimization, the dbg() macro dereferences variables
which are not available. Convert the string array to a function, which just
returns NULL if compiled without DEBUG.
2008-11-07 15:59:58 +01:00
..
lib udevadm: settle - exit if udevd exits 2008-11-06 19:41:58 +01:00
.gitignore gitignore: move *.8 to subdirs 2008-09-29 05:03:43 +02:00
Makefile.am do not use the new work-in-progress parser rule matcher 2008-10-21 12:45:54 +02:00
test-udev.c cache uid/gid during rule parsing 2008-10-24 10:51:04 +02:00
udev-event.c $links should be relative 2008-11-05 22:13:49 +01:00
udev-node.c fix cleanup of possible left-over symlinks 2008-11-05 04:45:23 +01:00
udev-rules.c convert debug string arrays to functions 2008-11-07 15:59:58 +01:00
udev-selinux.c selinux_init(udev) -> udev_selinux_init(udev) 2008-10-18 19:30:42 +02:00
udev-sysdeps.h rename udev source files 2008-10-16 18:13:48 +02:00
udev-util.c fix indentation 2008-11-06 02:56:45 +01:00
udev.h unify string replacement 2008-11-05 21:49:52 +01:00
udev.xml ATTR{}== always fails if the attribute does not exist 2008-10-29 22:22:12 +01:00
udevadm-control.c use no_argument, required_argument, optional_argument in longopts 2008-10-02 16:49:05 +02:00
udevadm-info.c libudev: device - get_attr_value() -> get_sysattr_value() 2008-10-20 18:12:36 +02:00
udevadm-monitor.c use no_argument, required_argument, optional_argument in longopts 2008-10-02 16:49:05 +02:00
udevadm-settle.c fix uninitialized variable warnings 2008-10-24 09:37:37 +02:00
udevadm-test.c cache uid/gid during rule parsing 2008-10-24 10:51:04 +02:00
udevadm-trigger.c libudev: device - get_attr_value() -> get_sysattr_value() 2008-10-20 18:12:36 +02:00
udevadm.c selinux_init(udev) -> udev_selinux_init(udev) 2008-10-18 19:30:42 +02:00
udevadm.xml udevadm: trigger: use libudev 2008-09-30 13:43:35 +02:00
udevd.c cleanup /dev/.udev/queue on startup and exit 2008-11-06 17:43:12 +01:00
udevd.xml udevadm: add --version --help options to man page, hide them as commands 2008-09-07 14:48:33 +02:00