Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.1.12 stable pull #1045

Merged
merged 122 commits into from Jul 5, 2020
Merged

Conversation

azat
Copy link
Member

@azat azat commented Jun 28, 2020

This is PR for the 2.1.12 release.

ABI compatibility:

Version Date Soname ChangeLog BackwardCompatibility AddedSymbols RemovedSymbols HeadersDiff
current 2020-06-2822:14 2.1.7 changelog 100% 2 new 0 3
2.1.11 2019-08-01 2.1.7 changelog 78.43%changed SONAME 0 0 6
AddedSymbols:
  • evutil_inet_pton_scope

azat and others added 30 commits June 28, 2020 21:14
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: libevent#858

(cherry picked from commit 3f09e92)
Fixes: libevent#865
(cherry picked from commit 101fbe3)
signal_int is uninitialized in the !base error path.

Signed-off-by: David Disseldorp <ddiss@samba.org>
(cherry picked from commit a027629)
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>
(cherry picked from commit 7d71214)
Call event_debug_note_teardown_ before evcb_evfinalize to avoid possible
UAF (if finalizer free's event).

(cherry picked from commit 445027a)
v2: Disable non-html generator for doxygen by default
v3: convert cmake option to doxygen config
(cherry picked from commit 1d1c190)
v2: disable man pages by default
(cherry picked from commit f9c6a14)
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]: libevent#833 (comment)

This reverts commit 497ef90.

Reported-by: mikulas@twibright.com
Backport-to: 2.1
(cherry picked from commit ddacaef)
- 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: libevent#870
Fixes: 3f09e92 ("Change the minimum version of automake to 1.13 and autoconf to 2.67")
(cherry picked from commit 13b8fc3)
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: libevent#890
Suggested-by: Pierce Lopez
(cherry picked from commit 86f55b0)
Fixes: 86f55b0 ("arc4random: replace sysctl() with getrandom (on linux)")
(cherry picked from commit 194a5d8)
Reported-by: Maxim Gorbachyov <maxim.gorbachyov@gmail.com>
(cherry picked from commit c3f3534)
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: 6a81b1f ("Avoid double-free on error in evbuffer_add_file. Found by coverity.")
Backport-to: 2.1
(cherry picked from commit 4727150)
* upstream/pr/899:
  improve the description of parameter to evbuffer_read()
  regress_buffer: improve testcase for evbuffer_freeze()

(cherry picked from commit a977d69)
(cherry picked from commit 8d5c565)
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>
(cherry picked from commit af4b07a)
kevent::udata was switched from intptr_t to void*.

Handle both cases with the GCC extension typeof().

(cherry picked from commit 72e6eff)
It had been deprecated for a long time (AFAIK), but since
glibc-2.29.9000-309-g744e829637 it produces a #warning

(cherry picked from commit b9b9f19)
Don't override any -DCMAKE_MODULE_PATH= passed from CLI
to eg. test custom Platform/ support.

(cherry picked from commit 84affc1)
@azat azat added the releases label Jun 28, 2020
@azat
Copy link
Member Author

azat commented Jun 28, 2020

export test failures (@ygj6 can you take a look?)

@ygj6 can you take a look?

@ygj6
Copy link
Member

ygj6 commented Jul 2, 2020

export test failures (@ygj6 can you take a look?)

Sorry for the delay.
By comparing the source code and test verification, it is found that the two commits are not merged in azat:release-2.1.12-stable-pull.
9adc9f1
ce8be23
In addition, you need to adjust Libevent 2.2.0 to Libevent 2.1.0 in test-export/CMakeLists.txt.
I have verified on the release-2.1.12 branch,Please check.
ygj6@410552a

@azat
Copy link
Member Author

azat commented Jul 2, 2020

@ygj6 many thanks!

@ygj6 ygj6 self-requested a review July 3, 2020 01:22
@ygj6 ygj6 marked this pull request as draft July 3, 2020 01:24
@ygj6 ygj6 removed their request for review July 3, 2020 02:06
@ygj6 ygj6 marked this pull request as ready for review July 3, 2020 02:12
@azat
Copy link
Member Author

azat commented Jul 4, 2020

azat added 8 commits July 5, 2020 11:36
(cherry picked from commit e2f938c)
UBSAN reports:
  test/regress_buffer.c:2360:2: runtime error: null pointer passed as argument 1, which is declared to never be null
  /usr/include/string.h:140:33: note: nonnull attribute specified here

(cherry picked from commit ba19b35)
Some requests may get response (evutil_addrinfo) from gaic_server_cb,
in case of cancel_event (10000ms) will not be fast enough.

(cherry picked from commit 90bcf2d)
Fixes main/fork under ASAN (LSAN if to be precise)

* fix-signal-leak:
  select: requires reinit (otherwise it leaks signal handlers)
  poll: requires reinit (otherwise it leaks signal handlers)

(cherry picked from commit f6bfa8b)
Fixes: 512c88c ("ci/linux: add dist check")
(cherry picked from commit e9a6b12)
@azat azat merged commit 5df3037 into libevent:patches-2.1 Jul 5, 2020
@azat azat deleted the release-2.1.12-stable-pull branch July 12, 2020 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet