mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* malloc overlap?
@ 2004-06-30  9:36 jan
  2004-06-30  9:54 ` Sean Neakums
  0 siblings, 1 reply; 3+ messages in thread
From: jan @ 2004-06-30  9:36 UTC (permalink / raw)
  To: linux-kernel

This question is probably misplaced - sorry about that, but one has to start somewhere, and I think it isn't too far out. Here goes:

I am developing a program that mallocs a struct, which contains a pointer to another struct, which gets malloced. Then I realloc the first buffer to be one element larger and assign something to an element in the second element - and this action overwrites part of the second level struct. After much tracing I am now sure that the buffers somehow have come to overlap. Is this a known error? I imagine that if the kernel had this kind of problem, it wouldn't run far, but surely memory allocation is handled in the kernel?

I hope somebody can point me in the right direction - and thank you for helping! I am not on the list, so please reply directly.

/jan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-08  2:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-30  9:36 malloc overlap? jan
2004-06-30  9:54 ` Sean Neakums
2004-07-08  2:31   ` Robert White

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®