[Libevent-users] [PATCH] http.c build errors and a segfault (USE_DEBUG only)
Compilation errors in http.c and a segfault during "make verify" when USE_DEBUG is defined. Index: libevent/http.c === --- libevent/http.c (revision 429) +++ libevent/http.c (working copy) @@ -1174,7 +1174,7 @@ if (strchr(value, '\r') != NULL || strchr(value, '\n') != NULL || strchr(key, '\r') != NULL || strchr(key, '\n') != NULL) { /* drop illegal headers */ - event_debug(("%s: dropping illegal header\n")); + event_debug(("%s: dropping illegal header\n", __func__)); return (-1); } @@ -1499,7 +1499,7 @@ evcon->fd = bind_socket(evcon->bind_address, 0); if (evcon->fd == -1) { event_debug(("%s: failed to bind to \"%s\"", - __func__, bind_address)); + __func__, evcon->bind_address)); return (-1); } @@ -2439,7 +2439,7 @@ if (ai == NULL) { event_debug(("%s: make_addrinfo: \"%s:%d\"", - __func__, evcon->address, evcon->port)); + __func__, address, port)); return (-1); } ___ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users
Re: [Libevent-users] [PATCH] http.c build errors and a segfault (USE_DEBUG only)
Hi Christopher, thank you for the report. This is fixed in trunk now. Niels. On 9/15/07, Christopher Layne <[EMAIL PROTECTED]> wrote: > Compilation errors in http.c and a segfault during "make verify" when > USE_DEBUG is defined. > > Index: libevent/http.c > === > --- libevent/http.c (revision 429) > +++ libevent/http.c (working copy) > @@ -1174,7 +1174,7 @@ > if (strchr(value, '\r') != NULL || strchr(value, '\n') != NULL || > strchr(key, '\r') != NULL || strchr(key, '\n') != NULL) { > /* drop illegal headers */ > - event_debug(("%s: dropping illegal header\n")); > + event_debug(("%s: dropping illegal header\n", __func__)); > return (-1); > } > > @@ -1499,7 +1499,7 @@ > evcon->fd = bind_socket(evcon->bind_address, 0); > if (evcon->fd == -1) { > event_debug(("%s: failed to bind to \"%s\"", > - __func__, bind_address)); > + __func__, evcon->bind_address)); > return (-1); > } > > @@ -2439,7 +2439,7 @@ > > if (ai == NULL) { > event_debug(("%s: make_addrinfo: \"%s:%d\"", > - __func__, evcon->address, evcon->port)); > + __func__, address, port)); > return (-1); > } > > ___ > Libevent-users mailing list > Libevent-users@monkey.org > http://monkey.org/mailman/listinfo/libevent-users > > ___ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users
Re: [Libevent-users] [PATCH] Fix problems in evport.c
On Wed, Sep 12, 2007 at 10:23:52AM +0200, Trond Norbye wrote: > This patch fix two problems with evport.c on Solaris: > > 1. The grow-function reallocates the ed_fds array, but ed_pending array > may contain pointers to the elements in the ed_fds array. These pointers > must be relocated to avoid using freed memory. > > 2. evport_dispatch does not handle a NULL-timval-pinter (no time-based > events are active, wait for I/O). Thanks! I've applied this to trunk and to the 1.3 branch. yrs, -- Nick Mathewson pgpfSwvP7FH3h.pgp Description: PGP signature ___ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users