From 70c4a690585d78b364f011e7b20a55069d738e48 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 16 Jun 2012 12:34:06 +0400 Subject: [PATCH] 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. --- tests/test_cpp.cc | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.40.0