From: Adam Wozniak <awozniak@comdev.cc>
To: <linuxppc-embedded@lists.linuxppc.org>
Subject: problems with shared memory
Date: Tue, 5 Mar 2002 16:37:29 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.33.0203051631130.24566-100000@rangers.comdev.cc> (raw)
I've got Linux 2.4.16 running on a custom MPC8260 board.
when I do the program below in a tight loop
i.e.
while true
do
./foo 8675 1024
done
Things pop after about 20 iterations. It'll choose a different spot
in the kernel to pop depending on what options I've compiled into the
kernel. I believe I've got some memory corruption going on. When I
poke around with a hardware debugger I see values in kernel structures
which clearly aren't right.
Any known problems with shared memory in the 2.4.16 kernel on the MPC8260?
This should be easy enough for someone to try to reproduce.
=== begin foo.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/shm.h>
int main (int argc, char **argv)
{
int j;
char *q;
int p;
p = shmget(atoi(argv[1]), atoi(argv[2]), IPC_CREAT | 0666);
q = shmat(p, NULL, 0);
printf("at @ %p \n", q);
{
int i;
for (i = 0; i < atoi(argv[2]); i++)
{
q[i]++;
}
}
shmdt(q);
}
=== end foo.c
--
Adam Wozniak (KG6GZR) COM DEV Broadband - Digital and Software Systems
awozniak@comdev.cc 805 Aerovista Place, San Luis Obispo, CA 93401
http://www.comdev.cc
Voice: (805) 544-1089 Fax: (805) 544-2055
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next reply other threads:[~2002-03-06 0:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-06 0:37 Adam Wozniak [this message]
2002-03-06 16:53 ` problems with shared memory Adam Wozniak
2002-03-06 16:53 ` Adam Wozniak
2002-03-07 12:53 ` Wolfgang Grandegger
2002-03-07 14:47 ` somshekar kadam
2002-03-07 16:32 ` Adam Wozniak
2002-03-08 14:06 ` Wolfgang Grandegger
2002-03-14 14:44 ` Adam Wozniak
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=Pine.LNX.4.33.0203051631130.24566-100000@rangers.comdev.cc \
--to=awozniak@comdev.cc \
--cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).