Log

Author Commit Date CI Message
Michael Davidsaver 84affc18 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.
Azat Khuzhin b9b9f190 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
yuangongji dda8968c 2019-10-12T18:45:52 evutil: implement socketpair with unix domain socket on Win10
Azat Khuzhin 11bdd41c 2019-10-14T23:22:55 travis-ci: add OPENSSL_1_1=yes for the openssl 1.1 to distinguish it in list
Azat Khuzhin fb95772a 2019-10-14T23:20:23 travis-ci: use matrix.include over env.matrix/matrix.exclude for coveralls
Azat Khuzhin f2bdd6ee 2019-10-14T22:32:01 travis-ci: build with clang only basic configurations I tried to exclude clang instead (for PRs), but matrix.exclude cannot have conditions (i..e matrix.exclude.if).
Azat Khuzhin c1c8ae71 2019-10-14T12:20:45 Use matrix.include.if over matrix.exclude.if for doxygen And use if.repo over if.slug Fixes: aeb014cc ("Do not try to deploy documentaion for PR")
Azat Khuzhin aeb014cc 2019-10-14T02:49:55 Do not try to deploy documentaion for PR Anyway access to security variables is forbidden for PRs. v2: use travis-ci conditions, to avoid running addons
Azat Khuzhin b32a6443 2019-10-09T00:16:50 Fix all all yamllint warnings in travis/appveyor rules
Azat Khuzhin c88c578a 2019-10-09T00:13:01 appveyor: do not allow any failures Yes we still have flacky tests, but anyway two main configuration can fail too (and they do fail from time to time) so let's not allow any failures and see how this will go. (Credits to @ygj6 via #910)
yuangongji 72d140c2 2019-10-08T22:01:01 appveyor: fix build script for compiling using mingw-w64
yuangongji 78b5bca6 2019-10-08T21:38:58 sample/https-client: link crypt32 explicitly when build with mingw-w64
Azat Khuzhin c328999e 2019-10-07T22:10:14 Merge remote-tracking branch 'upstream/pr/908' * upstream/pr/908: Avoid transforming base C_FLAGS set deliberately
Kamil Rytarowski 72e6eff0 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().
William A Rowe Jr af4b07a5 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>
yuangongji 8d5c5650 2019-09-26T21:47:51 tinytest: support timeout on Windows
Azat Khuzhin a977d696 2019-09-22T18:44:55 Merge branch 'upstream/pr/899' (evbuffer_freeze testcase enhancements) * upstream/pr/899: improve the description of parameter to evbuffer_read() regress_buffer: improve testcase for evbuffer_freeze()
yuangongji 5aae74d7 2019-09-21T23:37:38 improve the description of parameter to evbuffer_read()
yuangongji 6769f692 2019-09-19T22:19:58 regress_buffer: improve testcase for evbuffer_freeze()
Azat Khuzhin 4727150a 2019-09-21T23:30:48 evbuffer_add_file: fix freeing of segment in the error path if evbuffer_add_file_segment() fails it returns -1, so we should call evbuffer_file_segment_free() only on error, and this -1 not 0. Fixes: 6a81b1f5 ("Avoid double-free on error in evbuffer_add_file. Found by coverity.") Backport-to: 2.1
yuangongji 148d12ad 2019-09-19T15:24:51 evutil_time: detect and use _gmtime64_s()/_gmtime64()
yuangongji 0cd536b0 2019-09-18T23:12:59 http: rename bind_socket_ai() to create_bind_socket_nonblock()
yuangongji 1c78451f 2019-09-16T23:24:32 http: make sure the other fields in ext_method are not changed by the callback
yuangongji 572a5651 2019-09-15T21:45:26 https-client: load certificates from the system cert store on Windows
Azat Khuzhin 095c8ae1 2019-09-08T22:30:54 Build doxygen documentation via cmake (to fill variables) Refs: #782
Azat Khuzhin 05467445 2019-09-08T11:47:04 Deploy documentation to libevent-doc.github.io Based-on: https://github.com/ygj6/libevent/commit/4a86dcb4df0f9dc69f7722a1ba7567ef3b8447c8.patch (by @ygj6)
Azat Khuzhin c3f35345 2019-09-05T23:31:19 Fix checking return value of the evdns_base_resolv_conf_parse() Reported-by: Maxim Gorbachyov <maxim.gorbachyov@gmail.com>
Azat Khuzhin 194a5d82 2019-09-04T00:46:01 cmake: fix getrandom() detection Fixes: 86f55b04 ("arc4random: replace sysctl() with getrandom (on linux)")
Azat Khuzhin 86f55b04 2019-09-03T00:34:35 arc4random: replace sysctl() with getrandom (on linux) Since sysctl() is deprecated for a long-long time, according to sysctl(2): Since Linux 2.6.24, uses of this system call result in warnings in the kernel log. Fixes: #890 Suggested-by: Pierce Lopez
yuangongji 13b8fc39 2019-08-30T10:21:07 Upgrade autoconf (after upgrading minimum required to 2.67) - AC_PROG_SED - AC_USE_SYSTEM_EXTENSIONS - AC_TRY_COMPILE -> AC_COMPILE_IFELSE - AC_TRY_RUN -> AC_RUN_IFELSE ... Also use: - AC_CONFIG_AUX_DIR Refs: #870 Fixes: 3f09e923 ("Change the minimum version of automake to 1.13 and autoconf to 2.67")
Azat Khuzhin ddacaef5 2019-08-29T22:57:44 Revert "Warn if forked from the event loop during event_reinit()" Thinking about this more and realizing that this was a mistake, so should be reverted. In a nut shell I guess most of the apps calls event_reinit() from the loop (see [1] for example), and this should be totally fine (the bit with the signals [2] handled in event_reinit() gracefully) [1]: https://archives.seul.org/libevent/users/Aug-2019/msg00009.html [2]: https://github.com/libevent/libevent/pull/833#issuecomment-501834453 This reverts commit 497ef904d544ac51de43934549dbeccce8e6e8f8. Reported-by: mikulas@twibright.com Backport-to: 2.1
Boris.Dergachov b5e1d911 2019-09-02T11:11:58 Fixes spelling
yuangongji 620a3fa1 2019-08-29T19:40:10 Doxygen documentation improvements - Documentation for `bufferevent_compat.h` and `rpc.h` is not generated since the `@file` command is missing. It can be fixed by adding `@file` in file comment block. - The briefs of buffer.h,bufferevent.h and some other files are missing. Adding `@brief` command can fix it. - The parameters in the function declaration are different from the parameters following the `@param` command.We should change them to the same. - Documentation of `watch.h` is not generated since `watch.h` has not been added to the Doxyfile `INPUT` tag. - Add link to the watch.h in event.h
yuangongji 6f970267 2019-08-28T11:41:53 eliminate some C4267 warnings in Windows
yuangongji f9c6a14e 2019-08-23T22:31:28 autotools: attach doxygen target into all target v2: disable man pages by default
yuangongji 1d1c1909 2019-08-23T21:48:05 cmake: attach doxygen target into all target v2: Disable non-html generator for doxygen by default v3: convert cmake option to doxygen config
Jan Kasiak 445027a5 2019-08-22T16:36:12 Fix memory corruption in EV_CLOSURE_EVENT_FINALIZE with debug enabled Call event_debug_note_teardown_ before evcb_evfinalize to avoid possible UAF (if finalizer free's event).
Jan Kasiak 70daa93a 2019-08-27T01:00:56 test: prevent duplicate event_enable_debug_mode() for TT_ENABLE_DEBUG_MODE
Azat Khuzhin 6186d312 2019-08-26T22:43:35 test: introduce TT_ENABLE_DEBUG_MODE flag
yuangongji f4e3c014 2019-08-20T20:05:25 travis-ci: add openssl1.1 into travis build matrix Fixes: #705
David Disseldorp 7d71214e 2019-08-21T01:10:19 sample/http-server: fix parameter parsing argv[1] is currently unconditionally passed as the docroot to send_document_cb(). This is broken if any optional parameters are provided, such as -p <port>. Signed-off-by: David Disseldorp <ddiss@samba.org>
David Disseldorp a0276292 2019-08-21T01:00:07 sample/signal-test: fix use of uninitialized variable signal_int is uninitialized in the !base error path. Signed-off-by: David Disseldorp <ddiss@samba.org>
ygj6 759573c9 2019-08-14T19:47:45 sample: fix 'INFINITY' undeclared error
ygj6 80009c50 2019-08-13T17:10:37 becat: avoid using anonymous structures It hasn't been part of the C standard until C11, although it is very useful GCC extension it is better to avoid using this in cross platform projects like libevent.
dota17 9c151f3c 2019-08-06T18:19:15 Fix typos in comments (sample/test/event-internal.h)
dota17 101fbe31 2019-08-08T21:28:20 sample/signal-test: add NULL checks Fixes: #865
Azat Khuzhin 4b1d7976 2019-08-09T12:25:21 Add becat into .gitignore
ygj6 3f09e923 2019-08-08T21:48:21 Change the minimum version of automake to 1.13 and autoconf to 2.67 When I run make check via automake with a version of 1.12.6 or lower, I got this error: /bin/sh: line 9: ./test_runner_epoll: No such file or directory FAIL: test_runner_epoll /bin/sh: line 9: ./test_runner_select: No such file or directory FAIL: test_runner_select /bin/sh: line 9: ./test_runner_kqueue: No such file or directory FAIL: test_runner_kqueue /bin/sh: line 9: ./test_runner_evport: No such file or directory FAIL: test_runner_evport /bin/sh: line 9: ./test_runner_devpoll: No such file or directory FAIL: test_runner_devpoll /bin/sh: line 9: ./test_runner_poll: No such file or directory FAIL: test_runner_poll /bin/sh: line 9: ./test_runner_win32: No such file or directory FAIL: test_runner_win32 /bin/sh: line 9: ./test_runner_timerfd: No such file or directory FAIL: test_runner_timerfd /bin/sh: line 9: ./test_runner_changelist: No such file or directory FAIL: test_runner_changelist /bin/sh: line 9: ./test_runner_timerfd_changelist: No such file or directory FAIL: test_runner_timerfd_changelist Open the Makefile generated by command ./autogen.sh && ./configure I can see the errors are caused by this line: if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then $${dir}$$tst will expand to ./test_runner_epoll, but test_runner_epoll is only a target in test/include.am, not a file, so it print: /bin/sh: line 9: ./test_runner_epoll: No such file or directory. It seems like a bug in automake 1.12.6. The errors will disappear if I simply upgrade automake to 1.13, and upgrade autoconf to 2.65 (2.65 is the lowest version dependent by automake-1.13). When I build with automake-1.13 and autoconf-2.66, I got another error: configure.ac:667: error: AC_CHECK_SIZEOF: requires literal arguments The code in configure.ac line 667 is : AC_CHECK_SIZEOF(void *) It is a bug in autoconf-2.66 : http://gnu-autoconf.7623.n7.nabble.com/AC-CHECK-SIZEOF-int-is-error-in-autoconf-2-66-td13537.html Finally, everything works fine when using automake-1.13 and autoconf-2.67. Refs: #858
Azat Khuzhin f05ba671 2019-08-03T14:32:21 Add Uninstall.cmake.in into dist archive Fixes: #863
Azat Khuzhin bdcade47 2019-07-31T10:34:38 buffer: fix possible NULL dereference in evbuffer_setcb() on ENOMEM [ @azat: - add return heredoc for evbuffer_setcb() - add unit test with event_set_mem_functions() - look through the report from abi-compliance-checker/abi-dumper ] Closes: #855
yuangongji 1947dd0d 2019-07-27T22:41:39 Change autoconf version to 2.62 and automake version to 1.11.2 On my computer, the version of autoconf is 2.59 and automake is 1.9 I build with autogen.sh & configure & make and failed. I find In Makefile.am: include/event2/event-config.h: config.h make-event-config.sed $(AM_V_GEN)test -d include/event2 || $(MKDIR_P) include/event2 $(AM_V_at)$(SED) -f $(srcdir)/make-event-config.sed < config.h > $@T $(AM_V_at)mv -f $@T $@ There are three undefined variables: MKDIR_P, AM_V_GEN and AM_V_at. Then I tried: - autoconf-2.60 / automake-1.10 - autoconf-2.61 / automake-1.11 - autoconf-2.62 / automake-1.11.2 And only autoconf-2.62 & automake-1.11.2 is ok. Therefore, I recommend changing the autoconf version from 2.59 to 2.62 and automake version from 1.9 to 1.11.2. Plus autoconf 2.59 is too old - 2003.12.16 [1], so as automake 1.9 - 2004.08.11 [2], while $(AM_V_GEN)/$(AM_V_at) had been introduced in 371a1237 back in 2012. [1]: http://ftp.gnu.org/gnu/autoconf/ [1]: http://ftp.gnu.org/gnu/automake/ Fixes: 371a1237 ("Make quiet build even quieter")
Azat Khuzhin 55d1e20e 2019-07-12T00:00:12 cmake: install shared library only if it was requested $ cmake -DEVENT__LIBRARY_TYPE=static .. ... CMake Error: Error evaluating generator expression: $<TARGET_FILE_DIR:event_core_shared> No target "event_core_shared" Fixes: #853 Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools")
yuangongji 7806f3ec 2019-07-03T00:27:22 Missing <winerror.h> on win7/MinGW(MINGW32_NT-6.1)/MSYS
yuangongji 669a53f3 2019-07-10T00:30:12 cmake: set library names to be the same as with autotools libtool has VERSION_INFO [1], cmake has SOVERSION/VERSION instead (although it has different format). Also libtool has RELEASE [2] while cmake do not have analog yet [3], hence manual symlinks should be created. [1]: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html [2]: https://www.gnu.org/software/libtool/manual/html_node/Release-numbers.html [3]: https://gitlab.kitware.com/cmake/cmake/issues/17652 Plus osx has compatibility_version/current_version dylib properties and cmake do not have separate properties for them [4], hence manual LINK_FLAGS. And also there INSTALL_NAME_DIR property which should be adjusted too. [4]: https://public.kitware.com/Bug/view.php?id=4383 So after all changes, here is an example before/after for osx and linux: # osx # autotools .libs/libevent_pthreads-2.2.1.dylib .libs/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib /usr/local/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0) # cmake # before patch lib/libevent_pthreads.2.2.0.dylib lib/libevent_pthreads.dylib -> libevent_pthreads.2.2.0.dylib @rpath/libevent_pthreads.2.2.0.dylib (compatibility version 2.2.0, current version 0.0.0) # after patch lib/libevent_pthreads-2.2.1.dylib lib/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib /vagrant/.cmake/inst/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0) # linux # autotools .libs/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0 .libs/libevent_pthreads-2.2.so.1.0.0 .libs/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0 # cmake # before patch lib/libevent_pthreads.so -> libevent_pthreads.so.2.2.0 lib/libevent_pthreads.so.2.2.0 # after patch lib/libevent_pthreads-2.2.so -> libevent_pthreads-2.2.so.1 lib/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0 lib/libevent_pthreads-2.2.so.1.0.0 lib/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0 Closes: #838 (cherry-picked) Closes: #760
Keith Smiley 41c95abb 2019-07-08T14:06:55 Enable _GNU_SOURCE for Android When targeting the Android NDK _GNU_SOURCE is not enabled by default: ``` /* * With bionic, you always get all C and POSIX API. * * If you want BSD and/or GNU extensions, _BSD_SOURCE and/or _GNU_SOURCE are * expected to be defined by callers before *any* standard header file is * included. * * In our header files we test against __USE_BSD and __USE_GNU. */ #if defined(_GNU_SOURCE) # define __USE_BSD 1 # define __USE_GNU 1 #endif ``` Because of this `pipe2` is not available: ``` #if defined(__USE_GNU) int pipe2(int __fds[2], int __flags) __INTRODUCED_IN(9); #endif ``` The function used to check if it does exist: ``` CHECK_FUNCTION_EXISTS_EX(pipe2 EVENT__HAVE_PIPE2) ``` Just check that the _linking_ succeeds, which it does, it's just not visible in the import, leading to a warning (or error): ``` evutil.c:2637:6: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (pipe2(fd, O_NONBLOCK|O_CLOEXEC) == 0) ^ ``` When targeting the NDK it should be safe to always opt into this. Clang would pass the right flag for us automatically _if_ the source was C++ instead of C.
Keith Smiley 0d7d85c2 2019-07-02T10:47:47 Enable kqueue for APPLE targets The CMAKE_CROSSCOMPILING variable is not set for Apple targets seemingly because of cmake implementation details (more info https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html). Since Apple targets have working kqueue implementations this check makes sure we enable it always when those are the targets, without users having to explicitly set EVENT__HAVE_WORKING_KQUEUE
Azat Khuzhin 497ef904 2019-07-01T23:54:02 Warn if forked from the event loop during event_reinit() Calling fork() from the event loop is not a great idea, since at least it shares some internal pipes (for handling signals) before event_reinit() call Closes: #833
Azat Khuzhin 5388a002 2019-06-26T09:36:49 autotools: do not install bufferevent_ssl.h under --disable-openssl Refs: https://github.com/libevent/libevent/issues/760#issuecomment-502345788
Azat Khuzhin 69466cde 2019-06-26T01:27:20 cmake: link against shell32.lib/advapi32.lib Fixes: #844 Refs: #760 (cmake-vs-autotools)
Azat Khuzhin 97488b2c 2019-06-26T01:20:53 Add README.md/Documentation into dist archive Fixes: #841
Azat Khuzhin bd2de483 2019-06-26T00:59:41 Require cmake >= 3.1.2 (for correct openssl 1.0.2 detection) @ygj6 reported: "My platform is MacOS 10.13.5, This problem only happens on Mac. As written in the file CMakeLists.txt, the minimum required version of cmake is 3.1: cmake_minimum_required(VERSION 3.1 FATAL_ERROR) So I built this project with cmake-3.1.0, but I got the following errors: CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:293 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:824 (find_package) CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:294 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:824 (find_package) CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:296 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:824 (find_package) CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:298 (list): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:824 (find_package) I googled this error and got this answer: https://bugs.archlinux.org/task/43688 It is a bug in FindOpenSSL.cmake on cmake-3.1.0 and fixed on cmake-3.1.2 . Of course, It was successful when rebuilding with cmake-3.1.2 . So I suggest setting the minimum version required for cmake to 3.1.2 or higher. " Closes: #845 Refs: https://github.com/Kitware/CMake/commit/de4ccee75a89519f95fcbcca75abc46577bfefea
Azat Khuzhin 538141eb 2019-06-15T23:18:05 evdns: add new options -- so-rcvbuf/so-sndbuf This will allow to customize SO_RCVBUF/SO_SNDBUF for nameservers in this evdns_base, you may want to adjust them if the kernel starts dropping udp packages.
jeremyerb 0de2b145 2019-06-14T10:19:51 evutil: set the have_checked_interfaces in evutil_check_interfaces() Closes: #836 (cherry-picked) Fixes: #834
Azat Khuzhin 4f6fc092 2019-06-15T00:16:00 evutil: drop force_check from evutil_check_interfaces() (unused)
yuangongji 7201062f 2019-06-09T20:15:37 cmake: add missing autotools targets (doxygen, uninstall, event_rpcgen.py) Close: #832 (cherry-picked)
Fabrice Fontaine 0374b559 2019-06-08T23:44:37 m4/libevent_openssl.m4: fix detection of openssl Since commit 506df426dbeb0187bbd3654bd286b4100628fb16, OPENSSL_INCS is added to CPPFLAGS without any white space, as a result openssl detection fails on: configure:10395: checking openssl/ssl.h usability configure:10395: /home/fabrice/buildroot-test/buildroot/output/host/bin/riscv32-linux-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64-I/home/fabrice/buildroot-test/buildroot/output/host/bin/../riscv32-buildroot-linux-gnu/sysroot/usr/include conftest.c >&5 <command-line>:0:0: warning: "_FILE_OFFSET_BITS" redefined <command-line>:0:0: note: this is the location of the previous definition <command-line>:0:23: error: division by zero in #if Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
yuangongji (A) b002f04f 2019-06-03T23:22:35 doc: cmake command on Windows Closes: #825 (cherry-pick)
Azat Khuzhin 2d4ac10e 2019-06-02T21:51:35 becat: remove extra SSL_CTX options usage [ci skip] Because: - this do not affects performance - this breaks builds for with older openssl
Azat Khuzhin 7d569b0f 2019-06-02T20:20:02 Fix detection of the __has_attribute() for apple clang [ci skip] Fixes build on the next osx env: - Mac OS 10.9/clang 600 - Mac OS 10.8/clang 500 Refs: https://github.com/libevent/libevent/issues/447#issuecomment-497908488
wenyg 891dd188 2019-05-30T17:38:49 https-client: correction error checking When connecting to a non-existent HTTPS service, the "req" is not null but the "evhttp_request_get_response_code(req)" is zero. Closes: #822 (cherry-picked)
yuangongji c03dabd7 2019-05-31T02:12:55 typo error in header file
Jan Beich 236762a3 2019-05-28T12:45:59 cmake: limit MSVC to Clang-CL
Azat Khuzhin 1c573ab3 2019-05-25T23:41:38 http: do not name variable "sun" since this breaks solaris builds -bash-3.2$ /opt/csw/bin/gcc -xc /dev/null -dM -E | grep '#define sun' #define sun 1
Azat Khuzhin 51ac04ac 2019-05-25T17:29:25 test: mark bev_connect_hostname() as static (to avoid prototype requirement)
Azat Khuzhin 49a367e6 2019-05-25T17:28:53 cmake: add -Wmissing-prototypes (like autotools has)
Azat Khuzhin 4c774b6c 2019-05-21T10:59:05 time-test: disable buffering (mostly for windows)
Azat Khuzhin 3b1864b6 2019-05-16T10:25:50 Merge branch 'evbuffer-fixes-806-v2' * evbuffer-fixes-806-v2: evbuffer: fix last_with_datap after prepend with empty chain test: regression for evbuffer_expand_fast_() with invalid last_with_datap test: cover adjusting of last_with_datap in evbuffer_prepend() Fixes: #806
Azat Khuzhin 401bd1c0 2019-05-11T00:17:03 evbuffer: fix last_with_datap after prepend with empty chain last_with_datap should be adjusted only if it buf->first *was* not empty, otherwise last_with_datap should point to the prepended chain.
Azat Khuzhin 244cacaf 2019-05-16T09:42:41 test: regression for evbuffer_expand_fast_() with invalid last_with_datap Before the fix: $ regress --no-fork evbuffer/reserve_invalid_last_with_datap evbuffer/empty_chain_expand: [err] ../buffer.c:2138: Assertion chain == buf->first failed in evbuffer_expand_fast_ Aborted (core dumped) This is the a shorter version of test from the #806 (with some comments).
Azat Khuzhin 98ca3077 2019-05-16T09:50:43 test: cover adjusting of last_with_datap in evbuffer_prepend() Before the fix: $ regress evbuffer/empty_reference_prepend.. evbuffer/empty_reference_prepend: [forking] FAIL ../test/regress_buffer.c:104: assert(chain == buf->first) FAIL ../test/regress_buffer.c:2291: Buffer format invalid [empty_reference_prepend FAILED] evbuffer/empty_reference_prepend_buffer: [forking] OK 1/2 TESTS FAILED. (0 skipped)
Azat Khuzhin c8b403a8 2019-05-15T21:29:03 Add getopt into dist archive Fixes: #815
Joseph Spadavecchia 5e137f37 2014-12-08T17:32:07 Implement bufferevent_socket_connect_hostname_hints() So that ai_flags (such as AI_ADDRCONFIG) can be specified. Closes: #193 (cherry-picked with conflicts resolved)
Azat Khuzhin 76eded24 2019-05-12T19:06:43 Merge branch 'issue-807-accept4-getnameinfo-AF_UNIX' * issue-807-accept4-getnameinfo-AF_UNIX: http-server: add usage/help dialog http: avoid use of uninitialized value for AF_UNIX/AF_LOCAL sockaddr http-server: add ability to bind to unix-socket build: struct sockaddr_un detection (sys/un.h, afunix.h) Fixes: #807
Azat Khuzhin c4de6024 2019-05-12T18:25:37 http-server: add usage/help dialog
Azat Khuzhin ad51a3c1 2019-05-12T15:19:31 http: avoid use of uninitialized value for AF_UNIX/AF_LOCAL sockaddr unixsock peer does not have sun_path initialized.
Azat Khuzhin 737d1beb 2019-05-11T18:49:28 http-server: add ability to bind to unix-socket Usage example: http-server -u -U /tmp/sock /tmp/no-such-dir curl -v --unix-socket /tmp/sock 127.1:8080/foo
Azat Khuzhin da112175 2019-05-12T16:12:06 build: struct sockaddr_un detection (sys/un.h, afunix.h) - On UNIX: sys/un.h - Since win10: afunix.h And windows has AF_UNIX but do not have sockaddr_un (before windows build 17061 [1]), hence the sockaddr_un detection. [1]: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
Tobias Stoeckmann 2707a4ff 2019-05-10T23:54:14 kqueue: Avoid undefined behaviour. As ploxiln pointed out in pull request 811 the check "newsize < 0" is undefined behaviour (signed int overflow). Follow the advice and check kqop->changes_size instead. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Closes: #813 (cherry-picked)
Tobias Stoeckmann cf8acae3 2019-05-07T20:53:17 Prevent integer overflow in kq_build_changes_list. On amd64 systems with kqueue (e.g. *BSD systems) an integer overflow could be triggered with an excessively huge amount of events. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
zhuizhuhaomeng 8701d0d3 2019-05-06T11:37:02 evdns: fix lock/unlock mismatch in evdns_close_server_port() Closes: #809 (cherry-picked)
Azat Khuzhin c6becb26 2019-04-30T08:43:27 Merge remote-tracking branch 'official/pr/804' * official/pr/804: Added test for evmap slot validations. Prevent endless loop in evmap_make_space. Enforce limit of NSIG signals.
Tobias Stoeckmann 9b2060c9 2019-04-24T22:55:24 Added test for evmap slot validations. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann bd817009 2019-04-24T22:54:04 Prevent endless loop in evmap_make_space. If slot is larger than INT_MAX / 2, then the loop which increases nentries until it is larger than slot would never return. Also make sure that nentries * msize will never overflow INT_MAX. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann 4a1088ba 2019-04-22T19:58:56 Enforce limit of NSIG signals. It doesn't make sense to allow a signal number higher than NSIG. The NSIG check already exists in signal.c for internally used functions. As this is a programming error of libevent consumers, this is a purely defensive mechanism. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann 176fd566 2019-04-16T21:12:21 Protect min_heap_push_ against integer overflow. Converting unsigned to size_t for size of memory objects allows proper handling of very large heaps on 64 bit systems. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Closes: #799 (cherry-picked)
linxiaohui 16d8564a 2019-04-18T17:10:33 le-proxy: initiate use of the Winsock DLL Closes: #803 (cherry-picked)
Dan Rosen 1cd8830d 2019-04-17T15:44:59 evwatch: fix race condition There was a race between event_base_loop and evwatch_new (adding a prepare/check watcher while iterating over the watcher list). Only release the mutex immediately before invoking each watcher callback, and reacquire it immediately afterwards (same as is done for normal event handlers).
Azat Khuzhin 04563d59 2019-04-13T13:22:55 Ignore build files for autotools build in subfolder too
Azat Khuzhin c80f6be1 2019-04-11T22:52:10 Merge branch '21_http_extended_method' * 21_http_extended_method: Added http method extending http: Update allowed_methods field from 16 to 32bits. Fixes: #327
Thomas Bernard 8dcb94a4 2016-01-08T13:36:20 Added http method extending User can define his own response method by calling evhttp_set_ext_method_cmp() on the struct http, or evhttp_connection_set_ext_method_cmp() on the connection. We expose a new stucture `evhttp_ext_method` which is passed to the callback if it's set. So any field can be modified, with some exceptions (in evhttp_method_): If the cmp function is set, it has the ability to modify method, and flags. Other fields will be ignored. Flags returned are OR'd with the current flags. Based on changes to the #282 from: Mark Ellzey <socket@gmail.com>