From: Ivan Maidanski Date: Sat, 16 Jun 2012 08:34:06 +0000 (+0400) Subject: Fix test_cpp (ensure the collector recognizes pointers to interiors) X-Git-Tag: gc7_4_0~272 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70c4a690585d78b364f011e7b20a55069d738e48;p=gc Fix test_cpp (ensure the collector recognizes pointers to interiors) * tests/test_cpp.cc (main): Call GC_set_all_interior_pointers(1) before GC_INIT to ensure that the collector considers pointers to object interiors as valid ones (such a pointer could emerge as a result of a type cast to subclass in case of multiple inheritance); add comment. --- diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 597d8088..5197b0e4 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -210,6 +210,9 @@ int APIENTRY WinMain( HINSTANCE instance ATTR_UNUSED, int main( int argc, char* argv[] ) { #endif + GC_set_all_interior_pointers(1); + /* needed due to C++ multiple inheritance used */ + GC_INIT(); int i, iters, n;