Search⌘ K
AI Features

Identify Stack Corruption

Explore the methods to identify stack corruption causing segmentation faults in Linux core dumps. Learn to analyze memory around stack pointers, compare stack traces across threads, and detect overwritten return addresses to diagnose crashes due to buffer overflow and wild pointers.

What is stack corruption?

In a process, a stack is used to store local data of a function, to back up local data during function calls, and to store return addresses and return values. Stack corruption usually occurs when:

  • an array is read beyond its allocated space, 

  • a loose pointer ends up pointing to a location in the stack,

  • a return address gets corrupted during a function call.

Heap and stack grow in opposite directions
Heap and stack grow in opposite directions

Application source code

We have created a ...