Log

Author Commit Date CI Message
Jonathan Ringer be03bf38 2021-11-08T06:47:25 Install LibeventConfig.cmake similar to other cmake files - Don't destroy cmake file between test case invocations
Jonathan Ringer 1f1593ff 2021-10-27T16:40:10 Use GNUInstallDirs for mapping installation directories
Azat Khuzhin fe610f2c 2023-05-14T22:35:53 Fix util/mm_calloc_enomem under FreeBSD It looks like the compiler optimizes this call out with tt_assert(): (gdb) disas /m test_event_calloc_enomem Dump of assembler code for function test_event_calloc_enomem: 0x0000000000293bb0 <+0>: push %rbp 0x0000000000293bb1 <+1>: mov %rsp,%rbp 0x0000000000293bb4 <+4>: call 0x29f510 <__error@plt> 0x0000000000293bb9 <+9>: movl $0x0,(%rax) 0x0000000000293bbf <+15>: call 0x2990e0 <tinytest_set_test_failed_> 0x0000000000293bc4 <+20>: mov $0x2168e4,%edi 0x0000000000293bc9 <+25>: mov $0x220582,%esi 0x0000000000293bce <+30>: mov $0x20d893,%edx 0x0000000000293bd3 <+35>: mov $0x53a,%ecx 0x0000000000293bd8 <+40>: xor %eax,%eax 0x0000000000293bda <+42>: call 0x29f3b0 <printf@plt> 0x0000000000293bdf <+47>: mov $0x20da72,%edi 0x0000000000293be4 <+52>: mov $0x20f731,%esi 0x0000000000293be9 <+57>: xor %eax,%eax 0x0000000000293beb <+59>: pop %rbp 0x0000000000293bec <+60>: jmp 0x29f3b0 <printf@plt> While with tt_ptr_op() it does not: (gdb) disas /m test_event_calloc_enomem Dump of assembler code for function test_event_calloc_enomem: 0x0000000000293bd0 <+0>: push %rbp 0x0000000000293bd1 <+1>: mov %rsp,%rbp 0x0000000000293bd4 <+4>: push %rbx 0x0000000000293bd5 <+5>: push %rax 0x0000000000293bd6 <+6>: call 0x29f610 <__error@plt> 0x0000000000293bdb <+11>: movl $0x0,(%rax) 0x0000000000293be1 <+17>: mov $0xffffffffffffffff,%rdi 0x0000000000293be8 <+24>: mov $0xffffffffffffffff,%rsi 0x0000000000293bef <+31>: call 0x2a01c0 <calloc@plt> 0x0000000000293bf4 <+36>: test %rax,%rax 0x0000000000293bf7 <+39>: je 0x293c2b <test_event_calloc_enomem+91>
Azat Khuzhin 13f55523 2023-05-14T22:29:12 test: add missing include of arpa/inet.h for ntohs in regress_ws.c This will fix one warning in FreeBSD
Azat Khuzhin 1f006637 2023-05-14T22:03:26 Merge branch 'build/osx-fixes' * build/osx-fixes: Suppress -Wmacro-redefined for htonll/ntohll in OSX Fix -Wtautological-constant-out-of-range-compare in regress_http under OSX
Azat Khuzhin 6eba967e 2023-05-14T22:00:19 Suppress -Wmacro-redefined for htonll/ntohll in OSX OSX: test/regress_ws.c:61:9: warning: 'htonll' macro redefined [-Wmacro-redefined] #define htonll(x) \ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_endian.h:141:9: note: previous definition is here #define htonll(x) __DARWIN_OSSwapInt64(x) ^ test/regress_ws.c:65:9: warning: 'ntohll' macro redefined [-Wmacro-redefined] #define ntohll(x) htonll(x) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_endian.h:140:9: note: previous definition is here #define ntohll(x) __DARWIN_OSSwapInt64(x) ^
Azat Khuzhin 5f1fc92b 2023-05-14T21:55:43 Fix -Wtautological-constant-out-of-range-compare in regress_http under OSX compiler warning: test/regress_http.c:968:38: warning: result of comparison of constant 65536 with expression of type 'enum evhttp_cmd_type' is always true [-Wtautological-constant-out-of-range-compare] if (evhttp_request_get_command(req) != EVHTTP_REQ_CUSTOM) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
Dmitry Antipov d1969098 2022-12-09T13:09:44 Silence weird GCC warning about an uninitialized variable For the CMake release build with -DEVENT__ENABLE_GCC_WARNINGS=ON and -DEVENT__DISABLE_MM_REPLACEMENT=ON, GCC version 11 and 12 may complain about possibly uninitialized variable: In function ‘event_debug_assert_not_added_’, inlined from ‘event_assign’ at event.c:2184:2, inlined from ‘event_new’ at event.c:2276:6: cc1: error: ‘ev’ may be used uninitialized [-Werror=maybe-uninitialized] event.c: In function ‘event_new’: event.c:361:13: note: by argument 1 of type ‘const struct event *’ to event_debug_assert_not_added_.part.0’ declared here 361 | static void event_debug_assert_not_added_(const struct event *ev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This warning is most likely a false positive and can be silenced by explicitly disabling inlining for 'event_assign()'. Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Azat Khuzhin 73037f88 2023-05-14T20:32:50 Ignore any archives (since you may use separate build dir for 'make dist')
Azat Khuzhin e8cbe7b6 2023-05-14T20:04:34 Merge branch 'ssl/fix-partial-read' - #1451 * ssl/fix-partial-read: ssl: do not triger EOF if some data had been successfully read ssl: rename err_is_ok to handshake_is_ok (internal API)
Azat Khuzhin 7652cf40 2023-05-14T16:53:13 ssl: do not triger EOF if some data had been successfully read Previously in case when evbuffer_reserve_space() returns > 1, but it was able to read only 1 IO vector, it will try to read the next one, got 0 (EOF for mbedTLS or SSL_ERROR_ZERO_RETURN for OpenSSL) and will trigger EOF, while instead, it should trigger EV_READ w/o EOF and only after EOF.
Azat Khuzhin 6375dcb4 2023-05-14T16:45:14 ssl: rename err_is_ok to handshake_is_ok (internal API)
liaotonglang d06e573c 2023-05-05T15:13:05 style fix: use tab for indent
fanquake bdb343e1 2023-05-04T09:49:28 ci: use newer actions/x versions for master jobs Now that the jobs are running again, a number of deprecation warnings have surfaced https://github.com/libevent/libevent/actions/runs/4876367881: ```bash Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2.0.0. ``` Looks like the most straightforward thing todo here is just use the newer version of the checkout action. Also move to the v1 tag for the coveralls job, rather than a pinned, much older version (the latest release is 1.2.5, https://github.com/coverallsapp/github-action/releases). Same again for actions/cache.
fanquake 21173669 2023-05-04T09:38:56 ci: use OpenBSD 7.2 over 7.1 In the most recent CI run, all the OpenBSD CI jobs failed, i.e https://github.com/libevent/libevent/actions/runs/4876367885/jobs/8699759831, this seems to be due to the fact that packages for 7.1 have been removed from https://cdn.openbsd.org/pub/OpenBSD/ (only has 7.2 & 7.3): ```bash Config file: openbsd-7.1.conf https://cdn.openbsd.org/pub/OpenBSD/7.1/packages/amd64/: no such dir Can't find rsync-3.2.3p0 Couldn't install rsync-3.2.3p0 exec shell: bash run.sh showDebugInfo ``` Switch to using 7.2, which is available, so that the CI will run.
fanquake 60ad22d4 2023-05-03T16:28:58 actions: use supported version of Ubuntu It looks like these jobs are failing to run, because support for ubuntu-18.04 has been removed entirely, see: https://github.com/actions/runner-images/issues/6002. Migrate to ubuntu-20.04.
fanquake 75208132 2023-04-21T04:33:22 doc: minor cleanups following #1441 (#1442) Also fixes 1 broken link (apologies).
Azat Khuzhin 612a74c7 2023-04-17T21:19:58 Merge pull request #1441 from fanquake/autoconf_doc_updates doc: minor autoconf/formatting improvements
fanquake ac69410e 2023-04-17T14:28:43 doc: mark Autotools as deprecated in building.md Re-arrange so CMake is mentioned first. Formatting improvements.
fanquake 2470b37b 2023-04-17T14:22:30 doc: move autoconf link in readme to autoconf section.
lilinjie 4c993a0e 2023-04-11T04:44:37 Fix typo in changelog (#1438)
Azat Khuzhin f747a7b9 2023-04-04T22:19:07 Prohibit VLA in autotools too
Azat Khuzhin f04d90b1 2023-04-04T22:15:35 Fix building with -Wstack-protector due to VLA and fobid them It is not a thankless task to fix such issues on and on, let's just prohibit this cases, and our build with -Werror on CI will show new issues from now on. Fixes: #1434
fanquake 1878232b 2023-02-13T15:57:55 build: split kqueue warning message into cross-compile and apple This is output when compiling (natively) on macOS systems, which is confusing, because no cross-compilation is involved. Split the message into separate cases.
zhenhaonong fc568ff0 2023-03-17T19:53:50 Deal with partial writes on SSL write SSL write may do partial writes in some cases. For example, document of mbedtls_ssl_write says: If the return value is non-negative but less than length, the function must be called again with updated arguments: buf + ret, len - ret (if ret is the return value) until it returns a value equal to the last 'len' argument. In case of partial writes, we should continue writing the same chain of buffer, not the next chain.
Liao Tonglang 9203d98f 2023-03-27T04:35:00 http: style fix: use space between arguments list (#1435)
Azat Khuzhin 6e1826dd 2023-03-08T21:34:37 ci: fix typo in yaml for cifuzz Follow-up for: #1431
Azat Khuzhin 606056d6 2023-03-06T21:22:10 ci: switch to ubuntu 20.04 github action reports "internal error" for builds on ubuntu 18.04: linux-cmake-job (ubuntu-18.04, COMPILER_CLANG) This is a scheduled Ubuntu-18.04 brownout. The Ubuntu-18.04 environment is deprecated and will be removed on April 1st, 2023. For more details, see https://github.com/actions/runner-images/issues/6002 linux-cmake-job (ubuntu-18.04, COMPILER_CLANG) GitHub Actions has encountered an internal error when running your job.
Diogo Teles Sant'Anna 99a4b1a7 2023-03-06T14:26:11 ci: set minimal permissions on GitHub Actions Change made by setting top-level read-only permisisons, and any other necessary permissions set as job-level. Closes #1421 Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
Liao Tonglang 6bfa5805 2023-03-05T23:59:21 http: Reduce times of checking if response has body (#1395) Use a variable 'need_body' to store the result of evhttp_response_needs_body(), then use the variable instead of call the function again.
Michael Ford 185e2f00 2023-03-05T23:58:22 build: improve mbedtls searching on macOS with brew for cmake (#1419) This just copies the same logic used to find OpenSSL on macOS using homebrew, for finding mbedtls via brew. Without it, the build will fail out the box with a brew installed mbedtls.
Kurt Roeckx 4e6375e8 2023-03-05T16:56:56 Always have evutil_secure_rng_add_bytes available (#1427) When libevent doesn't provide random the arc4 function, but they come from libc, there is no need to call this function, so make it do nothing. Fixes: #1393
Zhipeng Xue 3a0cf34b 2023-03-04T22:29:09 ws-chat-server: fix potential resource leak
Zhipeng Xue bac9d10a 2023-03-05T05:13:54 Fix potential null dereference in http-server (#1430) Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Zhipeng Xue fa05966d 2023-03-05T05:12:04 test: fix potential null dereference in https_bind_ssl_bevcb (#1428) Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Cœur 557990ca 2023-03-02T12:41:11 Optimize arc4random_uniform() (by syncing with OpenBSD implementation) 1. In d4de062, in Feb 2010, libevent adopted OpenBSD implementation of arc4random_uniform. 2. In https://github.com/openbsd/src/commit/728918cba93e0418bea2a73c9784f6b80c2a9dbd, in Jun 2012, OpenBSD improved their implementation to be faster, by changing arc4random_uniform() to calculate ``2**32 % upper_bound'' as ``-upper_bound % upper_bound''. Alternatively we can simply remove arc4random_uniform() since it is not used by libevent anyway, but let's just sync the header for now.
Cœur e96e98ae 2023-03-02T13:43:54 evdns: fix "Branch condition evaluates to a garbage value" in reply_parse
Cœur 3bcc92cf 2023-03-02T13:59:32 Fix the value is never actually read from 'argument' in evhttp_parse_query_impl() Although the value stored to 'argument' is used in the enclosing expression, the value is never actually read from 'argument'
Cœur b84fee24 2023-03-02T14:07:44 Fix "Value stored to 'a' is never read" in SHA1Transform() Using same fix as used in android [1]. [1]: android.googlesource.com/platform/dalvik/+/android-4.4.2_r2/libdex/sha1.cpp#193
Azat Khuzhin bcefdbc6 2023-02-14T09:56:03 Merge pull request #1418 from fanquake/use_fortify_source_3 build: use FORTIFY_SOURCE=3 in hardening option
fanquake e89ddd40 2023-02-13T16:06:29 build: use FORTIFY_SOURCE=3 in autotools build
fanquake 38cd76f0 2023-02-13T16:05:58 build: use FORTIFY_SOURCE=3 in CMake build
Azat Khuzhin 28c28f07 2023-02-13T08:09:21 Merge pull request #1414 from azat/build/deprecate-autotools Deprecate autotools build
Azat Khuzhin 1df2a5a6 2023-02-12T17:05:20 test: enable allocator_may_return_null=1 for calloc with ENOMEM test
Azat Khuzhin 207ea62b 2023-02-12T16:46:40 test: handle -v as --verbose for regress
Azat Khuzhin 0ea20582 2023-02-12T21:39:04 test: add del_wait/del_notify tests for windows Test manually, since CI is too slow
Azat Khuzhin c437b84a 2023-02-12T15:24:06 Remove extra builds for autotools on CI We have almost the same matrix for cmake and autotools, but autotools is considered to be deprecated from now on, plus our CI takes too much time, especially non-linux, since we are using public infrastucture. So let's remove extra builds.
Azat Khuzhin f7e39d2e 2023-02-12T16:29:45 ci: bump cache and checkout plugins
Azat Khuzhin b5a6940d 2023-02-12T16:11:02 ci: fix paths-ignore
Azat Khuzhin 7e6d9b0b 2023-02-12T15:20:30 .github/workflows/build.yml: remove trailing whitespaces
Azat Khuzhin 866b751b 2023-02-12T15:19:51 Deprecate autotools build
Edoardo Lolletti 765fb410 2023-02-12T16:19:35 Fix compilation on non recent windows SDKs (#1399) In commit f8bb9d8 the header stringapiset.h was included, very likely because the user who made the change saw that the funciton WideCharToMultiByte is "declared" in there. That header tho is a recent addition to the windows headers added in the last years in an attempt from microsoft to split the windows.h header in multiple files, so the inclusion fails when the library is not built with the latest visual studio using the latest windows 10 sdk. That inclusion can be safely removed as in any case the function WideCharToMultiByte was already included by the windows.h header that is included few lines below.
Azat Khuzhin 61de8a07 2023-02-12T15:47:16 test: fix leaks in bufferevent_pair_release_lock (#1413)
Azat Khuzhin a82b77bb 2023-02-12T09:56:54 Remove suppression for test_ok under TSan There is no such tests yet.
Azat Khuzhin b5a5fbb8 2023-02-12T08:50:05 Merge branch 'tests-fixes' * tests-fixes: Add more ignore rules test: fix debug locks in case new lock gots old address test: suppress logs from the tests that produce them under normal circumstances test: fix TT_* flags values Suppress data race for test_ok variable Suppress data race for event_debug_created_threadable_ctx_ variable
Azat Khuzhin b99106f3 2023-02-12T08:36:16 Add more ignore rules - for clangd - and compile_commands.json for it
Azat Khuzhin c257e16f 2023-02-12T08:34:52 test: fix debug locks in case new lock gots old address Refs: #1407
Azat Khuzhin fb900a28 2023-02-12T08:12:20 test: suppress logs from the tests that produce them under normal circumstances
Azat Khuzhin 1201bb85 2023-02-12T07:59:17 test: fix TT_* flags values
Azat Khuzhin f0cb4b7f 2023-02-12T07:58:55 Suppress data race for test_ok variable
Azat Khuzhin 39be38ff 2023-02-12T07:58:29 Suppress data race for event_debug_created_threadable_ctx_ variable
Edoardo Lolletti f9134df7 2023-02-04T15:00:48 Add LEV_OPT_BIND_IPV4_AND_IPV6 flag (#1400) Libevent introduced the LEV_OPT_BIND_IPV6ONLY to pass to evconnlistener_new_bind to make it automatically set the underlying socket as accepting ipv6 requests. This works fine on posix compliant platforms as by the standard every new AF_INET6 socket is created as both supporting ipv6 and ipv4 connections. But on windows the default is the opposite, with the flag IPV6_V6ONLY being always enabled by default. This makes creating a listener to supports both protocols a bit more tricky as winsock doesn't allow changing this flag after evconnlistener_new_bind does all the initial setup because as stated in the docs, you can't change it after the sonnect connected, so one would have to manually create the socket beforehand and set the flag and then call evconnlistener_new with the socket itself. It would be nice to have libevent keep a consistent behaviour across the platforms in this scenario, maybe or by making it always set IPV6_V6ONLY to false unless LEV_OPT_BIND_IPV6ONLY is passed, in which case it's set to true, or add another flag to forcefully set it to false and keep the system dependent behaviour as default. So this patch add new option for libevent listeners to bind to both - LEV_OPT_BIND_IPV4_AND_IPV6
Azat Khuzhin a5b0ded3 2023-02-04T14:56:53 Add config for vim/nvim
Azat Khuzhin 4d85d28a 2023-01-28T13:28:52 Fix pthread detection for regress tests on Android Fixes: #1403
Azat Khuzhin 35375101 2023-01-27T08:57:33 Fixes some new warnings under clang-15 - -Wdeprecated-non-prototype /src/le/libevent/strlcpy.c:48:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] event_strlcpy_(dst, src, siz) - -Wstrict-prototypes /src/le/libevent/evthread.c:82:70: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] struct evthread_condition_callbacks *evthread_get_condition_callbacks() - -Wunused-but-set-variable /src/le/libevent/test/regress_buffer.c:130:6: warning: variable 'n' set but not used [-Wunused-but-set-variable] int n = 0; ^
Azat Khuzhin 3d138bda 2023-01-27T08:51:56 Allow evdns_base_new to succeed with no nameservers configured (#1389) * evdns-no-ns: Allow evdns_base_new to succeed with no nameservers configured Replace magic numbers with consts for evdns_base_resolv_conf_parse() errors
Daniel Kempenich ebd7e8d7 2023-01-27T08:44:41 Allow evdns_base_new to succeed with no nameservers configured If resolv.conf has no nameservers, evdns_base_new can still succeed with the default of using the name server from localhost matching the man page documentation for resolv.conf.
Daniel Kempenich a7fffb5c 2023-01-17T23:02:56 Replace magic numbers with consts for evdns_base_resolv_conf_parse() errors
liaotonglang c01cb1d6 2023-01-10T11:20:24 Fix ignoring return value of arc4random() warning (with _FORTIFY_SOURCE defined) arc4random() defines with __wur (warn-unused-return) macro in glibc, but the problem pops up only for gentoo, since only it really define __wur to __attribute__ ((__warn_unused_result__)), because it defines _FORTIFY_SOURCE unconditionally [1]. [1]: https://gitweb.gentoo.org/proj/gcc-patches.git/tree/9.4.0/gentoo/01_all_default-fortify-source.patch?id=7f7f80a650607c3090ae0790b8daef88434da681 And hence you get this error: ```sh docker run -v $PWD:/src:ro --rm --name le -w /src -it gentoo/stage3 bash -c 'mkdir /build && cd /build && /src/configure --enable-gcc-warnings=yes --disable-samples && make -j && echo OK' /src/evutil_rand.c: In function 'evutil_secure_rng_init': /src/evutil_rand.c:56:16: error: ignoring return value of 'arc4random' declared with attribute 'warn_unused_result' [-Werror=unused-result] 56 | (void) arc4random(); | ^~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:2056: evutil_rand.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/build' make: *** [Makefile:1523: all] Error 2 ``` Also it seems that GCC works as expected here [2], and will not change the behavior. [2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
Azat Khuzhin 94cc08fd 2023-01-15T20:56:56 Add CTestCostData.txt to gitignore
Dmitry Antipov 0b79a002 2023-01-02T17:06:48 buffer: use pread() for evbuffer_file_segment_materialize() If pread(2) is available, prefer it over double lseek(2) and read(2) in evbuffer_file_segment_materialize(). Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
mdavidsaver 1fe626c4 2022-12-16T00:34:25 Allow CLI override of CMAKE_DEBUG_POSTFIX (#1391) Allows cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX= for a debug build with the regular library names.
DavidKorczynski d8ecb88f 2022-11-26T19:40:02 ci: add CIFuzz Github action (#1382) Signed-off-by: David Korczynski <david@adalogics.com> Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Azat Khuzhin dfbb004a 2022-11-20T23:11:00 Fix script for updating contributors
Azat Khuzhin 82af0ea4 2022-11-20T22:18:37 cmake: remove redundant _GNU_SOURCE definition As reported by @francoisk: `_GNU_SOURCE` is defined in the private config header but also on the compiler command-line for every object. Fixes: #1333
Azat Khuzhin 097af7b7 2022-11-20T21:52:49 Merge branch 'release-2.2-changelog-prepare' * release-2.2-changelog-prepare: Changelog skeleton Start new changelog for 2.2
Azat Khuzhin d179ae92 2022-11-20T21:52:12 Changelog skeleton
Azat Khuzhin f40642ee 2022-11-13T22:09:12 Start new changelog for 2.2
Azat Khuzhin e28b3bef 2022-11-20T21:50:40 Merge branch 'release-scripts' * release-scripts: Add a script to generate changelog Add a script to add new contributors Rellocate some text in CONTRIBUTORS.md
Azat Khuzhin acd4cc63 2022-11-13T21:53:17 Add a script to generate changelog
Azat Khuzhin 7c8b3e99 2022-11-13T21:44:10 Add a script to add new contributors
Azat Khuzhin d130d9f9 2022-11-13T21:32:44 Rellocate some text in CONTRIBUTORS.md
Azat Khuzhin 650d8619 2022-11-20T14:51:36 cmake: do influence CMAKE_DEBUG_POSTFIX of the outer project (if any) Consider the following example: $ touch lib.c $ cat > CMakeLists.txt <<EOL add_subdirectory(/src/le/libevent libevent EXCLUDE_FROM_ALL) add_library(lib lib.c) EOL $ mkdir .cmake $ cmake -DCMAKE_BUILD_TYPE=debug -G Ninja .. $ ninja $ ls *.a liblibd.a So now outer project also has "d" prefix for libraries. Let's avoid this by setting non-cached variable. Fixes: #1371
Dmitry Ilyin ed079c9f 2022-11-16T22:06:06 Add ws-chat-server to gitignore (#1376)
Srivatsan Iyer 7a18af8c 2022-11-15T12:38:41 Exclude arc4random_buf implementation if it's already present in the platform (#1375) This patch excludes definition of arc4random_buf on systems where it is already present. When the symbol is found, the macro EVENT__HAVE_ARC4RANDOM_BUF is set via CMake's configure_file(..). Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Azat Khuzhin cdeb3242 2022-11-13T14:05:43 Various documentation improvements (#842) * doc-pull: doc: add build prerequisites doc: add MSVC and GNUC options Fixes: #843
yuangongji 3d82675e 2019-06-22T00:03:36 doc: add build prerequisites [ci skip]
yuangongji a3973a5a 2019-06-19T22:27:39 doc: add MSVC and GNUC options
mkm 8800b17a 2022-11-01T14:26:11 evdns: integrate deferred_response_callback into evdns_request the allocation of the struct deferred_reply_callback can fail. If that happens a program waiting for a callback never gets a callback. The program would asume that it either gets an error or a callback when e.g. calling evdns_base_resolve_ipv6. I did an analysis of the evdns.c code and concluded that struct evdns_request would live until the callback is executed. Based on that conclusion I removed the struct deferred_reply_callback and moved the neccessary fields for data which should be copied from struct request into struct evdns_request. The fields evdns_callback_type user_callback and void *user_pointer are moved into struct evdns_request as it is a more natural place for them to live than struct request.
neil 45c66e48 2022-11-13T20:39:17 Add CI checks for OpenBSD (#1326) Initially 6.9 and 7.1 had been added, however due to some issues (you can read about them below) 6.9 had been disabled. netbsd 6.9 does not have correct library namings for autotools: 2022-08-17T04:59:58.8339420Z libtool: link: (cd ".libs" && rm -f "libevent.so.1.0" && ln -s "libevent-2.2.so.1.0" "libevent.so.1.0") $ grep ^library_names= libevent.la· library_names='libevent-2.2.so.1.0 libevent.so.1.0' # And this is wrong, it should be: libtool: link: (cd ".libs" && rm -f "libevent-2.2.so.1" && ln -s "libevent-2.2.so.1.0.0" "libevent-2.2.so.1") libtool: link: (cd ".libs" && rm -f "libevent.so" && ln -s "libevent-2.2.so.1.0.0" "libevent.so") library_names='libevent-2.2.so.1.0.0 libevent-2.2.so.1 libevent.so' **And I think that 7.1 should also fail, however it has system-wide libevent installed with evdns in the libevent.so** Also there are some issues with `TEST_EXPORT_SHARED` test, because of libraries naming: 2022-09-13T06:38:29.2150790Z [test-export] test for install tree(in system-wide path) 2022-09-13T06:38:29.2151500Z [test-export] fail: link core and run core expects success but gets failure. 2022-09-13T06:38:29.2063870Z /usr/bin/cc CMakeFiles/test-export.dir/test-export.c.o -o test-export -L/usr/local/lib -Wl,-z,origin,-rpath,/usr/local/lib -levent_core-2.2 -lpthread -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib· 2022-09-13T06:38:29.2152190Z ld: error: unable to find library -levent_core-2.2 2022-09-13T06:38:28.3915680Z -- Install configuration: "Release" 2022-09-13T06:38:28.3916700Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1.0.0 2022-09-13T06:38:28.3917110Z -- Up-to-date: /usr/local/lib/libevent_core-2.2.so.1 2022-09-13T06:38:28.3917480Z -- Up-to-date: /usr/local/lib/libevent_core.so # no libevent_core-2.2.so So I have to disable it too. Co-authored-by: Azat Khuzhin <azat@libevent.org>
Dmitry Antipov 1af745d0 2022-10-25T11:30:34 signal: new signal handling backend based on signalfd Linux-specific signal handling backend based on signalfd(2) system call, and public function event_base_get_signal_method() to obtain an underlying kernel signal handling mechanism. Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Azat Khuzhin 9e346936 2022-11-12T18:56:25 Ignore unknown pragmas Since new compilers has new checks (like -Wdangling-pointer), and so to avoid extra checks in cmake/autotools, simply suppress if the pragma is unknown.
Azat Khuzhin 72a4fe76 2022-11-12T18:59:41 ws-chat-server: fix session name initialization (using of uninitialized data)
Azat Khuzhin c8c730c8 2022-11-12T18:56:03 cmake: tiny cleanup
Azat Khuzhin 56d380b9 2022-11-12T18:45:13 ws: ignore case while comparing values of Upgrade/Connection headers Cc: @widgetii Fixes: #1373
Azat Khuzhin 8482e227 2022-11-12T18:44:44 ws-chat-server: avoid SIGSEGV in case of evws_new_session() failure
Azat Khuzhin dda05f45 2022-11-12T18:11:08 sample/ws-chat.html: allow to open it via file:// protocol
Azat Khuzhin 2dfad6c3 2022-11-12T18:06:09 Suppress -Wdangling-pointer in event_signal_closure() gcc 12 complains: [34/46] Building C object CMakeFiles/event_static.dir/event.c.o /src/le/libevent/event.c: In function ‘event_signal_closure’: /src/le/libevent/event.c:1384:32: warning: storing the address of local variable ‘ncalls’ in ‘*ev.ev_.ev_signal.ev_pncalls’ [-Wdangling-pointer=] 1384 | ev->ev_pncalls = &ncalls; | ~~~~~~~~~~~~~~~^~~~~~~~~ /src/le/libevent/event.c:1378:15: note: ‘ncalls’ declared here 1378 | short ncalls; | ^~~~~~ /src/le/libevent/event.c:1378:15: note: ‘ev’ declared here
Azat Khuzhin e1d7d3e4 2022-11-12T17:56:51 sha1: ignore -Wstringop-overread warning Fixes the following: [4/38] Building C object CMakeFiles/event_shared.dir/sha1.c.o In function ‘SHA1Update’, inlined from ‘SHA1Final’ at /src/le/libevent/sha1.c:274:5, inlined from ‘builtin_SHA1’ at /src/le/libevent/sha1.c:292:5: /src/le/libevent/sha1.c:228:13: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 7 [-Wstringop-overread] 228 | SHA1Transform(context->state, *(const unsigned char (*)[64])&data[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /src/le/libevent/sha1.c:228:13: note: referencing argument 2 of type ‘const unsigned char[64]’ /src/le/libevent/sha1.c: In function ‘builtin_SHA1’: /src/le/libevent/sha1.c:80:13: note: in a call to function ‘SHA1Transform’ 80 | static void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) { | ^~~~~~~~~~~~~
Azat Khuzhin 23a01aa2 2022-11-12T16:41:55 sha1: hide SHA1_CTX