From: jan@talentex.demon.co.uk
To: linux-kernel@vger.kernel.org
Subject: malloc overlap?
Date: Wed, 30 Jun 2004 10:36:12 +0100 [thread overview]
Message-ID: <E1BfbVk-000PFO-0W@anchor-post-32.mail.demon.net> (raw)
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
next reply other threads:[~2004-06-30 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-30 9:36 jan [this message]
2004-06-30 9:54 ` Sean Neakums
2004-07-08 2:31 ` Robert White
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1BfbVk-000PFO-0W@anchor-post-32.mail.demon.net \
--to=jan@talentex.demon.co.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®