views:

67

answers:

1

I found one thread of a multi-threaded application to be crashing in VxWorks. I don't have debug information. On deeper analysis I found that the crash is being caused due to a global memory address value being changed.

This global memory address (which is an address to a function. I am using a function pointer) is being stored at a particular address location in heap. I found that this global memory address itself is being reduced by 2, which leads to incorrect access and load instruction error.

This happens randomly. But, I am really surprised as to what can cause the address value to be reduced by 2.

Any guesses or ideas or pointers in any direction might be helpful.

+3  A: 

Some CPUs have a hardware breakpoint that will let you break when a memory location is written. Set the CPU to interrupt when that location is read or written and look at the stack when it happens to see which function is doing it.

Eyal
Thanks a lot for this answer. We are exploring that. But, are there any other ways of finding?
Jay
You don't need another way. That hardware breakpoint is *very* effective if the address of the memory corruption repeats well.
Hans Passant
Since, the occurance is random, I don't when it will repeat again. So, I want some other way apart from this.
Jay