Log

Author Commit Date CI Message
Ross Lagerwall 3b2529ac 2012-06-06T21:57:12 Fix a couple of memory leaks (found with Valgrind).
Sebastian Hahn fcec3e80 2012-06-01T05:23:29 Correctly check for arc4random_buf Apparently it's necssary to do an explicit comparison with NULL here. This also gets rid of a compile warning
Greg Hazel bff5f940 2012-05-29T12:39:12 check for arc4random_buf at runtime, on OS X (Tweaked by nickm: Fix up the arcr4andom_buf OSX hack so that the fallback case isn't compiled into the code when we have arc4random_buf() and we are not on OSX. Also add a comment explaining what's up.)
Nick Mathewson faa92253 2012-05-03T16:34:29 Bump version to 2.0.19-stable-dev
Nick Mathewson 8a9b0cdf 2012-05-03T12:33:36 Increment version to 2.0.19-stable
Nick Mathewson e06206eb 2012-05-03T12:15:11 Oops; fix the *right* windows compile issue
Nick Mathewson be7a0be8 2012-05-03T12:05:52 Fix win32 build issues: sleep, pid_t
Nick Mathewson cecb111b 2012-05-02T17:09:11 Start changelog for 2.0.19-stable
Nick Mathewson 265e6779 2012-05-02T16:52:27 Fix evdns build with threads disabled The last evdns change apparently broke it, by using a "base" variable that we were only declaring with threads turned on.
Nick Mathewson 3d9e52ac 2012-05-01T19:52:55 When retransmitting a timed-out DNS request, pick a fresh nameserver. Otherwise, requests initially sent to a failing nameserver would stay there indefinitely, even if other nameservers would work. Fix for sourceforge bug 3518439
Nick Mathewson d873d678 2012-05-01T19:52:49 Make some evdns.c debug logs more verbose
Nick Mathewson 6610fa5a 2012-05-01T17:07:50 dns-example.c can now take a resolv.conf file on the commandline
Nick Mathewson 30f06715 2012-04-30T21:45:43 Merge remote-tracking branch 'github/20_active_prio_inv' into patches-2.0
Nick Mathewson b3887cdf 2012-04-11T21:33:27 Work-around a stupid gcov-breaking bug in OSX 10.6 This only affects the unit tests. Fix found at http://rachelbythebay.com/w/2011/07/12/forkcrash/ (Backport from 2.1)
Mark Ellzey 4e62cd16 2012-03-30T15:08:40 Fixed potential double-readcb execution with openssl bufferevents. the function do_read() will call SSL_read(), and if successful, will call _bufferevent_run_readcb() before returning to consider_reading(). consider_reading() will then check SSL_pending() to make sure all pending data has also been read. If it does not, do_read() is called again. The issue with this is the possibility that the function that is executed by _bufferevent_run_readcb() called bufferevent_disable(ssl_bev, EV_READ) before the second do_read(); In this case, the users read callback is executed a second time. This is potentially bad for applications that expect the bufferevent to stay disabled until further notice. (this is why running openssl bufferevents without DEFER_CALLBACKS has always been troublesome).
Nick Mathewson 2bfda401 2012-04-30T17:30:48 If a higher-priority event becomes active, don't continue running events of the current priority. Bug found by Ralph Castain.
Zack Weinberg 30b6f889 2012-04-27T09:32:51 Generate event-config.h with a single sed script This approach should make the creation of the file more atomic, to fix a bug reported by Dinh. This patch has one change from Zack's original version: it avoids $<, since Dave Hart tells me he thinks that's not so portable. (commit message by nickm)
Nick Mathewson 03614a16 2012-04-20T11:51:13 Merge branch '20_periodic_event_overload_v2' into patches-2.0
Nick Mathewson dfd808cb 2012-04-19T00:25:12 If time has jumped so we'd reschedule a periodic event in the past, schedule it for the future instead Fixes an issue reported on libevent-users in the thread "a dead looping bug when changing system time backward". Previously, if time jumped forward 1 hour[*] and we had a one-second periodic timer event, that event would get invoked 3600 times. That's almost certainly not what anybody wants. In a future version of Libevent, we should expose the amount of time that the callbac kwould have been invoked somehow. [*] Forward time jumps can happen with nonmonotonic clocks, or with clocks that jump on suspend/resume. It can also happen from Libevent's point of view if the user exits from event_base_loop() and doesn't call it again for a while.
Nick Mathewson bec22b41 2012-04-19T18:15:12 Refactor event_persist_closure: raise and extract some common logic
Nick Mathewson 37c4fc8d 2012-04-19T08:11:05 Merge pull request #52 from ghazel/20_evdns_probe cancel the probe request when the server is freed, and ignore cancelled probe callbacks
Greg Hazel 46b80608 2012-04-18T21:41:48 remove redundant DNS_ERR_CANCEL check, move comment
Greg Hazel 94d23360 2012-04-18T21:29:21 cancel the probe request when the server is freed, and ignore cancelled probe callbacks
Nick Mathewson d1a03b2f 2012-04-03T18:31:08 Backport: provide EVENT_LOG_* names, and deprecate _EVENT_LOG_* This is a partial backport of cb9da0bf and a backport of c9635349. Because C doesn't like us to declare identifiers starting with an underscore, Libevent 2.1 has renamed every such identifier. The only change that affects a public API is that the _EVENT_LOG_* macros have been renamed to start with EVENT_LOG instead. The old names are still present, but deprecated. I'm doing this backport because it represents the deprecation of a Libevent 2.0 interface, and folks should have the opportunity to write code that isn't deprecated and works with both 2.0 and 2.1.
Nick Mathewson f775521c 2012-04-03T17:25:36 Fix the website URL in the readme
Sebastian Hahn 4a6fd433 2012-04-03T05:31:20 Configure with gcc older than 2.95 I don't know why people use such ancient gcc versions, but the fix seems straightforward enough to maybe just do it.
Nick Mathewson 4c7ee6b0 2012-04-02T18:12:44 Add missing ) to changelog; spotted by rransom
Nick Mathewson 336dcaea 2012-03-30T10:26:50 Fix a compilation error with MSVC 2005 due to use of mode_t MSVC apparently doesn't have a mode_t defined, though mingw does. Found by Savg He.
Nick Mathewson 98e9119f 2012-03-25T18:56:15 Fix a typo in the bufferevent documentation
Nick Mathewson 25a424fb 2012-03-22T14:35:23 Add an empty changelog section for 2.0.19-stable
Nick Mathewson f0fb2c27 2012-03-22T14:34:01 Bump version to 2.0.18-stable-dev
Nick Mathewson 75401035 2012-03-22T14:00:54 Bump version to 2.0.18-stable
Nick Mathewson 90c0a7df 2012-03-22T13:47:01 Add credits to README
Nick Mathewson 77342926 2012-03-22T12:49:08 Changelog for libevent 2.0.18-stable
Nick Mathewson c41c1a2b 2012-03-13T15:49:49 Merge remote-tracking branch 'sebastian/clang_unknown_warning_options' into patches-2.0
Sebastian Hahn c2c7b39d 2012-03-13T08:33:06 Properly zero the kevent in kq_setup_kevent() Detected by clang
Sebastian Hahn 083296bc 2012-03-13T06:40:56 Don't do clang version detection when disabling some flags When clang 2.9 was around we hoped they'd introduce support for the normalized=id and override-init warnings by 3.0, but they haven't. We should only add the version detection back in when clang actually supports those warnings.
Nick Mathewson bec50680 2012-02-15T20:12:32 Stop crashing in evdns when nameserver probes give a weird error When a nameserver is down, we periodically try sending a "probe" message to that nameserver to see if it has come back up. If a nameserver comes up, we cancel any pending probe messages. Cancelling a probe message while handling the probe's response would result in a access-after-free or a double-free, so when we notice that we're about to call a nameserver up because of having received a probe from it, we need to check whether current response is the response from the probe. There was a case where we didn't to that, though: when the resolver gave us an unusual error response to our request that it resolve google.com. This is pretty rare, but apparently it can happen with some weird cacheing nameservers -- the one on the mikrotik router, for example. Without this patch, we would crash with a NULL pointer derefernce. Thanks to Hannes Sowa for finding this issue and helping me track it down.
Mark Ellzey 2d67b638 2012-02-14T15:37:58 Changed OPENSSL_LDFLAGS to OPENSSL_LIBADD
Mark Ellzey 92781968 2012-02-14T15:01:02 Added OPENSSL_LDFLAGS env variable which is appended to SSL checks. If openssl is not installed system-wide or not compiled as a shared library, some systems require various link flags (e.g., -ld).
Nick Mathewson 03dce42d 2012-02-11T21:17:18 Tweak the evutil_open_closeonexec patch to work on windows, old unixes. Windows doesn't have a mode_t as far as I can tell. Some unixes, iirc, don't like three-argument open without O_CREAT.
Ross Lagerwall d2b5f722 2012-02-11T17:23:17 Make uses of open() close-on-exec safe by introducing evutil_open_closeonexec. In a multi-process/threaded environment, opening fds internally without the close-on-exec flag could leak fds to child processes.
Nick Mathewson 0c483170 2012-02-10T22:20:05 Add an empty section to the changelog for 2.0.18-stable
Nick Mathewson 5a807b7a 2012-02-10T22:17:59 Correct a name in the credits. oops
Nick Mathewson 2d7bf0f7 2012-02-10T22:16:14 Bump version to 2.0.17-stable-dev
Nick Mathewson 83e58ccd 2012-02-10T18:39:31 Update the credits in the readme
Nick Mathewson 0cdbd642 2012-02-10T18:36:10 Finalize the changelog
Nick Mathewson e49e2891 2012-02-10T17:29:53 Update copyright notices to 2012
Nick Mathewson 8152b4c2 2012-02-10T16:49:05 Bump version to 2.0.17-stable
Nick Mathewson 5d7bfa15 2012-02-10T11:24:51 In the kqueue backend, do not report EBADF as an EV_READ We were doing this because of (correct) reports that NetBSD gives an EBADF when you try to add the write side of a pipe for which the read side has been closed. But on most kqueue platforms, that doesn't happen, and on *all* kqueue platforms, reporting a nonexistent fd (which we usually have if we have seen EBADF) as readable tends to give programs a case of the vapors. Nicholas Marriott wrote the original patch here; I did the comment fixes.
Nick Mathewson 19715a60 2012-02-09T15:07:19 Avoid crash when freeing event_iocp and using event_set_mem_functions There was a calloc that needed to be an mm_calloc. Reported by "fffvvvzz" on sourceforge. Ticket 3486114
Nick Mathewson 6f6cebe3 2012-02-06T21:18:25 Bring the changelog up to date
Nick Mathewson 5b4b8126 2012-02-06T12:24:49 Loop on filtering SSL reads until we are blocked or exhausted. This is not a perfect fix, but it's much much better than the current buggy behavior, which could lead to filtering SSL connections that just stopped reading. Based on ideas by Maseeb Abdul Qadir and Mark Ellzey.
Greg Hewgill d84d9170 2011-11-21T09:41:55 Use C-style comments in C source files (for compatibility with compilers such as xlc on AIX).
Nick Mathewson d6094b16 2012-02-01T14:56:43 evdns: fix a bug in circular-queue implementation found by Wang Qin
Nick Mathewson 9f9e259f 2012-01-26T15:04:24 Better workaround for Linux 3.2 edge-triggered epoll bug On further investigation, it appears that this problem is limited to AF_UNIX sockets, so let's just do the test on AF_INET sockets.
Nate R c94a5f2a 2012-01-24T17:15:50 Do a memberwise comparison of threading function tables Doing a memcmp risks comparing uninitialized padding bytes at the end of the structure.
Nick Mathewson 438d4ff2 2012-01-24T15:29:39 Make event_base integrity check work on windows
Nick Mathewson edc6d7d7 2012-01-24T15:09:04 Start writing a changelog for 2.0.17-stable
Nick Mathewson 5408ff3b 2012-01-24T11:16:26 Oops:remove an accidentally committed "sleep(1)" in a unit test
Nick Mathewson dab91877 2012-01-24T11:04:19 Workaround in the unit tests for an apparent epoll bug in Linux 3.2
Nick Mathewson 3f18ad1b 2012-01-23T18:15:44 Fix a fd leak in event_reinit() We were supposed to be closing the ev_signal_pair sockets.
Nick Mathewson 6e41cdc1 2012-01-23T17:59:16 Fix a list corruption bug when using event_reinit() with signals present While re-adding all the events, event_reinit() could add a signal event, which could then cause evsig_add() to add the base->sig.ev_signal event. Later on its merry path through base->eventqueue, event_reinit() would find that same event and give it to event_io_add a second time. This would make the ev_io_next list for that fd become circular. Ouch!
Nick Mathewson 3312b020 2012-01-23T17:43:35 Check event_base correctness at end of each unit test
Nick Mathewson 27737d55 2012-01-21T12:55:15 Add function to check referential integrity of an event_base
Catalin Patulea 790f6b3b 2012-01-10T18:33:58 Force strict validation of HTTP version in response. This sometimes accepted invalid versions like 'ICY' (n = 0, major = undefined, sometimes > 1).
Nick Mathewson 7206e8cd 2012-01-16T14:45:31 Suppress a gcc warning from ignoring fwrite return in http-sample.c Found by Steve Snyder
Nick Mathewson cba48c7d 2012-01-09T16:44:53 Fix a race condition in the dns/bufferevent_connect_hostname test. As originally written, the test would only pass if the accept() callbacks for the evconnlistener were all invoked before the last of the CONNECTED/ERROR callbacks for the connecting/resolving bufferevent had its call to event_base_loopexit() complete. But this was only accidentally true in 2.0, and might not be true at all in 2.1 where we schedule event_base_once() callbacks more aggressively. Found by Sebastian Hahn.
Nick Mathewson ecfc720a 2012-01-09T11:49:41 Make evconnlistener work around bug in older Linux when getting nmapped Older Linuxes sometimes respond to some nmap probes by having accept() return a success but with socklen 0. That can lead to confusing behavior when you go to process the sockaddr.
Nick Mathewson f0325167 2012-01-09T11:33:38 Remove bogus casts of socket to int before calling ev_callback This should make 64-bit windows act better. Found by Mark Heily.
Arno Bakker da70fa70 2011-12-14T16:17:19 Backport evhttp_connection_get_bufferevent to Libevent 2.0 Backport by Arno Bakker; original implementation in 8d3a8500f4
Nick Mathewson 7bbf6ca7 2011-12-08T14:36:32 Slightly clarify evbuffer_peek documentation
Zack Weinberg c986f232 2011-12-08T14:30:20 Fix behavior of evbuffer_peek(buf,-1,NULL,NULL,0) (Patch altered by nickm to not affect the behavior of evbuffer_peek(buf,-1,NULL,vec,n_vec).)
Mike Frysinger 358c745e 2011-12-08T11:39:48 check for sysctl before we use it Not all C libraries under Linux support the sysctl() func.
Colin Watt 19277763 2011-12-06T13:35:54 Fix a silly compilation error with the sun compiler Apparently, other compilers were allowing "return free(x)" in a function returning void.
Nick Mathewson 11f36a5f 2011-12-05T15:02:27 Be absolutely sure to clear pncalls before leaving event_signal_closure I thought we'd fixed the cases where this could come up, but apparently having an event_base_break() happen while processing signal events could get us in trouble. Found by Remi Gacogne. Sourceforge issue 3451433 .
Nick Mathewson ba4d6696 2011-11-18T15:34:37 Increment version to 2.0.16-stable-dev
Nick Mathewson 5de3fa32 2011-11-18T15:27:06 Increment version to 2.0.16-stable
Nick Mathewson 31c99bd2 2011-11-18T15:14:50 Revise 2.0.16-stable changelog
Nick Mathewson ebf82199 2011-11-17T17:42:45 add comment to new consider_reading code
Mark Ellzey 2aa036fa 2011-11-17T11:59:41 Avoid spinning on OpenSSL reads Previously, if some sender were generating data to read on an OpenSSL connection as fast as we could process it, we could easily wind up looping on an openssl do_read operation without ever considering other sockets. The difference between this and the original method in consider_reading() is that it only loops for a single completed *frame* instead of looping until fd is drained or an error condition was triggered. {Patch split out by nickm}
Nick Mathewson 96c562fa 2011-11-17T11:54:07 Move SSL rate-limit enforcement into bytes_to_read()
Mark Ellzey a186e732 2011-11-17T11:45:49 Refactor amount-to-read calculations in buffervent_ssl consider_reading() Split up consider_reading()'s conditional checks into another function can_read() for simplicity sake. {Split into a separate patch by nickm}
Nick Mathewson 6660c9a3 2011-11-15T18:34:24 Revert "Avoid potential SSL read spinlocks" This reverts commit fc52dbac87f4937f8306759506d6a2ad15ca244c.
Nick Mathewson a62346de 2011-11-15T18:33:50 Revert "openssl bufferevent has the same issue with writing as prior commit." This reverts commit 7353663eb7c0b2a1caaaa5acd818515f156cf2ca.
Nick Mathewson 34045c8f 2011-11-15T17:22:12 Add new entries to changelog, new credits to README
Nick Mathewson b17b0eec 2011-11-15T17:11:42 Fix DNS memleak checks when running with malloc-replacement/debugging disabled
Nick Mathewson e7874133 2011-11-14T17:33:02 Don't try to make notifiable event_base when no threading fns are configured
Nick Mathewson 4e797f38 2011-11-14T17:32:22 Warn when unable to construct base because of failing make_base_notifiable
Mark Ellzey 7353663e 2011-11-14T10:57:15 openssl bufferevent has the same issue with writing as prior commit.
Mark Ellzey fc52dbac 2011-11-14T10:24:07 Avoid potential SSL read spinlocks OpenSSL bufferevents with deferred callbacks enabled under high load will spinlock in the function consider_reading(). This loop continues until all data has been read. Because of this condition; openssl bufferevents will never return back into event_base_loop() until SSL_read has determined data is no longer ready. As of yet I have not found a reason why this while loop exists, so this patch just swaps out while for if. If needed I can write same code which would trigger this effect; optionally libevhtp has a test.c program which can be run with the following flags: ./test -s <keyfile.pem> curl -vvvv -k -d@<HUGE_ASS_FILE> https://127.0.0.1:8081/ The return data will include the number of times the readcb got data and the length of that read. Without this patch, you are likely to see a small amount of "bytes read....", otherwise the "bytes read..." return data should show much more reasonable numbers.
Gisle Vanem a3f320e8 2011-11-09T00:17:56 Improve win32 behavior of dns-sample.c codex
Mansour Moufid 674bc6a2 2011-11-03T11:43:49 Fix typo in whatsnew-2.0.txt
Nick Mathewson c37069cd 2011-11-02T16:09:15 Fix an evbuffer crash in evbuffer_remove_buffer() Found by Greg Hazel.
Greg Hazel 7eb52eb8 2011-11-02T15:19:05 improve test to remove at least one buffer from src
Greg Hazel 90bd620f 2011-11-01T13:44:40 unit test for remove_buffer bug
Nick Mathewson 447b0bad 2011-10-30T22:32:18 Fix compile warning from saying event2/*.h inside a comment Based on a patch by Adrian Chadd
Jamie Iles 1aee7183 2011-10-26T13:24:30 epoll: close fd on alloc fail at initialization If the memory allocations fail then we free any other allocated structures but don't close the file descriptor resulting in an leak of fd's.
Nick Mathewson 3c824bd3 2011-10-24T13:18:09 Update copyright dates to 2011.
Nick Mathewson 724bfb56 2011-10-19T22:59:47 Add note about evhttp_send_reply_end to its doxygen