1

I have a legacy C++ code which is ported to Android. When calling free on strings, a random crash is occurring. Crash is observed in random places. Is there a tool which can be used to check the memory overruns?

Vinay
  • 4,743
  • 7
  • 33
  • 43
  • Are you really calling `free` on C++ data structures? Or are you just a C programmer using `free` instead of `delete` – Falmarri Oct 21 '10 at 17:45

2 Answers2

4

If it's due to an underlying bug that only happens to cause issues on Android, can you just run it on the legacy platform using Valgrind?

Oliver Charlesworth
  • 267,707
  • 33
  • 569
  • 680
  • Can Valgrind be run as static analyzer as it cannot be used inside Android? – Vinay Oct 21 '10 at 16:42
  • I don't know if Valgrind has been ported to Android. What I'm suggesting is that presumably this "legacy" application used to run on some other platform. Does Valgrind support that old platform? – Oliver Charlesworth Oct 21 '10 at 16:44
2

You could try my non-intrusive heap debugger.

Community
  • 1
  • 1
fredoverflow
  • 256,549
  • 94
  • 388
  • 662