Weird memory problem, accessing certain data corrupts other data.

I am having a problem where within a heap-allocated object, a function is called that does some manual data copying, essentially copying the contents of one buffer into another. Later in the function, certain accesses to data objects start creating segmentation faults. However if I comment out the large data buffer copy, things are fine.

I would post the code but there is a lot of it needed to give proper context. Instead I am hoping someone can suggest what to do to debug this properly or give suggestions on what kind of thing might create this problem. The stack trace ultimately points to malloc() from libc.so.6.

If there is any other info I can provide without just posting pages of code please let me know too!
> what kind of thing might create this problem.
accessing out of bounds
bad memory management (double delete)

> The stack trace ultimately points to malloc()
that's useless, look above that.
Topic archived. No new replies allowed.