A dedicated register contains a stack pointer
which indicates where to unwind the runtime stack to.
If we were simply to do the opposite of what was done for register saves in function prologs, the code resulting from procedural abstraction at each return block for a function might have the following structure, with three instructions to manage the control transfers and stack pointer
The report also includes the thread ID, memory address, type of memory access, and important register values such as the program counter and stack pointer
. When used in conjunction with the program's source code, we have found that this information is usually sufficient to locate the origin of the race.
SP is the stack pointer
register that points to the top of the stack.
An efficient but architecture-specific implementation of this test would be a comparison of the address of the table with the current stack pointer
. A portable solution for testing if a signature table is in static memory would be to include an additional flag in the signature table.
Ghiya and Hendren [1996a] provide a context-sensitive connection analysis that can determine if two stack pointers
can reach a common heap element.