Search code examples
windowsstackportable-executableinternals

Win32 Stack section base address


I know that to find a text (code) section's base address one should look for the .text section virtual address (except if ASLR is enabled), but what about stack?

Is stack memory stored in the .data section along with the heap? If so I should look for .data section virtual address to know the stack base address


Solution

  • The stack is not a section. A stack is dynamically allocated for each thread. (If it were a section, then you could have only one thread per process.)