|
98b7ca30
|
2024-11-02T21:39:57
|
|
http: allow passing in pre-existing connection bev (#1722)
This patch adds functionality to pass a pre-existing connection
as a bufferevent to `evhttp_connection_base_bufferevent_reuse_new`.
When the bufferevent has an existing fd, the evcon starts
in state `EVCON_IDLE` so that requests can be made immediately.
Signed-off-by: Kirill Rodriguez <theoden8@tutamail.com>
Signed-off-by: Kirill Rodriguez <theoden8@tutamail.com>
Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
|
|
d6dbd7f8
|
2024-11-03T01:26:59
|
|
Windows platform supports reading IPv6 addresses for DNS server. (#1701)
When using libevent on the Windows platform in an IPv6 environment, I found that libevent could not read the DNS server address for IPv6 addresses during DNS initialization, resulting in constant DNS resolution failures. Then, on MSDN, I discovered that the GetNetworkParams interface does not support obtaining IPv6 addresses, and they provided another interface, GetAdaptersAddresses, to obtain both IPv4 and IPv6 addresses. Therefore, I replaced the GetNetworkParams interface with the GetAdaptersAddresses interface. Please review whether this modification can be merged into the master branch.
Reference MSDN documentation:
https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getnetworkparams
https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses
Co-authored-by: alphacheng <alphacheng@tencent.com>
Co-authored-by: Azat Khuzhin <azat@libevent.org>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
|
|
e219dd4a
|
2024-11-02T00:53:31
|
|
return EAI_ADDRFAMILY instead of NULL (propagate to caller)
Signed-off-by: Kirill Rodriguez <theoden8@gmail.com>
|
|
6f35d4df
|
2024-10-31T14:52:44
|
|
probably platform caching at work too, let's make different nodenames
Signed-off-by: Kirill Rodriguez <theoden8@gmail.com>
|
|
d2facdae
|
2024-10-31T10:18:22
|
|
hitting cache makes cancel stress test unreliable
Signed-off-by: Kirill Rodriguez <theoden8@gmail.com>
|
|
ca163ff1
|
2024-10-28T08:34:12
|
|
test: fix retries of signal tests on apple
|
|
5e427ad9
|
2024-10-28T08:23:48
|
|
test: rename signal tests (simple_signal and simple_signal_re_order)
|
|
25fa9c77
|
2024-10-28T22:20:10
|
|
test: retry signal tests with SIGALRM no OSX
By some reason even after first ALRM signal received and event loop
returned it is possible to recieve an ALRM one more time (at least one):
% yes signal/simple_signal.. | head -n 1000 | xargs -I{} -P10 sh -c 'EVENT_DEBUG_LOGGING_ALL= bin/regress --timeout 0 --verbose {} >& /tmp/test.$SECONDS.$RANDOM.log'
% cat /tmp/test.0.18384.log
signal/simple_signal: [forking] [debug] event_add: event: 0x16d70f368 (fd 14), call 0x102704ae8
[debug] evsig_ensure_saved_: evsignal (14) >= sh_old_max (0), resizing
OK /Users/ec2-user/libevent/test/regress.c:1086: assert(setitimer(ITIMER_REAL, &itv, NULL) == 0): 0 vs 0[debug] kq_dispatch: kevent reports 1
[debug] event_active: 0x16d70f368 (fd 14), res 8, callback 0x102704ae8
[debug] event_process_active: event: 0x16d70f368, call 0x102704ae8
[debug] event_del: 0x16d70f368 (fd 14), callback 0x102704ae8
[debug] event_base_loop: no events registered.
FAIL /Users/ec2-user/libevent/test/regress.c:1062: ALRM received not from event loop![debug] event_del: 0x16d70f368 (fd 14), callback 0x102704ae8
[debug] event_base_free_: 0 events freed
signal/simple_signal: exited with 0 (0)
[FAILED signal/simple_signal (0 retries)]
signal/simple_signal_re_order: [forking] [debug] event_add: event: 0x16d70f368 (fd 14), call 0x102704ae8
[debug] evsig_ensure_saved_: evsignal (14) >= sh_old_max (0), resizing
[debug] event_del: 0x16d70f368 (fd 14), callback 0x102704ae8
[debug] event_add: event: 0x16d70f368 (fd 14), call 0x102704ae8
OK /Users/ec2-user/libevent/test/regress.c:1086: assert(setitimer(ITIMER_REAL, &itv, NULL) == 0): 0 vs 0[debug] kq_dispatch: kevent reports 1
[debug] event_active: 0x16d70f368 (fd 14), res 8, callback 0x102704ae8
[debug] event_process_active: event: 0x16d70f368, call 0x102704ae8
[debug] event_del: 0x16d70f368 (fd 14), callback 0x102704ae8
[debug] event_base_loop: no events registered.
[debug] event_del: 0x16d70f368 (fd 14), callback 0x102704ae8
[debug] event_base_free_: 0 events freed
signal/simple_signal_re_order: exited with 0 (0)
1/2 TESTS FAILED. (0 skipped)
Also note, that the problem not only when I run two tests, but only one
as well:
% bin/regress --timeout 0 --repeat 1000 --verbose --no-fork signal/simple_signal >/tmp/test2.log 2>&1
signal/simple_signal:
OK /Users/ec2-user/libevent/test/regress.c:1086: assert(setitimer(ITIMER_REAL, &itv, NULL) == 0): 0 vs 0
signal/simple_signal:
OK /Users/ec2-user/libevent/test/regress.c:1086: assert(setitimer(ITIMER_REAL, &itv, NULL) == 0): 0 vs 0
FAIL /Users/ec2-user/libevent/test/regress.c:1062: ALRM received not from event loop!
I've tried to run under "ktrace trace -Ss -f C4,S0x010c -c" but of
course it does not fails under it (dtruss by some reason did not work
for me).
P.S. Also remove one TT_RETRIABLE for one test, since only setitimer()
causes this.
|
|
29a3eee5
|
2024-10-28T22:06:29
|
|
test: add --repeat option into tinytest
|
|
7b14bc16
|
2024-10-28T10:06:45
|
|
test: add fallback for SIGALRM
|
|
c94b3825
|
2024-10-28T10:03:17
|
|
test: do not ignore setitimer() failures
|
|
f84896d3
|
2024-10-28T20:50:29
|
|
dns: Return DNS query type on error (#1220)
When calling the user callback after a DNS resolution on error, make
sure to send back the query type (A, AAAA, PTR).
Closes #1219
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
342a0faa
|
2024-10-27T16:41:12
|
|
Avoid loosing previously active events in case of EV_TIMEOUT
Previously all the existing events was lost if the timeout had been
triggered on that event.
Fixes: #1530
|
|
e30b215f
|
2024-10-24T06:28:53
|
|
Add caching for evdns (#1717)
No evdns will do caching by default (with respect to TTL), to disable this set EVDNS_BASE_NO_CACHE
There are also helpers for manually manage the cache:
- evdns_cache_write()
- evdns_cache_lookup()
Initial PR: #571
Fixes: #1715
Co-authored-by: Greg Hazel <ghazel@gmail.com>
Co-authored-by: Keith Moore <kmoore@clostra.com>
|
|
b2192269
|
2024-10-20T23:52:33
|
|
Fix notifying the base in a different thread after removing active timer event
The base should be notified in case of timer removal if that was the
minimal timer in the base.
Reported-by: @moihn (who is also provided the reproducer on which this
test is based on)
Fixes: https://github.com/libevent/libevent/issues/1727
|
|
970a258b
|
2024-10-21T10:02:33
|
|
CI and tests fixes (#1719)
|
|
ae635d4b
|
2024-10-20T21:47:17
|
|
add explicit check for linux
|
|
c923a184
|
2024-10-15T21:02:53
|
|
getaddrinfo with localhost does not necessarily read files
|
|
5755befd
|
2024-10-15T12:44:09
|
|
fix a Werror error
|
|
370d9924
|
2024-10-15T12:33:52
|
|
mbedtls3 does not support tls<1.3, and tls<1.3 does not support renegotiations. therefore, disable
|
|
77fed760
|
2024-10-20T21:57:02
|
|
tests: add a test for event_free() from callback handler for signals
Refs: https://github.com/libevent/libevent/issues/1287
|
|
d1a90d09
|
2024-08-07T17:20:46
|
|
tests: Fix potential NULL pointer dereference
|
|
00c94bea
|
2024-07-22T21:47:53
|
|
ws: allow Upgrade in Connection header anywhere
This will make it work for Firefox, which uses "Connection: keep-alive, Upgrade"
Reimplemented our own evutil_ascii_strcasestr function (same as
non-portable strcasestr)
|
|
9848df54
|
2024-07-26T22:53:30
|
|
http: disallow empty header names (#1690)
In theory, we could be more strict, since there is only a subset of allowed characters:
> ```
> tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
> / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
> / DIGIT / ALPHA
> ; any VCHAR, except delimiters
> ```
But I'd skip such verification, unless there is a legitimate interest (versus performances).
Fixes: #1686
|
|
5485887c
|
2024-06-24T14:19:12
|
|
Check against EVUTIL_INVALID_SOCKET
|
|
3f799ab6
|
2024-04-22T15:31:10
|
|
test/test-changelist: add proper exit path
|
|
6f9f2f3a
|
2024-04-10T17:25:54
|
|
test/test-changelist.c: fix potential NULL pointer dereference
|
|
66428fb9
|
2024-07-08T10:15:29
|
|
test-closed: fix -Werror=maybe-uninitialized
Follow-up for: https://github.com/libevent/libevent/pull/1680
|
|
272bd7dd
|
2024-07-08T10:13:08
|
|
Fix potential Null pointer dereference in test-closed.c (#1680)
* Fix potential Null pointer dereference in test-closed.c
* add err path
* code review: goto err after evutil_socketpair failure
* code review: goto err for event_config_new failure
---------
Co-authored-by: icy17 <1061499390@qq.com>
|
|
2bc831c8
|
2024-07-08T10:08:58
|
|
Fix potential Null pointer dereference in test-time.c (#1681)
* Fix potential Null pointer dereference in test-time.c
* add err path
* code review: free events before base
---------
Co-authored-by: icy17 <1061499390@qq.com>
|
|
8dd92069
|
2024-06-24T03:15:23
|
|
Fix potential Null pointer dereference in bench_httpclient.c (#1676)
Co-authored-by: icy17 <1061499390@qq.com>
|
|
5d830362
|
2024-06-24T03:12:39
|
|
Fix potential Null pointer dereference in regress_dns.c (#1675)
Co-authored-by: icy17 <1061499390@qq.com>
|
|
6d8c38af
|
2024-06-02T10:31:11
|
|
Reducing the number of mingw warnings
|
|
13678f37
|
2024-06-02T00:53:58
|
|
gcc: fix some compiler errors from the new GCC (#1658)
gcc: fix some compiler errors from the new GCC
|
|
f5b61043
|
2024-05-20T11:53:24
|
|
test: use evutil_timerclear over timerclear
|
|
b202a72b
|
2024-05-24T05:31:27
|
|
temp size assert for #1632
|
|
e58f1fa6
|
2024-05-20T09:27:52
|
|
Fix the -Wint-conversion
---------
Signed-off-by: Andy Pan <i@andypan.me>
|
|
ceb6551f
|
2024-05-19T00:18:48
|
|
gcc: fix the -Wincompatible-pointer-types errors
---------
Signed-off-by: Andy Pan <i@andypan.me>
|
|
7a9458c0
|
2024-05-20T17:17:45
|
|
Don't try to set SO_REUSEADDR and SO_REUSEPORT on Unix sockets (#1625)
|
|
0f51ba66
|
2024-05-06T09:10:15
|
|
test: mark http/timeout_read_server as retriable
|
|
ba97d947
|
2024-05-05T21:35:46
|
|
test: reset some static vars to avoid affecting other tests
|
|
479b5ed6
|
2024-05-05T21:30:01
|
|
test: fix printing number of retries for FAILED message
|
|
d538f41f
|
2024-05-05T21:12:14
|
|
test: add debugging for bufferevent/bufferevent_connect_fail_eventcb*
|
|
2d4d1747
|
2024-05-05T22:15:56
|
|
test: suppress logging for buffer/add_file_leak1
Warnings from this test should be ignored:
[warn] evbuffer_file_segment_materialize: mmap(5, 0, 0) failed: Invalid argument
|
|
93a76aa2
|
2024-05-05T20:20:27
|
|
test: add proper message in case of test failure
Right now it is impossible to understand what had been failed, but
after:
$ regress thread/conditions_simple
thread/conditions_simple: [forking]
FAIL /src/le/libevent/test/regress_thread.c:385: assert(n_signal == 0): 1 vs 0
[RETRYING thread/conditions_simple (attempts left 2, delay 1 sec)]
thread/conditions_simple: [forking]
FAIL /src/le/libevent/test/regress_thread.c:385: assert(n_signal == 0): 1 vs 0
[RETRYING thread/conditions_simple (attempts left 1, delay 1 sec)]
thread/conditions_simple: [forking]
FAIL /src/le/libevent/test/regress_thread.c:385: assert(n_signal == 0): 1 vs 0
[RETRYING thread/conditions_simple (attempts left 0, delay 1 sec)]
thread/conditions_simple: [forking]
FAIL /src/le/libevent/test/regress_thread.c:385: assert(n_signal == 0): 1 vs 0
[conditions_simple FAILED]
[FAILED thread/conditions_simple (attempts made -1)]
1/1 TESTS FAILED. (0 skipped)
|
|
d5745413
|
2024-05-05T20:15:22
|
|
test: fix RETRYING message (add missing group prefix)
Before:
$ regress thread/conditions_simple
thread/conditions_simple: [forking]
FAIL /src/le/libevent/test/regress_thread.c:385: assert(n_signal == 0): 1 vs 0
[RETRYING conditions_simple (attempts left 2, delay 1 sec)]
After:
$ regress thread/conditions_simple
thread/conditions_simple: [forking]
FAIL /src/le/libevent/test/regress_thread.c:385: assert(n_signal == 0): 1 vs 0
[RETRYING thread/conditions_simple (attempts left 2, delay 1 sec)]
|
|
eec47a67
|
2024-04-30T15:59:58
|
|
Fix typos (#1634)
|
|
aef201a9
|
2024-04-29T13:35:33
|
|
Change ident for EVFILT_USER to 0 and add a test (#1582)
Conventionally, ident for EVFILT_USER is set to 0 to avoid
collision of file descriptors, which is what other renowned
networking frameworks like netty(java), mio(rust), gnet(go),
swift-nio(swift), etc. do currently.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
147298a2
|
2024-04-24T11:14:47
|
|
Fix some comments
Signed-off-by: dockercui <dockercui@aliyun.com>
|
|
9de85b58
|
2024-04-05T20:42:37
|
|
fix WSOptions enum value and extended payload length bug
|
|
6e390911
|
2024-04-10T17:42:01
|
|
Fix potential Null pointer dereference in regress_buffer.c
|
|
74217832
|
2024-04-10T15:47:57
|
|
Fix potential Null pointer dereference in regress.c
|
|
d6e88352
|
2024-04-10T17:45:03
|
|
Fix potential Null pointer dereference in regress_et.c
|
|
d45dca43
|
2024-04-10T17:39:36
|
|
Fix potential Null pointer dereference in regress_thread.c
|
|
2bdf1737
|
2024-04-10T16:18:27
|
|
Fix potential Null pointer dereference in regress_finalize.c
|
|
17796a2d
|
2024-04-10T15:32:54
|
|
Fix potential Null pointer dereference in regress_http.c
|
|
f9526e13
|
2024-04-10T15:16:21
|
|
Fix potential NULL pointer dereference in regress_bufferevent.c
|
|
fc48803d
|
2024-04-15T15:02:27
|
|
Fix potential Null pointer dereference in regress_zlib.c (#1597)
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
|
|
539f73e3
|
2024-02-20T09:30:22
|
|
Fix leak in evbuffer_add_file() on empty files
Found by oss-fuzz, after coverage had been improved in google/oss-fuzz#11257
v2: adjust test
v3: fix for windows (_get_osfhandle() crashes when called on closed fd)
v4: fix for EVENT__DISABLE_MM_REPLACEMENT
|
|
9c8860ec
|
2024-03-11T15:50:43
|
|
chore: remove repetitive words
Signed-off-by: tgolang <seekseat@aliyun.com>
|
|
e66df92c
|
2024-03-07T16:19:11
|
|
Accept SOCK_NONBLOCK/SOCK_CLOEXEC in type argument of socketpair (#1567)
Setting `SOCK_NONBLOCK` and `SOCK_CLOEXEC` in the `type` argument of `socketpair()` is widely supported across UNIX-like OS: Linux, *BSD, Solaris, etc., as is the `socket()`. This will conserve several extra system calls, we should use it where available.
### References
- [socketpair(2) on Linux](https://man7.org/linux/man-pages/man2/socketpair.2.html#HISTORY)
- [socketpair(2) on FreeBSD](https://man.freebsd.org/cgi/man.cgi?query=socketpair&sektion=2#DESCRIPTION)
- [socketpair(2) on DragonFly](https://man.dragonflybsd.org/?command=socketpair§ion=2)
- [socketpair(2) on NetBSD](https://man.netbsd.org/socketpair.2#DESCRIPTION)
- [socketpair(2) on OpenBSD](https://man.openbsd.org/socketpair.2)
- [socketpair(3C) on Solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/socketpair-3c.html)
Changelog:
- Set SOCK_NONBLOCK and SOCK_CLOEXEC in the type argument of socketpair
- Avoid EPROTOTYPE on macOS and OpenBSD
- Eliminate the warnings about unused variables
- Add some comments
|
|
e4b87327
|
2024-02-20T08:58:04
|
|
Fix integer-overflow in ev_token_bucket_cfg_new
Found by oss-fuzz, after coverage had been improved in https://github.com/google/oss-fuzz/pull/11257
v2: better check (found by CI for windows)
|
|
c4fb0f76
|
2024-02-20T08:58:04
|
|
Fix divide-by-zero in ev_token_bucket_get_tick_
Found by oss-fuzz, after coverage had been improved in https://github.com/google/oss-fuzz/pull/11257
|
|
0dbd3eb3
|
2024-02-18T16:06:28
|
|
tests: add test for EV_SIGNAL with timeout
Refs: https://github.com/libevent/libevent-book/issues/12
|
|
ed35b30f
|
2023-10-23T16:52:19
|
|
Fix two compiler errors for unused variable and undefined function
In buffer.c a variable "flags" and a label "done" are defined but
never used if "EVENT__HAVEMMAP" is not defined.
The code does not work on platforms which do not provide
the function `socketpair()`. Introduce EVENT__HAVE_SOCKETPAIR flag
which determines if `socketpair()` or `evutil_ersatz_socketpair()`
is used.
|
|
87cdcc18
|
2024-02-18T15:24:58
|
|
http: change error for corrupted requests to 400 Bad Request
Previously it was 413 Request Entity Too Large, which was odd.
|
|
e60d039d
|
2024-02-18T15:02:59
|
|
tests: add a test for malformed chunks
v2: fix test for win32 (and it more correct in general)
|
|
4c38de8c
|
2023-11-26T20:52:32
|
|
Fix -Walloc-size (#1526)
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
c15ba75d
|
2023-09-22T09:35:42
|
|
Merge branch 'evbuffer_add_reference_with_offset' - #1513
* evbuffer_add_reference_with_offset:
Add a comment for evbuffer_ref_cleanup_cb
tests: simplify test_evbuffer_add_reference_with_offset
Add function evbuffer_add_reference_with_offset()
|
|
d9780cf9
|
2023-09-21T22:04:17
|
|
Fix -Wsingle-bit-bitfield-constant-conversion warning in clang 16
report:
/src/le/libevent/sample/becat.c:304:29: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
case 'k': o.extra.keep = 1; break;
|
|
cc3a9200
|
2023-09-21T22:02:48
|
|
tests: simplify test_evbuffer_add_reference_with_offset
|
|
648ec50e
|
2023-09-21T15:13:31
|
|
Add function evbuffer_add_reference_with_offset()
This is the same as evbuffer_add_reference(), but allows to specify
offset in the @data
v2: rename evbuffer_add_reference_misalign() to evbuffer_add_reference_with_offset()
|
|
f39ad1c4
|
2023-08-31T22:38:41
|
|
ws: replace evws_send with evws_send_text/evws_send_binary (ABI breakage) (#1500)
Replace evws_send with evws_send_text, and introduce new API -
evws_send_binary, that can be used to send binary frames.
But note, that this commit breaks the ABI compatibility, but it should be OK,
since there was only alpha release with evws_send, and nobody should rely on
this, and I hope nobody does (we decided to go this way to avoid supporting
deprecated API).
|
|
57d9eec6
|
2023-07-10T10:40:49
|
|
Disable signalfd by default
signalfd may behave differently to sigaction/signal, so to avoid
breaking libevent users (like [1], [2]) disable it by default.
[1]: https://github.com/tmux/tmux/pull/3621
[2]: https://github.com/tmux/tmux/pull/3626
Also signalfd is not that perfect:
- you need to SIG_BLOCK the signal before
- blocked signals are not reset on exec
- blocked signals are allowed to coalesce - so in case of multiple
signals sent you may get the signal only once (ok for most of the
signals, but may be a problem for SIGCHLD, though you may call
waitpid() in a loop or use pidfd)
- and also one implementation problem -
sigprocmask is unspecified in a multithreaded process
Refs:
- https://lwn.net/Articles/415684/
- https://ldpreload.com/blog/signalfd-is-useless
Refs: https://github.com/libevent/libevent/issues/1460
Refs: #1342 (cc @dmantipov)
|
|
227510d5
|
2023-07-13T22:20:33
|
|
Fix EVDNS_BASE_DISABLE_WHEN_INACTIVE (#1493)
I faced with strange problem: event loop doesn't exit after dns resolving with
`EVDNS_BASE_DISABLE_WHEN_INACTIVE`.
Stand:
- Ubuntu 22;
- libevent release-2.1.12-stable
- `resolve.conf` contains 2 nameservers;
- I use `evdns_base_new` with `EVDNS_BASE_DISABLE_WHEN_INACTIVE | EVDNS_BASE_INITIALIZE_NAMESERVERS` to avoid OS specific code.
After small investigation, look like events related with dns sockets added to
event_base before `evdns->disable_when_inactive` was initialized. `libevent`
did epoll_ctl(DEL) after resolving completed on the first socket, but the
second socket remained in the `epoll` interest list.
|
|
13366d27
|
2023-06-13T07:23:10
|
|
Test timer - synchronize clock before tv_timeout calculation.
|
|
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>
|
|
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
|
|
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)
^
|
|
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) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
|
|
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
|
|
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>
|
|
1df2a5a6
|
2023-02-12T17:05:20
|
|
test: enable allocator_may_return_null=1 for calloc with ENOMEM test
|
|
207ea62b
|
2023-02-12T16:46:40
|
|
test: handle -v as --verbose for regress
|
|
0ea20582
|
2023-02-12T21:39:04
|
|
test: add del_wait/del_notify tests for windows
Test manually, since CI is too slow
|
|
61de8a07
|
2023-02-12T15:47:16
|
|
test: fix leaks in bufferevent_pair_release_lock (#1413)
|
|
c257e16f
|
2023-02-12T08:34:52
|
|
test: fix debug locks in case new lock gots old address
Refs: #1407
|
|
fb900a28
|
2023-02-12T08:12:20
|
|
test: suppress logs from the tests that produce them under normal circumstances
|
|
1201bb85
|
2023-02-12T07:59:17
|
|
test: fix TT_* flags values
|
|
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;
^
|
|
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.
|
|
a7fffb5c
|
2023-01-17T23:02:56
|
|
Replace magic numbers with consts for evdns_base_resolv_conf_parse() errors
|
|
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>
|
|
3ec3b469
|
2022-10-23T13:47:23
|
|
ws: fix compile error on centos 7 - very old compiler (#1359)
* http: fix typo
* ws: fix comile error
On CentOS:
CC ws.lo
ws.c: In function 'get_ws_frame':
ws.c:244:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (int i = 0; i < payload_len; i++) {
^
ws.c:244:3: note: use option -std=c99 or -std=gnu99 to compile your code
|
|
c2ecb4ac
|
2022-10-12T14:13:44
|
|
Add locks for server WS, fixes #1357
|
|
aa163a4f
|
2022-10-04T21:42:30
|
|
Fix memleak in regress tests
|
|
88317a4e
|
2022-10-04T17:49:22
|
|
Add helpers and all regress tests are passed
|
|
f8bb9d84
|
2022-09-16T15:55:56
|
|
Fix socketpair failure when temporary directory has non-latin character
|
|
e8313084
|
2022-09-12T22:16:56
|
|
Add minimal WebSocket server implementation for evhttp (#1322)
This adds few functions to use evhttp-based webserver to handle incoming
WebSockets connections. We've tried to use both libevent and libwebsockets in
our application, but found that we need to have different ports at the same
time to handle standard HTTP and WebSockets traffic. This change can help to
stick only with libevent library.
Implementation was inspired by modified Libevent source code in ipush project
[1].
[1]: https://github.com/sqfasd/ipush/tree/master/deps/libevent-2.0.21-stable
Also, WebSocket-based chat server was added as a sample.
|
|
bb57cea3
|
2022-08-14T09:56:50
|
|
test: fix util/getaddrinfo for netbsd (v2)
Fixes: c198b0ce ("test: fix util/getaddrinfo for netbsd")
Fixes: #1316
|