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
This is output when compiling (natively) on macOS systems, which is
confusing, because no cross-compilation is involved.
Split the message into separate cases.
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.
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.
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>
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.
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
1. In d4de062, in Feb 2010, libevent adopted OpenBSD implementation of
arc4random_uniform.
2. In
728918cba9,
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.
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.
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.
* 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
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
- -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;
^
* 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
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.