From: "Kay Sievers" Date: Fri, 07 Nov 2008 13:42:10 +0000 Subject: Re: udev-131 strange segfault Message-Id: List-Id: References: <200811071307.11884.zzam@gentoo.org> In-Reply-To: <200811071307.11884.zzam@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Nov 7, 2008 at 13:07, Matthias Schwarzott 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); Adding "-O2" to the CFLAGS makes it work, right? I guess the debug macro does not get "compiled-out" without optimization and it tries to index operation_str[], which is just nothing. Thanks, Kay