From 7caa902de558e7f882623190f9518aab0934c04d 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 c9944e74..d463b345 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -208,6 +208,9 @@ int APIENTRY WinMain( 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