Patent ID: 11922168
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 7:
8. Computer-readable storage hardware storing instructions configured to cause a computing device to perform a process, the computing device comprising processing hardware and memory, the process comprising:
executing a program by the processing hardware, the executing comprising providing a call stack and a shadow stack in the memory, the call stack comprising stack frames, each stack frame comprising a respective return address, at least one of the stack frames further comprising corresponding local variables or parameters, the shadow stack comprising return addresses that respectively correspond to the respective return addresses in the call stack, the providing the call stack and the shadow stack comprising:
when a function is called by the program, adding a corresponding stack frame to the call stack and adding a corresponding return address to the shadow stack; and
when the function is exited by the program, removing a corresponding stack frame from the call stack and removing a corresponding return address from the shadow stack; and

in response to receiving a backtrace request in association with the program, forming a backtrace of the program by accessing the shadow stack, the accessing comprising:
referencing a first contiguous set of return addresses in the shadow stack;
detecting one or more contiguous corrupted return addresses in the shadow stack contiguously after the first contiguous set of return addresses in the shadow stack;
skipping the one or more contiguous corrupted return addresses; and
forming the backtrace by reference to a second contiguous set of return addresses in the shadow stack, the second contiguous set of return addresses being contiguously after the one or more contiguous corrupted return addresses in the shadow stack.