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!

xba
  • 167
  • 2
  • 13
  • Possible duplicate of [Valgrind: Memory still reachable with trivial program using ](http://stackoverflow.com/questions/30376601/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. – Björn Lindqvist Nov 20 '16 at 00:14
  • Thanks, this is how I "solved" it ultimately, now at least I know it's the only solution :) – xba Feb 13 '17 at 21:12

0 Answers0