googletest/googlemock/test
Victor Costan 1324e2d706 Remove multiple inheritance from "unintesting call" mock classes.
Internal CL 156157936, which was published in commit
fe402c2779, introduced undefined behavior
by casting a base class (internal::{Naggy,Nice,Strict}Base<MockClass>,
using the curiously recurring template pattern) pointer to a derived
class ({Naggy,Nice,Strict}Mock<MockClass>), in the base class'
constructor. At that point, the object isn't guaranteed to have taken on
the shape of the derived class, and casting is undefined behavior.

The undefined behavior was caught by Chrome's CFI build bot [1], and
prevents rolling googletest past that commit / CL.

This commit simplifies the {Naggy,Nice,Strict}Mock class hierarchy in
a way that removes the undefined behavior.

[1] https://www.chromium.org/developers/testing/control-flow-integrity
2018-04-12 00:48:30 -07:00
..
BUILD.bazel Adding tests to googlemock bazel 2018-01-26 16:30:57 -05:00
gmock_all_test.cc cont 2018-04-09 15:23:00 -04:00
gmock_ex_test.cc move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock_leak_test_.cc move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock_leak_test.py move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock_link2_test.cc move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock_link_test.cc move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock_link_test.h Merges-1 2018-03-05 12:26:15 -05:00
gmock_output_test_.cc merging 2018-04-10 16:22:50 -04:00
gmock_output_test_golden.txt Merging gMock, 2 2018-04-05 16:09:17 -04:00
gmock_output_test.py merges 2018-02-09 10:41:09 -05:00
gmock_stress_test.cc Code merges 2018-01-26 11:57:58 -05:00
gmock_test_utils.py merges 2018-02-09 10:41:09 -05:00
gmock_test.cc Code merges 2018-01-26 11:57:58 -05:00
gmock-actions_test.cc merge 2018-04-10 16:10:34 -04:00
gmock-cardinalities_test.cc Use gender-neutral pronouns in comments and docs 2017-09-27 13:31:13 +01:00
gmock-generated-actions_test.cc more 2018-04-11 09:55:36 -04:00
gmock-generated-function-mockers_test.cc Use std::string and ::string explicitly in gtest and gmock code. 2017-05-15 17:53:04 -04:00
gmock-generated-internal-utils_test.cc move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock-generated-matchers_test.cc Fix tests with VS2015 and VS2017 2017-10-25 16:04:01 +03:00
gmock-internal-utils_test.cc merging, gmock -1 2018-03-22 15:35:37 -04:00
gmock-matchers_test.cc Have to wait for this one 2018-04-05 11:59:59 -04:00
gmock-more-actions_test.cc msvc 14 2018-04-09 11:48:02 -04:00
gmock-nice-strict_test.cc Remove multiple inheritance from "unintesting call" mock classes. 2018-04-12 00:48:30 -07:00
gmock-port_test.cc move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock-spec-builders_test.cc Merging gMock, 2 2018-04-05 16:09:17 -04:00