title: How do I debug a memory issue in Rust?
body: <p>I hope this question isn't too open-ended. I ran into a memory issue with Rust, where I got <a href="https://stackoverflow.com/q/38254647/859279">an "out of memory" from calling <code>next</code> on an <code>Iterator</code> trait object</a>. I'm unsure how to debug it. Prints have only brought me to the point where the failure occurs. I'm not very familiar with other tools such as <a href="http://jvns.ca/blog/2016/06/15/using-ltrace-to-debug-a-memory-leak" rel="nofollow noreferrer">ltrace</a>, so although I could create a trace (231MiB, pff), I didn't really know what to do with it. Is a trace like that useful? Would I do better to grab gdb/lldb? Or Valgrind?</p>