4

I am aware that there has been a lot of questions asked about this, but they are quite old and situation may be different now. I am running fairly new gcc (4.9.2), libstdc++ 3.4.21 and valgrind 3.10.1. The problem is, as you might have guessed, that valgrind reports infamous "still reachable" blocks even for a simple program like this:

int main() { return 0; } 

(that's right, not even a single include)

Setting GLIBCPP_FORCE_NEW=1 or GLIBCXX_FORCE_NEW=1 doesn't solve the problem. Is there anyone who managed to find solution? Is there an alternative to these variables in newer gcc versions or people simply ignore it?

Thanks!

2
  • Possible duplicate of Valgrind: Memory still reachable with trivial program using <iostream> -- It's not about the memory pool but the dangling exception handling buffer so your environment variables has no effect. As of this writing, there is no other solution than adding a Valgrind suppression. Commented Nov 20, 2016 at 0:14
  • Thanks, this is how I "solved" it ultimately, now at least I know it's the only solution :) Commented Feb 13, 2017 at 21:12

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.