Any tools to track heap/stack corruptions?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Feb 3 15:59:28 UTC 2021


On Wed, Feb 03, 2021 at 03:47:34PM +0000, Imperatorn via Digitalmars-d-learn wrote:
> On Wednesday, 3 February 2021 at 14:00:23 UTC, JN wrote:
> > I am dealing with some nasty issue in my code. Basically random
> > unrelated lines of code are crashing with access violations, and if
> > I switch from dmd to ldc the crash goes away, or crash comes back,
> > or it crashes in a different spot. Seems like I am corrupting some
> > memory somewhere (I interact a lot with C libraries). Do you know of
> > any tools I could use to try to narrow it down?
[...]
> Or dustmite?
> https://dlang.org/blog/2020/04/13/dustmite-the-general-purpose-data-reduction-tool/

Dustmite generally does not do well with errors that move around and/or
occasionally go away when the code changes slightly.  It tends to
misidentify the problem in such cases and reduce to something that isn't
related to the original program.  It's more suitable for problems that
are 100% reliably reproduced.  Pointer bugs / memory corruption often do
not fall into that category.


T

-- 
It is not the employer who pays the wages. Employers only handle the money. It is the customer who pays the wages. -- Henry Ford


More information about the Digitalmars-d-learn mailing list