This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Memory access violation
- From: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 18 Feb 2008 10:04:13 -0800
- Subject: RE: [ECOS] Memory access violation
> From: Marcos Del Puerto
>
<snip>
>
> The point is that when I try to change any data of the payload of the
> pool entry, a memory access violation exception is raised. I also
> tried using a non-static class and the list nodes as public and
> private, and also using as node array a global C node array and I
> always get that exception even when only a single thread is running.
> What am I doing wrong? Shouldn't data declared in C++ as static be
> common to all the objects in the threads without ownership
> restrictions, even between different threads?
Yes it is. Sounds like you've got an ordinary bug in your code, and it has
nothing to do with the arcane workings of C++. Doesn't your exception
handler tell you where in the code the exception occurs? Are you sure it's
accessing the location you think it is? You may have to look at registers,
and understand the CPU instruction set to know for certain. Can you
peek/poke that location in the debugger? Does your CPU have an MMU, and is
it being set up properly? That's where I'd look.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss