Powerpc and C++ - compiler query

Nick.SIMON at syntegra.bt.co.uk Nick.SIMON at syntegra.bt.co.uk
Wed Jul 26 14:04:22 UTC 2000


Dear chaps,

I'm having some jolly fun (i.e. inexplicable crashes) involving two tasks
written in C++.


The problem manifests itself when running this chunk of code, which appears
in many places after function calls:

 ADDI     R9,R28,0x0004
 LWZ      R11,0x0000(R9)
 ADDI     R9,R11,0x0004
 LWZ      R11,0x0000(R9)
 LWZ      R0,0x0000(R11)

R28 has been set previously from the result of get_eh_context (whatever that
is)

This code results in an unnamed pointer in memory being overwritten with the
value it pointed to.  Like an element being taken off a queue.
Unfortunately, it seems to run out & so going to zero, and subsequently
crashing.  This chain of pointers appears to be used by both threads, which
I believe is the cause of the problem.

I am using rtems 4.5.0 beta 3 (not 3a) and the tools from the RPMs.  I'd be
grateful for any light shed, especially on the role of get_eh_context.

-- Nick Simon 



More information about the users mailing list