[syslog-ng]patch for systems without res_init

Katsuhiro Kondou kondou@isc.org
Mon, 30 Sep 2002 09:08:32 +0900 (JST)


In article <20020930.024602.71082195.kondou@isc.org>,
	Katsuhiro Kondou <Katsuhiro_Kondou@isc.org> wrote;

} I've got the core, but not investigated yet.  I'll
} do it tomorrow, hopefully.

It looks like allocating zero sized memory is failed.

(gdb) bt
#0  0xff141750 in _malloc_unlocked () from /usr/lib/libc.so.1
#1  0xff141520 in malloc () from /usr/lib/libc.so.1
#2  0x21cb4 in xalloc ()
#3  0x21e04 in ol_string_alloc ()
#4  0x1ee28 in c_format ()
#5  0x1aebc in do_handle_dest_writer (c=0x57dd8, msg=0x3f448) at affile.c:321
#6  0x1bac8 in do_handle_affile_log (c=0x57dd8, msg=0x3f448) at affile.c:982
#7  0x1713c in do_handle_log (c=0x42690, msg=0x3f448) at destinations.c:103
#8  0x16578 in do_distribute_log (c=0x50728, msg=0x3f448) at center.c:149
#9  0x16164 in do_add_source_name (c=0x40de8, logmsg=0x3f448) at sources.c:272
#10 0x1c76c in do_handle_afinet_line (c=0x3f3d0, msg=0x3f448) at afinet.c:113
#11 0x15bd8 in do_handle_line (self=0x3f410, length=259024, data=0x3f448 "", 
    addr=0x3f448, addrlen=0) at sources.c:72
#12 0x15d48 in do_read_line (h=0x5c57e, read=0xffbef9c8) at sources.c:138
#13 0x1ff54 in read_callback ()
#14 0x1fbcc in io_iter ()
#15 0x152d8 in main_loop (backend=0x39748) at main.c:192
#16 0x159c8 in main (argc=0, argv=0xffbefd14) at main.c:516
(gdb) frame 2
#2  0x21cb4 in xalloc ()
(gdb) print length
$4 = 0
(gdb) frame 3     
#3  0x21e04 in ol_string_alloc ()
(gdb) print length
$5 = 0
(gdb) frame 4     
#4  0x1ee28 in c_format ()
(gdb) print length
$6 = 0

-- 
Katsuhiro Kondou