Log

Author Commit Date CI Message
Azat Khuzhin 5df3037d 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
Azat Khuzhin 1324a03c 2020-07-05T14:27:27 Update ChangeLog
Azat Khuzhin c660a578 2020-07-05T13:55:53 ci/linux: create dist artifact only if dist archive was built Fixes: 512c88ce ("ci/linux: add dist check") (cherry picked from commit e9a6b127696f75097dea01d197735596335865bb)
Azat Khuzhin 1c9cc07b 2020-07-05T13:16:52 Merge branch 'fix-signal-leak' Fixes main/fork under ASAN (LSAN if to be precise) * fix-signal-leak: select: requires reinit (otherwise it leaks signal handlers) poll: requires reinit (otherwise it leaks signal handlers) (cherry picked from commit f6bfa8b3e35432992d9b580617c946dbbfa38bb3)
Azat Khuzhin a03f0f8a 2020-07-05T11:59:32 test: fix leak in dns/getaddrinfo_cancel_stress Some requests may get response (evutil_addrinfo) from gaic_server_cb, in case of cancel_event (10000ms) will not be fast enough. (cherry picked from commit 90bcf2d660b9b43cb8e747421d4938f08f935bd7)
Azat Khuzhin 777cc2b6 2020-07-05T11:45:56 test: fix UB in evbuffer/empty_reference_prepend_buffer UBSAN reports: test/regress_buffer.c:2360:2: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/string.h:140:33: note: nonnull attribute specified here (cherry picked from commit ba19b356bf8a9be2a5bddfa264dee61ffc9573a7)
Azat Khuzhin 82ae28e1 2020-07-05T11:14:18 test: really disable bufferevent_pair_release_lock under ASAN (and fix gcc) (cherry picked from commit 7b9ba3b717af109abdf3fb5fc99c288dc8024ef5)
Azat Khuzhin ff67e8c2 2020-07-05T11:08:05 test-closed: fix leak (cherry picked from commit e2f938c04f9a72f6fd6ca9b7a8219ca9cb409d69)
Azat Khuzhin 733201a4 2020-07-05T11:21:04 ci: set build type to debug with sanitizers (cherry picked from commit 9da1743b41a6a1378f52e4127e162dcb44de87d7)
Azat Khuzhin 1acaa9a2 2020-07-03T01:03:51 test-export: adjust libevent version
yuangongji 813cc739 2020-01-20T21:17:27 cmake: set rpath for libraries on linux (cherry picked from commit ce8be2385b5fee16859a630fca0c98ad290c8e21)
yuangongji 4e8e4613 2020-01-20T21:15:26 test-export: compatible with all versions of visual studio (cherry picked from commit 9adc9f149657212f65f05750b4f94ea3b1166aec)
Azat Khuzhin 2cfa7ff7 2020-06-28T22:31:41 Bump version to 2.1.12-stable (w/o ABI breakage)
Azat Khuzhin b2abc63a 2020-06-28T22:14:58 ci: run ABI for release-*-pull branches too
Azat Khuzhin afecaebf 2020-06-28T22:13:50 Purge travis-ci config
Azat Khuzhin 30bb66d7 2020-06-28T22:13:44 Purge appveyor config
Azat Khuzhin 65539db0 2020-06-28T22:11:34 Bump ChangeLog for 2.1.12
Azat Khuzhin 742bb5f5 2020-06-28T21:54:36 Update AUTHORS for 2.1.12
Azat Khuzhin be3acd7c 2020-06-28T21:39:33 Backport github actions to 2.1 With some modifications: - drop coverage - drop doxygen - do not deploy ABI check, only artifacts
Azat Khuzhin 4d3ff29c 2020-06-26T10:35:44 test: add getaddrinfo(AI_ADDRCONFIG) test (off by default) (cherry picked from commit 0ac3cfc0b70edc2cfb429712d6aaf1b3a63d2d1a)
fanquake cb4b8738 2020-06-26T14:35:41 build: remove duplicate -Wredundant-decls (cherry picked from commit ff4ec5fdb02d22c131e63b5a98e453da975a3cb1)
Azat Khuzhin ccd67243 2020-06-25T21:56:31 test: fix memory leaks for https (add BEV_OPT_CLOSE_ON_FREE) - http/https_filter_basic - http/https_filter_chunk_out (cherry picked from commit ec94a6bb3f9d950101d07b2a2e092b675d5aa3f0)
Azat Khuzhin 3c2c856d 2020-06-25T21:40:40 test: "fix" (with a quirk) leak in ssl/bufferevent_wm (w/o defer callbacks) (cherry picked from commit cdbb2373f4d13f7a5eb69daaf0a172779ccc0040)
Azat Khuzhin 66341e84 2020-06-25T21:25:51 test: disable bufferevent/bufferevent_pair_release_lock under ASAN (too tricky) And cannot be suppressed with suppressions due to setup routines. (cherry picked from commit 3b13a64789b3942608f04c31455668bebe224a40)
Azat Khuzhin 19a68bd1 2020-06-25T21:01:53 test: detect test failures if atexit handler calls _exit(!0) (sanitizers) tinytest uses another way of detecting test failures, it uses pipe between child and parent, and if the test function in child returns OK it writes OK flag into pipe, and reads it in parent. However sanitizers uses atexit handlers to detect leaks, and this will not detect failures in case of exit() will be called from the atexit handlers, fix this by checking status after waitpid(). (cherry picked from commit 6754740f15e8200a12605a2e707fc6d3e6754d6a)
Enji Cooper 48e04887 2020-06-25T08:08:10 Make all classes Entry, Struct, etc) new-style classes This allows the object methods to be properly inherited and called via `super(..)`, addressing breakage with python 2.x, introduced in cfcc093606e747a5d250787012bac0b149c60d6d. Fixes #1042. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com> (cherry picked from commit 46c9ead0ebbbb23c8f719c11c473dfec37c84fda)
Azat Khuzhin 5b063049 2020-06-25T10:15:01 buffer: do not pass NULL to memcpy() from evbuffer_pullup() UBSAN reports: evbuffer/remove_buffer_with_empty3: ../buffer.c:1443:3: runtime error: null pointer passed as argument 2, which is declared to never be null #0 0x7ffff6cd0410 in evbuffer_pullup ../buffer.c:1443 #1 0x5555556d68b9 in test_evbuffer_remove_buffer_with_empty3 ../test/regress_buffer.c:408 #2 0x5555557b95ee in testcase_run_bare_ ../test/tinytest.c:173 #3 0x5555557ba048 in testcase_run_one ../test/tinytest.c:333 #4 0x5555557bc0f8 in tinytest_main ../test/tinytest.c:527 #5 0x555555787702 in main ../test/regress_main.c:528 #6 0x7ffff606c001 in __libc_start_main (/usr/lib/libc.so.6+0x27001) #7 0x55555569436d in _start (/src/le/libevent/.cmake-debug/bin/regress+0x14036d) (cherry picked from commit a0c642ac04487d8cda809bd6e233b0fbd043806d)
Azat Khuzhin a91abd0e 2020-06-25T09:59:35 test: do not pass NULL to memcmp() in evbuffer_datacmp() helper Fixes: runtime error: null pointer passed as argument 2, which is declared to never be null (cherry picked from commit 6f152befb4523fd2e57c1a937e590f8ff87b7f15)
Azat Khuzhin 6b8d02a7 2020-06-25T08:45:34 http: fix undefined-shift in EVUTIL_IS*_ helpers evutil.c:2559:1: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' #0 0x4f2be0 in EVUTIL_ISXDIGIT_ libevent/evutil.c:2559:1 #1 0x4bd689 in regname_ok libevent/http.c:4838:7 #2 0x4bc16b in parse_authority libevent/http.c:4958:9 #3 0x4bb8b5 in evhttp_uri_parse_with_flags libevent/http.c:5103:7 #4 0x4bb762 in evhttp_uri_parse libevent/http.c:5050:9 #5 0x4b8f41 in evhttp_parse_query_impl libevent/http.c:3505:9 #6 0x4b8ed7 in evhttp_parse_query libevent/http.c:3569:9 Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23291 Report: https://oss-fuzz.com/testcase-detail/5670743106125824 (cherry picked from commit 37dbb3508099d49748453166c1ee9ef1603fcf3a)
Azat Khuzhin 97e28f09 2020-06-25T09:08:31 Check error code of evhttp_add_header_internal() in evhttp_parse_query_impl() (cherry picked from commit 4528d8e98781be794cbce13394f8442dd466684b)
Paul Osborne a62ec765 2020-06-18T15:47:14 cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT In some CMake integrations, portions of the toolchain may end up defining CMAKE_USE_PTHREADS_INIT even when EVENT__DISABLE_THREAD_SUPPORT is set for libevent. Modify the build to not rely on this side effect of find_package(Threads, ...) [which could be done elsewhere] but instead to use EVENT__HAVE_PTHREADS which is defined only on the desired codepath. Without this change, affected builds fail as a result of event_pthreads source files being built but with build defines which cause the build to fail. Signed-off-by: Paul Osborne <paul.osborne@smartthings.com> (cherry picked from commit 26d5ff457c9e6cf9b84ec9d8fb83d87caf083d96)
Azat Khuzhin fb5fa12a 2020-06-02T10:01:31 test/regress_testutils: use inet_addr() (cherry picked from commit 8b5a4d61f6eb7180c0800f38549c20776c6d1cd9)
yuangongji 9a94cd9b 2020-05-27T15:39:49 remove FindGit.cmake, improve `git describe` command (cherry picked from commit a9aa2b3607c8adf9846aa6a01e070130f4d6dcb9)
Azat Khuzhin da11fcc8 2020-05-27T20:33:25 checkpatch.sh: fix clang-format-diff usage - strip 1 path component - it does not accept file name anymore, only stdin Refs: #1029 (cherry picked from commit 89d313b14dffed7271f41f4e2d68ccfe6b6475ed)
Azat Khuzhin 9c2b49c7 2020-05-27T20:31:29 checkpatch.sh: fix usage Refs: #1029 (cherry picked from commit 8209a623addf6688243eeb6ebb9ece6a20206437)
Wataru Ashihara b0e9577f 2020-05-28T00:03:03 Fix clang-format-diff usage "--style" is invalid: $ ./checkpatch.sh -r HEAD usage: clang-format-diff [-h] [-i] [-p NUM] [-regex PATTERN] [-iregex PATTERN] [-sort-includes] [-v] [-style STYLE] [-binary BINARY] clang-format-diff: error: unrecognized arguments: --style={ Language:... } (cherry picked from commit 866fbb54570c74f215208b237ddce48fb79d2cd6)
mohuang 0970e25c 2020-05-25T10:33:24 variable redefinition in win32_dispatch (cherry picked from commit f10aaea37433b60ed3e0b7adcc7b1764c8b0b518)
Azat Khuzhin 65a002a8 2020-05-25T02:06:32 test: http/autofree_connection cleanup (cherry picked from commit e8c8951029a0a084dd73b27e6dc3b637a7c914db)
Azat Khuzhin 1be25938 2020-05-19T11:45:43 http: fix EVHTTP_CON_AUTOFREE in case of timeout (and some else) Refs: #182 (cherry picked from commit eee26deed38fc7a6b6780b54628b007a2810efcd)
Azat Khuzhin 8dc6468e 2020-05-19T01:05:50 test: cleanup http/autofree_connection (cherry picked from commit 70f69194eb3b19b5e41b52b17a820e1e91512560)
Azat Khuzhin ab130875 2020-05-19T00:52:01 test: fix http/autofree_connection Refs: #182 (cherry picked from commit 1cc94feab81e7387041edc32be9843f66847072d)
ayuseleznev c2972453 2020-05-18T14:10:28 evdns: Add additional validation for values of dns options (cherry picked from commit 8fe35c7614802fa13d144cceea9b079d5a131891)
Nick Grifka 141e37c8 2020-05-07T21:14:13 test: Fix test_simpleclose for Windows platform Replace close with evutil_closesocket Caught with PR #1006 (cherry picked from commit 06a11929511bebaaf40c52aaf91de397b1782ba2)
Azat Khuzhin 2af1f6cc 2020-05-06T02:40:49 abi-check: abi-monitor 1.10 does not support -make -j8 (1.12 supports though) An error for 1.10 on ci: https://github.com/azat/libevent/runs/647860649?check_suite_focus=true#step:4:219 (cherry picked from commit 448a478a98ae7797c1d1a5f1463c02f1b09982f2)
yuangongji 709210d4 2019-09-04T23:09:13 Add API/ABI checker (using LVC) v2 (by azat): - drop package installations - use local .abi-check over $HOME/abi-check for build dir - drop regex check, simply use default values (too complex otherwise) - use sub-shell to avoid cd back - add missing quotes - make the style uniq across the whole file (no tabs for indent, copy-paste?) - drop `set -x`, use `bash -x abi-check.sh` over - drop EVENT_ABI_CHECK - use /usr/bin/env bash as shebang - use `find | xargs` over `cp $(grep -v)` - adjust markdown syntax in abi-check/README.md - adjust link to the publicly available documentation v3 (by azat): - docker image - git check-ignore - make -j8 - allow to change defaults Refs: #887 (cherry picked from commit 735c891e71dc7de737dc09cdef26683eea394e66)
Azat Khuzhin 2016f017 2020-05-05T16:24:59 Update list of cmake files for autotools dist archive Fixes: #976 (cherry picked from commit f3bc532735c4ac91c5be31ed5f0ca58241a0e983)
Azat Khuzhin 9ea60ab2 2020-05-05T14:20:09 Pass --quiet to the event_rcpgen.py (autotools already does this) (cherry picked from commit 7a465268b29c57958e55dceda77ad8322e247454)
Aleksandr-Melnikov 891adda9 2020-05-05T10:31:09 There is typo in GetAdaptersAddresses windows library. It should be iphlpapi.dll (cherry picked from commit 61fc2bf2e9719eb7ca9c56b6e186df2f79f05de7)
Azat Khuzhin 2530e7c6 2020-05-05T01:13:49 Support EV_CLOSED on linux for poll(2) Refs: #984 (cherry picked from commit 4c13afaeec2d35df2580dfbc49391d0524101248)
Azat Khuzhin 1df324d4 2020-05-05T00:21:18 Fix EV_CLOSED detection/reporting (epoll only) - EV_CLOSED is EPOLLRDHUP in epoll - EPOLLRDHUP reported w/o EPOLLHUP if the socket closed with shutdown(SHUT_WR) - EPOLLRDHUP reported w/ EPOLLHUP if the socket closed with close() so in this case epoll backend will detect this event as error (EV_READ|EV_WRITE), since the epoll_ctl() will return EPOLLRDHUP with EPOLLHUP set, but this is not correct, let's fix this. Fixes: #984 (cherry picked from commit 972b456bf60e9a2f550ec45a14921c06e252c793)
Azat Khuzhin db2efdf5 2020-05-05T00:05:49 Merge branch 'EV_CLOSED-and-EV_ET-fixes' * EV_CLOSED-and-EV_ET-fixes: Avoid triggering wrong events with EV_ET set epoll: handle EV_ET for EV_CLOSED too test: cover EV_CLOSED with lots of possible scenarious test: rename simpleclose to simpleclose_rw (since it works via write/read) (cherry picked from commit c10cde4c617979e951352775a9685a47bf9c6acd)
Nicolas J. Bouliane 4dd3acdd 2020-05-03T00:32:10 bufferevent: allow setting priority on socket and openssl type (cherry picked from commit bdc5200acdf0a004ddc805b87bf09439fe2ebe7f)
yuangongji a6974d11 2020-05-01T09:51:29 cmake: set a default value for LIBEVENT_STATIC_LINK (cherry picked from commit 86eafc03433cb5719e5b75ff99ffab8633433a17)
Nick Grifka a8219143 2020-04-27T15:02:25 evutil_time: improve evutil_gettimeofday on Windows If present, use GetSystemTimePreciseAsFileTime instead of GetSystemTimeAsFileTime. Available since Windows 8. (cherry picked from commit f0b3160f8ce7fbd411493dcd023f562f4f9d17ee)
Nick Grifka 1fce771d 2020-04-16T12:08:02 bench: Allow backend method selection -l list available methods -m <name> use method (cherry picked from commit 5caffa7a5b3ce67e074e2ee99fc553c1cac0712c)
Azat Khuzhin 9ed49f2d 2020-04-08T00:29:40 cmake: missing test-closed binary (cherry picked from commit 57862901095a97306e74b2944d5808051f813ed5)
Azat Khuzhin f0ded5f3 2020-03-28T16:02:39 Merge branch 'event_rpcgen.py-cleanup' * event_rpcgen.py-cleanup: event_rpcgen.py: fix arguments-differ event_rpcgen.py: fix attribute-defined-outside-init event_rpcgen: suppress some warnings to make pylint clean Don't accumulate arguments in `Entry.GetTranslation` Fix improper string concatenations in lists Fix warnings regarding unused variables Don't override the `type` built-in Call `super` to call methods from the parent class Address `no-self-use` issues reported by pylint Run the code through the black formatter Reformat strings to template Add `argparse` support Precompile regular expressions Use bools instead of ints values where possible Rename all global variables to match the PEP8 spec Handle file pointers with context suite patterns Iterate over `tokens` with a for instead of while Fix indentation for `RpcGenError` Don't override `file` built-in Resolve variable name issues per PEP8 Sort imports per PEP8 (cherry picked from commit dd02ad9544ec857412e8a5a0462ddcb29e8045f6)
yuangongji 13af9d26 2020-03-20T17:49:37 cmake: replace CheckFunctionExists with CheckSymbolExists Checking functions with `CheckFunctionExists` may get wrong results, we should replace it with `CheckSymbolExists`, which is recommended by the cmake official documentation. Before using `CheckSymbolExists`, we use `CheckIncludeFiles` to check header files and save the available header files in a variable that guarantees `CheckSymbolExists` and `CheckTypeSize` to work correctly. This approach is modeled after the cmake scripts of `curl`. The following functions or files were not found before modification, they can now be found: - msys2 + mingw-8.1.0 on Windows10 or mingw-7.3.0 on Ubuntu-18.04 timerclear timercmp timerisset - windows10 getaddrinfo getnameinfo getprotobynumber getservbyname putenv strtoll timerclear timercmp timerisset - ubuntu-18.04 sys/sysctl.h timeradd timerclear timercmp timerisset - MacOS 10.13 sys/random.h timeradd timerclear timercmp timerisset (cherry picked from commit 41d1d75a84e03219ec037b0f7982a67fb031eae7)
Mario Emmenlauer 640f9cf6 2020-03-03T19:02:24 LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default The current cmake/LibeventConfig.cmake.in has a few problems and I'm not sure how cleanly developed it is. It seems rater complex for the little things I would assume it needs to do. I found two problems that are fixed in this PR: - If the downstream user does not explicitly set LIBEVENT_STATIC_LINK before calling find_package(libevent) then they will not be able to detect the static library, even if its the only one that exists. Since this may be rather strict, I've changed the behavior so that LIBEVENT_STATIC_LINK can be set to ON or OFF, but if unset, it defaults to whatever configuration libevent was built as. - The other problem is a bug. The package configuration needs to unset CMAKE_FIND_LIBRARY_SUFFIXES after use, otherwise all packages that are detected after libevent will be "infected" by this setting. This was a significant problem for us, and is very hard to detect in downstream project, because the order of dependencies will lead to different search results. (cherry picked from commit 1675a55620e6f0bbba5776f2df72cd48920421c2)
yuangongji dea51c2e 2020-03-16T20:11:06 cmake: fix getaddrinfo checking error Using `CheckFunctionExists` on Windows to check `getaddrinfo` will get `not found`, but it actually exists. Using `CheckSymbolExists` with headers will get correct results. Other functions such as `getnameinfo`,`inet_ntop`,etc. have the same issue. (cherry picked from commit 503ba1d36571e3cb01826d15dc462b7d8b5094de)
yuangongji 88384865 2020-03-16T18:57:54 cmake: remove CheckFunctionExistsEx `CheckFunctionExistsEx` is copied from the cmake modules before 3.1.2, which is the minimum required version of libevent. The internal module `CheckFunctionExists`of cmake can completely replace it. (cherry picked from commit 61c5c19bfdabd2f16407a3ed615060c9d0502e82)
Azat Khuzhin 29e2c7f2 2020-03-01T14:54:36 test-time: enable debug mode if EVENT_DEBUG_LOGGING_ALL env set (cherry picked from commit a11edbfa369f7a99886359b3f4baa69686dc275f)
yuangongji 30662a3c 2020-02-29T17:47:47 increase segment refcnt only if evbuffer_add_file_segment() succeeds (cherry picked from commit 114b3836755f1e526e658b248464465136bd87b8)
ayuseleznev 6f8e0e97 2020-02-27T16:59:45 evdns: fix a crash when evdns_base with waiting requests is freed Fix undefined behaviour and application crash that might take place in some rare cases after calling evdns_base_free when there are requests in the waiting queue. Current cleanup procedure in evdns_base_free_and_unlock function includes 2 steps: 1. Finish all inflight requests. 2. Finish all waiting requests. During the first step we iterate over each list in req_heads structure and finish all requests in these lists. With current logic finishing an inflight request (function request_finished) removes it from the inflight requests container and forces a wating connection to be sent (by calling evdns_requests_pump_waiting_queue). When these new requests are sent it is possible that they will be inserted to the list in req_heads that we've already cleaned. So in some cases container of the inflight requests is not empty after this procedure and some requests are not finished and deleted. When timeouts for these requests expire evdns_request_timeout_callback is called but corresponding evdns_base has been already deleted which causes undefined behaviour and possible applicaton crash. It is interesting to note that in old versions of libevent such situation was not possible. This bug was introduced by the commit 14f84bbdc77d90b1d936076661443cdbf516c593. Before this commit nameservers were deleted before finishing the requests. Therefore it was not possible that requests from the waiting queue be sent while we finish the inflight requests. (cherry picked from commit 4da9f87ccbe71edb3b3aaf74b8b64d7e9c41dcaf)
chenguolong 2e9ceb16 2020-02-04T16:05:02 event_base_once: fix potential null pointer threat supposing if base is null, EVBASE_ACQUIRE_LOCK and EVBASE_RELEASE_LOCK would get a coredump, so we add a guard for protection. Signed-off-by: chenguolong <cgl.chenguolong@huawei.com> (cherry picked from commit 968bbd5c918568eb95b493af05c464ddfc36671b)
yuangongji 9e993c3c 2020-02-11T14:33:15 test-ratelim: add missing free (cherry picked from commit 5fbe6313ae7e81cde3e056b29171a6346c54aa0b)
Azat Khuzhin 8a9b5655 2020-01-21T20:10:15 Do not use shared global structures on CYGWIN Fixes: #950 (cherry picked from commit 2c473056abdf710b6c476b7b19777d5313e71d8a)
yuangongji b9bf7fa7 2020-03-14T11:13:38 autoconf: fix getaddrinfo checking errors on mingw `AC_CHECK_FUNCS` can not properly check `getaddrinfo` because this function requires some special headers on mingw. Using `AC_CHECK_DECL` can effectively solve this issue. Same for - getnameinfo - getprotobynumber - getservbyname - inet_ntop - inet_pton (cherry picked from commit 6d54be2cc078351b4ce1e469bedc4a976f4e3636)
Azat Khuzhin e41a1969 2020-03-01T15:47:40 test-time: do not use deprecated API - event_init() -> event_base_new() - event_set() -> event_new() - check return value of event_base_dispatch() - use EXIT_SUCCESS/EXIT_FAILURE (cherry picked from commit 4e5a41ca0f668da1a18832e5cb02b4afeae074ff)
Azat Khuzhin 0ef87f5f 2020-01-14T21:45:01 test: move thread into realtime class even on EVENT__DISABLE_THREAD_SUPPORT (cherry picked from commit ca2b72c546d80dfb4fa255b20ef4a829ed102a70)
Azat Khuzhin 5a400c1f 2020-01-14T10:20:12 test: fix compilation without thread support (EVENT__DISABLE_THREAD_SUPPORT=ON) (cherry picked from commit d0adbc05654eca27384b6496cfd8a22ed4dfb4fb)
Azat Khuzhin 1121ebed 2020-01-14T02:14:16 test: fix bufferevent/bufferevent_connect_fail_eventcb* under osx/freebsd For OSX the socket should be closed, otherwise the "connection refused" will not be triggered. And freebsd can return error from the connect(). (cherry picked from commit 30fe125041ab38045487bd3af60d2f564dffc81c)
Azat Khuzhin d5d18a56 2020-01-14T00:38:06 test: fix dst thread in move_pthread_to_realtime_scheduling_class (osx) Fixes the following tests on osx: - del_wait - no_events Refs: #940 (cherry picked from commit 10504fcab927e8b226ef2e988b1b3f175c3e9f71)
Azat Khuzhin 265cbe10 2020-01-14T00:27:21 test: fix compilation under win32 (rearrange thread_setup() code) (cherry picked from commit 34d51e1bc9c650c4d012fe3024f7777c819ba969)
Azat Khuzhin 8991346d 2020-01-14T00:41:48 test: use THREAD_* wrappers over pthread* in del_notify (cherry picked from commit 391003e9b78acff0ee5096c592fc4b601a02648d)
Azat Khuzhin e85afbe3 2020-01-13T23:36:40 Merge branch 'osx-clock' Moves the thread into real-time scheduling class, as recommended in [1], it fixes the separate test provided by @ygj6 [2] everywhere (github actions, travis-ci, appveyor) under osx. [1]: https://developer.apple.com/library/archive/technotes/tn2169/_index.html [2]: https://github.com/azat-archive/osx-timers/commit/dde1a6e4d04506d0e0fb193ebb9f49ae25873be6 Although even after this changes the following time-related tests failed on travis-ci: - no_events - del_wait But anyway I guess #940 can be closed, since this fixes the issue in common. * osx-clock: test: Use THREAD_* wrappers in del_notify/del_wait test: move threads created with THREAD_START() to realtime scheduling class too test: put thread into real time scheduling class on osx for better latencies Closes: #940 (cherry picked from commit a6f81aa45455c8afb69980f7026a0e706f4f9387)
Azat Khuzhin 677378ea 2020-01-13T22:24:54 cmake: do not print used method (EVENT_SHOW_METHOD) while running tests autotools don't, plus this will make CI logs cleaner (cherry picked from commit f8a6f12712e775720b36e0c4375a5fd6870bb737)
Azat Khuzhin 70ac2144 2020-01-13T22:24:54 cmake: run regress test quietly like autotools (makes CI logs cleaner) (cherry picked from commit fa33819e3b0f706a0c8b6bcb6eb2c6646609542a)
Azat Khuzhin e2424229 2020-01-12T15:34:51 Merge branch 'http-connect' After this patchset http-connect works with pproxy [1]: $ pproxy -l http://:8000/ -vvv & $ http-connect //127.1:8000 http://kernel.org:80/ [1]: https://pypi.org/project/pproxy/ * http-connect: http-connect: do not check connection on GET cb http-connect: set Host header (for CONNECT and GET) (like curl) http-connect: cleanup and helpers http: do not close connection for CONNECT http: do not assume body for CONNECT Fixes: #946 (cherry picked from commit 462f2e97660cc2b6af563ab631050a83c3e0935b)
Azat Khuzhin 1b42270b 2020-01-12T13:43:18 http: do not assume body for CONNECT (cherry picked from commit 998e68340e5cd289a16f340cc5c625e984e1f762)
Dimo Markov 3f1fb1f9 2020-01-08T20:37:16 Added uninstall target check to cmakelists (cherry picked from commit f0e79bafd8823aedf535e9b344d4cf9a4f9747e5)
Azat Khuzhin 921bdcdd 2020-01-05T19:02:22 Fix compilation without OPENSSL_API_COMPAT Use the following for openssl 1.1+: - X509_getm_notBefore over X509_get_notBefore - X509_getm_notAfter over X509_get_notAfter - use OPENSSL_VERSION_NUMBER over SSLeay() - add missing headers Refs: openssl/openssl@0b7347effee5 (cherry picked from commit 08981f8d752ad23e21887b42944783e843b2e281)
yuangongji d42240d1 2019-12-27T17:53:28 evutil_time: Implements usleep() using wait funtion on Windows (cherry picked from commit 6412f34f242e9b5b87f0378715baf97ba0bf1a8c)
yangyongsheng d9da4126 2019-12-29T20:52:17 Initialize variable to 0 replace use memset function in sample/hello-world.c (cherry picked from commit 1edb6f6188d5dd2155c6e8ad997eaca11157e95f)
Azat Khuzhin 2db851a9 2019-11-30T15:48:36 cmake: set CMAKE_{RUNTIME,LIBRARY,ARCHIVE}_OUTPUT_DIRECTORY they are not defined This will allow overriding them in parent cmake rules, i.e. if libevent is used via add_subdirectory(). Closes: #931 (cherry picked from commit 8f13c170cf6e9a02dec410b967884ec5e08947ab)
Azat Khuzhin 47eb8c12 2019-11-30T15:53:52 cmake: use CMAKE_LIBRARY_OUTPUT_DIRECTORY for the final shared library symlink Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools") (cherry picked from commit b9f442e2d7af8b01cd34f75f2f404763b76d42dc)
Azat Khuzhin 8ad26d0b 2019-11-17T18:13:51 test-ratelim: calculate timers bias (for slow CPUs) to avoid false-positive This can be/should be done for regression tests too. Refs: https://ci.appveyor.com/project/libevent/libevent/builds/28916689/job/kg621aa194a0qbym Refs: https://github.com/libevent/libevent/pull/917#issuecomment-553811834 v2: EVENT_BASE_FLAG_PRECISE_TIMER (cherry picked from commit 8a34869984c470fb243fc9587c469b316add2f7e)
Azat Khuzhin ffc528e9 2019-11-17T15:41:22 mailmap: add name/email aliases for yuangongji (name and email) Before: $ git log --format='%aE %aN' --author=yuangongji | sort | uniq -c 30 82787816@qq.com yuangongji 1 82787816@qq.com yuangongji (A) After: $ git log --format='%aE %aN' --author=yuangongji | sort | uniq -c 34 yuangongji@foxmail.com yuangongji (cherry picked from commit 026590f908f8ef8602d54bd680c8bef9f4552d55)
yuangongji baec84f2 2019-11-14T18:28:31 cmake: test for find_package() (cherry picked from commit cd15112b620feadafe8fd3531043870a5c19a4a6)
yuangongji 1c047618 2019-11-07T18:26:47 cmake: improve package config file (cherry picked from commit dc4be869d5009f38e0ef02ff07dd799f9c2fef2f)
Azat Khuzhin 976f7d34 2019-11-06T21:41:38 Link with iphlpapi only on windows Fixes: 9fecb59a ("Parse IPv6 scope IDs.") Refs: #923 (cherry picked from commit 1495f8b67a6061ac5c8dcbc42dd71398d6355c9a)
Philip Homburg f602211f 2019-10-29T15:48:53 Parse IPv6 scope IDs. (cherry picked from commit 9fecb59a94ef246088d7f3e0365c2fe80d0df2f4)
Azat Khuzhin ca92a755 2019-10-31T09:18:58 Relax bufferevent_connect_hostname_emfile Do not do any assumptions on the error for the EMFILE from getaddrinfo(), expect just any error. Fixes: #924 (cherry picked from commit 4436287d1247fb2e9c80560debf852a94657e485)
yuangongji 93174bb5 2019-10-26T22:31:18 autotools: fails build when need but can not find openssl (cherry picked from commit 53b3be4ee9e814a22876675c0ee004f0ebfb8535)
yuangongji a9d1121d 2019-10-25T21:54:13 cmake: eliminate duplicate installation of public headers (cherry picked from commit 5fe83d7433022e29a401753f64ec78faaf25e0a7)
Michael Davidsaver 87c6f735 2019-10-21T10:36:49 append to CMAKE_MODULE_PATH Don't override any -DCMAKE_MODULE_PATH= passed from CLI to eg. test custom Platform/ support. (cherry picked from commit 84affc1837a727640f46eff2723c1364d2cd1695)
Azat Khuzhin d2871a37 2019-10-16T01:11:51 Do not use sysctl.h on linux (it had been deprecated) It had been deprecated for a long time (AFAIK), but since glibc-2.29.9000-309-g744e829637 it produces a #warning (cherry picked from commit b9b9f19058dc04b7ad4d079a38f6b86c0e7b1072)
yuangongji e35e02e6 2019-10-08T21:38:58 sample/https-client: link crypt32 explicitly when build with mingw-w64 (cherry picked from commit 78b5bca6d83a70a0b9dfc438898d5c1908cc3c2a)
Kamil Rytarowski 5febb4e1 2019-10-04T01:26:47 Fix compat with NetBSD >= 10 kevent::udata was switched from intptr_t to void*. Handle both cases with the GCC extension typeof(). (cherry picked from commit 72e6eff0251bffec72e0b8b2cedf72f173c8b9e9)
William A Rowe Jr 50b9be00 2019-10-03T11:40:52 Avoid transforming base C_FLAGS set deliberately The CMAKE_C_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE, CMAKE_C_FLAGS_MINSIZEREL and CMAKE_C_FLAGS_RELWITHDEBINFO options are correctly and deliberately toggled to use the libcmt (/MT) flag options in place of the usual msvcrt (/MD) options, but this isn't necessarily desired by the user. The default choice can be overriden with the EVENT__MSVC_STATIC_RUNTIME cmake option. However, the /MD flag that is the choice of CMake only enters into play for the four types of builds above. If the user introduces another CMAKE_BUILD_TYPE, the base CMAKE_C_FLAGS must not be manipulated, as that value (and the CMAKE_C_FLAGS_{custom} value) have been explicitly chosen by the user/developer deploying this library, and the mismatch between these flags in different dependencies results in link errors. The CMake build schema itself doesn't place an /MD flag in CMAKE_BUILD_TYPE so any /M compile option in that variable needs to be retained. Signed-off-by: William Rowe <wrowe@pivotal.io> Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io> (cherry picked from commit af4b07a55cc0ff0298cbd26c87b3f6a08f84c394)