[Bug 255915] net-im/licq: Fix null pointer accesses in googletest framework

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 06 Jun 2021 18:15:27 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255915

--- Comment #2 from commit-hook_at_FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/ports/commit/?id=4572c48fc4d2a3326e85380b3f658dc8e1721817

commit 4572c48fc4d2a3326e85380b3f658dc8e1721817
Author:     Dimitry Andric <dim_at_FreeBSD.org>
AuthorDate: 2021-05-15 22:49:52 +0000
Commit:     Dimitry Andric <dim_at_FreeBSD.org>
CommitDate: 2021-06-06 18:13:58 +0000

    net-im/licq: apply googletest patches which fix null pointer accesses

    During an exp-run for llvm 12 (see bug 255570), it turned out that
    net-im/licq does not build with clang 12.0.0:

    [ 92%] Running unit test
    cd /wrkdirs/usr/ports/net-im/licq/work/.build/src && /usr/local/bin/ctest
    Test project /wrkdirs/usr/ports/net-im/licq/work/.build/src
        Start 1: licq
    1/1 Test #1: licq .............................***Exception: SegFault  0.03
sec

    This is due to licq using a relatively ancient version of googletest,
    which has a few issues with more modern compilers. In particular, it
    does not handle mocking methods with move-only return types, and in the
    case of this port, this leads to a null pointer access and consequently
    a segfault.

    To fix the null pointer accesses, apply a few upstream googletest
    commits.

    Approved by:    maintainer timeout (2 weeks)
    PR:             255915
    MFH:            2021Q2

 net-im/licq/Makefile                               |   2 +-
 ...party_gmock_include_gmock_gmock-actions.h (new) |  92 +++++++++++
 ...gmock_include_gmock_gmock-spec-builders.h (new) | 183 +++++++++++++++++++++
 ...ude_gmock_internal_gmock-internal-utils.h (new) |  38 +++++
 ...3rdparty_gmock_src_gmock-spec-builders.cc (new) |  29 ++++
 ...gtest_include_gtest_internal_gtest-port.h (new) |  34 ++++
 6 files changed, 377 insertions(+), 1 deletion(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Sun Jun 06 2021 - 18:15:27 UTC

Original text of this message