Tag
Hash :
5df3037d
Author :
Date :
2020-07-05T15:01:34
Merge branch 'release-2.1.12-stable-pull' into patches-2.1
PR: https://github.com/libevent/libevent/pull/1045
* release-2.1.12-stable-pull:
Update ChangeLog
ci/linux: create dist artifact only if dist archive was built
Merge branch 'fix-signal-leak'
test: fix leak in dns/getaddrinfo_cancel_stress
test: fix UB in evbuffer/empty_reference_prepend_buffer
ci: set build type to debug with sanitizers
test: really disable bufferevent_pair_release_lock under ASAN (and fix gcc)
test-closed: fix leak
test-export: adjust libevent version
cmake: set rpath for libraries on linux
test-export: compatible with all versions of visual studio
Bump version to 2.1.12-stable (w/o ABI breakage)
ci: run ABI for release-*-pull branches too
Purge travis-ci config
Purge appveyor config
Bump ChangeLog for 2.1.12
Update AUTHORS for 2.1.12
Backport github actions to 2.1
test: add getaddrinfo(AI_ADDRCONFIG) test (off by default)
build: remove duplicate -Wredundant-decls
test: fix memory leaks for https (add BEV_OPT_CLOSE_ON_FREE)
test: "fix" (with a quirk) leak in ssl/bufferevent_wm (w/o defer callbacks)
test: disable bufferevent/bufferevent_pair_release_lock under ASAN (too tricky)
test: detect test failures if atexit handler calls _exit(!0) (sanitizers)
Make all classes Entry, Struct, etc) new-style classes
buffer: do not pass NULL to memcpy() from evbuffer_pullup()
test: do not pass NULL to memcmp() in evbuffer_datacmp() helper
http: fix undefined-shift in EVUTIL_IS*_ helpers
Check error code of evhttp_add_header_internal() in evhttp_parse_query_impl()
cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT
test/regress_testutils: use inet_addr()
remove FindGit.cmake, improve `git describe` command
checkpatch.sh: fix clang-format-diff usage
checkpatch.sh: fix usage
Fix clang-format-diff usage
variable redefinition in win32_dispatch
test: http/autofree_connection cleanup
http: fix EVHTTP_CON_AUTOFREE in case of timeout (and some else)
test: cleanup http/autofree_connection
test: fix http/autofree_connection
evdns: Add additional validation for values of dns options
test: Fix test_simpleclose for Windows platform
abi-check: abi-monitor 1.10 does not support -make -j8 (1.12 supports though)
Add API/ABI checker (using LVC)
Update list of cmake files for autotools dist archive
Pass --quiet to the event_rcpgen.py (autotools already does this)
There is typo in GetAdaptersAddresses windows library. It should be iphlpapi.dll
Support EV_CLOSED on linux for poll(2)
Fix EV_CLOSED detection/reporting (epoll only)
Merge branch 'EV_CLOSED-and-EV_ET-fixes'
bufferevent: allow setting priority on socket and openssl type
cmake: set a default value for LIBEVENT_STATIC_LINK
evutil_time: improve evutil_gettimeofday on Windows
bench: Allow backend method selection
cmake: missing test-closed binary
Merge branch 'event_rpcgen.py-cleanup'
cmake: replace CheckFunctionExists with CheckSymbolExists
LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default
cmake: fix getaddrinfo checking error
cmake: remove CheckFunctionExistsEx
autoconf: fix getaddrinfo checking errors on mingw
test-time: do not use deprecated API
test-time: enable debug mode if EVENT_DEBUG_LOGGING_ALL env set
increase segment refcnt only if evbuffer_add_file_segment() succeeds
evdns: fix a crash when evdns_base with waiting requests is freed
event_base_once: fix potential null pointer threat
test-ratelim: add missing free
Do not use shared global structures on CYGWIN
test: move thread into realtime class even on EVENT__DISABLE_THREAD_SUPPORT
test: fix compilation without thread support (EVENT__DISABLE_THREAD_SUPPORT=ON)
test: fix bufferevent/bufferevent_connect_fail_eventcb* under osx/freebsd
test: fix dst thread in move_pthread_to_realtime_scheduling_class (osx)
test: fix compilation under win32 (rearrange thread_setup() code)
test: use THREAD_* wrappers over pthread* in del_notify
Merge branch 'osx-clock'
cmake: do not print used method (EVENT_SHOW_METHOD) while running tests
cmake: run regress test quietly like autotools (makes CI logs cleaner)
Merge branch 'http-connect'
http: do not assume body for CONNECT
Added uninstall target check to cmakelists
Fix compilation without OPENSSL_API_COMPAT
evutil_time: Implements usleep() using wait funtion on Windows
Initialize variable to 0 replace use memset function in sample/hello-world.c
cmake: set CMAKE_{RUNTIME,LIBRARY,ARCHIVE}_OUTPUT_DIRECTORY they are not defined
cmake: use CMAKE_LIBRARY_OUTPUT_DIRECTORY for the final shared library symlink
test-ratelim: calculate timers bias (for slow CPUs) to avoid false-positive
mailmap: add name/email aliases for yuangongji (name and email)
cmake: test for find_package()
cmake: improve package config file
Link with iphlpapi only on windows
Parse IPv6 scope IDs.
Relax bufferevent_connect_hostname_emfile
autotools: fails build when need but can not find openssl
cmake: eliminate duplicate installation of public headers
append to CMAKE_MODULE_PATH
Do not use sysctl.h on linux (it had been deprecated)
sample/https-client: link crypt32 explicitly when build with mingw-w64
Fix compat with NetBSD >= 10
Avoid transforming base C_FLAGS set deliberately
tinytest: support timeout on Windows
Merge branch 'upstream/pr/899' (evbuffer_freeze testcase enhancements)
evbuffer_add_file: fix freeing of segment in the error path
evutil_time: detect and use _gmtime64_s()/_gmtime64()
http: rename bind_socket_ai() to create_bind_socket_nonblock()
https-client: load certificates from the system cert store on Windows
Fix checking return value of the evdns_base_resolv_conf_parse()
cmake: fix getrandom() detection
arc4random: replace sysctl() with getrandom (on linux)
Upgrade autoconf (after upgrading minimum required to 2.67)
Revert "Warn if forked from the event loop during event_reinit()"
eliminate some C4267 warnings in Windows
autotools: attach doxygen target into all target
cmake: attach doxygen target into all target
Fix memory corruption in EV_CLOSURE_EVENT_FINALIZE with debug enabled
test: prevent duplicate event_enable_debug_mode() for TT_ENABLE_DEBUG_MODE
test: introduce TT_ENABLE_DEBUG_MODE flag
sample/http-server: fix parameter parsing
sample/signal-test: fix use of uninitialized variable
Fix typos in comments (sample/test/event-internal.h)
sample/signal-test: add NULL checks
Change the minimum version of automake to 1.13 and autoconf to 2.67
Add Uninstall.cmake.in into dist archive

$ ./configure
$ make
$ make verify # (optional)
$ sudo make install
The following Libevent specific CMake variables are as follows (the values being the default).
# Type of the library to build (SHARED or STATIC)
# Default is: SHARED for MSVC, otherwise BOTH
EVENT__LIBRARY_TYPE:STRING=DEFAULT
# Installation directory for CMake files
EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent
# Enable running gcov to get a test coverage report (only works with
# GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well.
EVENT__COVERAGE:BOOL=OFF
# Defines if Libevent should build without the benchmark executables
EVENT__DISABLE_BENCHMARK:BOOL=OFF
# Define if Libevent should build without support for a debug mode
EVENT__DISABLE_DEBUG_MODE:BOOL=OFF
# Define if Libevent should not allow replacing the mm functions
EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF
# Define if Libevent should build without support for OpenSSL encryption
EVENT__DISABLE_OPENSSL:BOOL=OFF
# Disable the regress tests
EVENT__DISABLE_REGRESS:BOOL=OFF
# Disable sample files
EVENT__DISABLE_SAMPLES:BOOL=OFF
# If tests should be compiled or not
EVENT__DISABLE_TESTS:BOOL=OFF
# Define if Libevent should not be compiled with thread support
EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF
# Enables verbose debugging
EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
# When cross compiling, forces running a test program that verifies that Kqueue
# works with pipes. Note that this requires you to manually run the test program
# on the the cross compilation target to verify that it works. See CMake
# documentation for try_run for more details
EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
More variables can be found by running cmake -LAH <sourcedir_path>
Install CMake: https://www.cmake.org
$ md build && cd build
$ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
$ start libevent.sln
$ mkdir build && cd build
$ cmake .. # Default to Unix Makefiles.
$ make
$ make verify # (optional)
To build Libevent, type
$ ./configure && make
(If you got Libevent from the git repository, you will first need to run the included “autogen.sh” script in order to generate the configure script.)
You can run the regression tests by running
$ make verify
Install as root via
$ make install
Before reporting any problems, please run the regression tests.
To enable low-level tracing, build the library as:
$ CFLAGS=-DUSE_DEBUG ./configure [...]
Standard configure flags should work. In particular, see:
--disable-shared Only build static libraries.
--prefix Install all files relative to this directory.
The configure script also supports the following flags:
--enable-gcc-warnings Enable extra compiler checking with GCC.
--disable-malloc-replacement
Don't let applications replace our memory
management functions.
--disable-openssl Disable support for OpenSSL encryption.
--disable-thread-support Don't support multithreaded environments.
(Note that autoconf is currently the most mature and supported build environment for Libevent; the CMake instructions here are new and experimental, though they should be solid. We hope that CMake will still be supported in future versions of Libevent, and will try to make sure that happens.)
First of all install https://www.cmake.org.
To build Libevent using Microsoft Visual studio open the “Visual Studio Command prompt” and type:
$ cd <libevent source dir>
$ mkdir build && cd build
$ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
$ start libevent.sln
In the above, the “..” refers to the dir containing the Libevent source code. You can build multiple versions (with different compile time settings) from the same source tree by creating other build directories.
It is highly recommended to build “out of source” when using CMake instead of “in source” like the normal behaviour of autoconf for this reason.
The “NMake Makefiles” CMake generator can be used to build entirely via the command line.
To get a list of settings available for the project you can type:
$ cmake -LH ..
CMake also provides a GUI that lets you specify the source directory and output (binary) directory that the build should be placed in.
For the latest released version of Libevent, see the official website at http://libevent.org/ .
There’s a pretty good work-in-progress manual up at http://www.wangafu.net/~nickm/libevent-book/ .
For the latest development versions of Libevent, access our Git repository via
$ git clone https://github.com/libevent/libevent.git
You can browse the git repository online at:
https://github.com/libevent/libevent
To report bugs, issues, or ask for new features:
Patches: https://github.com/libevent/libevent/pulls
OK, those are not really patches. You fork, modify, and hit the “Create Pull Request” button. You can still submit normal git patches via the mailing list.
Bugs, Features [RFC], and Issues: https://github.com/libevent/libevent/issues
Or you can do it via the mailing list.
There’s also a libevent-users mailing list for talking about Libevent use and development:
http://archives.seul.org/libevent/users/
The following people have helped with suggestions, ideas, code or fixing bugs:
If we have forgotten your name, please contact us.