googletest/googlemock/include/gmock
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
..
internal ..and this should be it 2018-04-11 10:10:24 -04:00
gmock-actions.h merging 2018-04-11 15:33:31 -04:00
gmock-cardinalities.h move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock-generated-actions.h RE-Doing the merge, this time with gcc on mac in the PR so I can catch errors before merging the PR 2018-04-10 15:57:16 -04:00
gmock-generated-actions.h.pump RE-Doing the merge, this time with gcc on mac in the PR so I can catch errors before merging the PR 2018-04-10 15:57:16 -04:00
gmock-generated-function-mockers.h Merging gMock, 2 2018-04-05 16:09:17 -04:00
gmock-generated-function-mockers.h.pump Merging gMock, 2 2018-04-05 16:09:17 -04:00
gmock-generated-matchers.h Remove gcc 6 misleading indentations. 2017-10-25 17:53:01 +02:00
gmock-generated-matchers.h.pump RE-Doing the merge, this time with gcc on mac in the PR so I can catch errors before merging the PR 2018-04-10 15:57:16 -04:00
gmock-generated-nice-strict.h Remove multiple inheritance from "unintesting call" mock classes. 2018-04-12 00:48:30 -07:00
gmock-generated-nice-strict.h.pump Remove multiple inheritance from "unintesting call" mock classes. 2018-04-12 00:48:30 -07:00
gmock-matchers.h Upstream cl/192179348 2018-04-11 15:24:04 -04:00
gmock-more-actions.h move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00
gmock-more-matchers.h Revert "gmock actions 2" 2018-04-09 22:10:12 -04:00
gmock-spec-builders.h Remove multiple inheritance from "unintesting call" mock classes. 2018-04-12 00:48:30 -07:00
gmock.h Code merges 2018-01-26 11:57:58 -05:00