summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential null dereference in http-server (#1430)Zhipeng Xue2023-03-041-0/+2
| | | Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
* test: fix potential null dereference in https_bind_ssl_bevcb (#1428)Zhipeng Xue2023-03-041-0/+4
| | | Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
* Optimize arc4random_uniform() (by syncing with OpenBSD implementation)Cœur2023-03-021-11/+2
| | | | | | | | | | | | | 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.
* evdns: fix "Branch condition evaluates to a garbage value" in reply_parseCœur2023-03-021-2/+2
|
* Fix the value is never actually read from 'argument' in ↵Cœur2023-03-021-4/+2
| | | | | | | evhttp_parse_query_impl() Although the value stored to 'argument' is used in the enclosing expression, the value is never actually read from 'argument'
* Fix "Value stored to 'a' is never read" in SHA1Transform()Cœur2023-03-021-2/+0
| | | | | | Using same fix as used in android [1]. [1]: android.googlesource.com/platform/dalvik/+/android-4.4.2_r2/libdex/sha1.cpp#193
* Merge pull request #1418 from fanquake/use_fortify_source_3Azat Khuzhin2023-02-142-2/+2
|\ | | | | build: use FORTIFY_SOURCE=3 in hardening option
| * build: use FORTIFY_SOURCE=3 in autotools buildfanquake2023-02-131-1/+1
| |
| * build: use FORTIFY_SOURCE=3 in CMake buildfanquake2023-02-131-1/+1
|/
* Merge pull request #1414 from azat/build/deprecate-autotoolsAzat Khuzhin2023-02-132-242/+100
|\ | | | | Deprecate autotools build
| * Remove extra builds for autotools on CIAzat Khuzhin2023-02-121-180/+38
| | | | | | | | | | | | | | | | 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.
| * ci: bump cache and checkout pluginsAzat Khuzhin2023-02-121-23/+23
| |
| * ci: fix paths-ignoreAzat Khuzhin2023-02-121-14/+12
| |
| * .github/workflows/build.yml: remove trailing whitespacesAzat Khuzhin2023-02-121-15/+15
| |
| * Deprecate autotools buildAzat Khuzhin2023-02-121-16/+18
| |
* | test: enable allocator_may_return_null=1 for calloc with ENOMEM testAzat Khuzhin2023-02-122-6/+17
| |
* | test: handle -v as --verbose for regressAzat Khuzhin2023-02-121-2/+2
| |
* | test: add del_wait/del_notify tests for windowsAzat Khuzhin2023-02-121-92/+93
|/ | | | Test manually, since CI is too slow
* Fix compilation on non recent windows SDKs (#1399)Edoardo Lolletti2023-02-121-1/+0
| | | | | 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.
* test: fix leaks in bufferevent_pair_release_lock (#1413)Azat Khuzhin2023-02-121-26/+2
|
* Remove suppression for test_ok under TSanAzat Khuzhin2023-02-121-2/+0
| | | | There is no such tests yet.
* Merge branch 'tests-fixes'Azat Khuzhin2023-02-125-5/+20
|\ | | | | | | | | | | | | | | | | | | * 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
| * Add more ignore rulesAzat Khuzhin2023-02-121-0/+4
| | | | | | | | | | - for clangd - and compile_commands.json for it
| * test: fix debug locks in case new lock gots old addressAzat Khuzhin2023-02-121-1/+9
| | | | | | | | Refs: #1407
| * test: suppress logs from the tests that produce them under normal circumstancesAzat Khuzhin2023-02-121-2/+2
| |
| * test: fix TT_* flags valuesAzat Khuzhin2023-02-121-2/+2
| |
| * Suppress data race for test_ok variableAzat Khuzhin2023-02-121-0/+2
| |
| * Suppress data race for event_debug_created_threadable_ctx_ variableAzat Khuzhin2023-02-121-0/+1
|/
* Add LEV_OPT_BIND_IPV4_AND_IPV6 flag (#1400)Edoardo Lolletti2023-02-044-1/+42
| | | | | | | | | 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
* Add config for vim/nvimAzat Khuzhin2023-02-041-0/+15
|
* Fix pthread detection for regress tests on AndroidAzat Khuzhin2023-01-281-1/+4
| | | | Fixes: #1403
* Fixes some new warnings under clang-15Azat Khuzhin2023-01-273-12/+3
| | | | | | | | | | | | | | | | | | - -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; ^
* Allow evdns_base_new to succeed with no nameservers configured (#1389)Azat Khuzhin2023-01-274-19/+79
|\ | | | | | | | | | | * 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
| * Allow evdns_base_new to succeed with no nameservers configuredDaniel Kempenich2023-01-273-3/+41
| | | | | | | | | | | | 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.
| * Replace magic numbers with consts for evdns_base_resolv_conf_parse() errorsDaniel Kempenich2023-01-273-16/+38
|/
* Fix ignoring return value of arc4random() warning (with _FORTIFY_SOURCE defined)liaotonglang2023-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add CTestCostData.txt to gitignoreAzat Khuzhin2023-01-151-0/+1
|
* buffer: use pread() for evbuffer_file_segment_materialize()Dmitry Antipov2023-01-023-3/+21
| | | | | | | 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>
* Allow CLI override of CMAKE_DEBUG_POSTFIX (#1391)mdavidsaver2022-12-161-1/+3
| | | Allows cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX= for a debug build with the regular library names.
* ci: add CIFuzz Github action (#1382)DavidKorczynski2022-11-261-0/+35
| | | | Signed-off-by: David Korczynski <david@adalogics.com> Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
* Fix script for updating contributorsAzat Khuzhin2022-11-201-3/+3
|
* cmake: remove redundant _GNU_SOURCE definitionAzat Khuzhin2022-11-201-1/+0
| | | | | | | | | 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
* Merge branch 'release-2.2-changelog-prepare'Azat Khuzhin2022-11-202-1848/+1851
|\ | | | | | | | | | | * release-2.2-changelog-prepare: Changelog skeleton Start new changelog for 2.2
| * Changelog skeletonAzat Khuzhin2022-11-201-0/+3
| |
| * Start new changelog for 2.2Azat Khuzhin2022-11-202-1849/+1849
|/
* Merge branch 'release-scripts'Azat Khuzhin2022-11-203-2/+69
|\ | | | | | | | | | | | | * release-scripts: Add a script to generate changelog Add a script to add new contributors Rellocate some text in CONTRIBUTORS.md
| * Add a script to generate changelogAzat Khuzhin2022-11-201-0/+43
| |
| * Add a script to add new contributorsAzat Khuzhin2022-11-201-0/+24
| |
| * Rellocate some text in CONTRIBUTORS.mdAzat Khuzhin2022-11-201-2/+2
|/
* cmake: do influence CMAKE_DEBUG_POSTFIX of the outer project (if any)Azat Khuzhin2022-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | 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