I have a C++ program that reports a crash. Analyzing it further, I am able to figure out the exact place where the data on stack gets corrupted. But, I am not able to understand why that happens or what would cause such corruption. At a point in time
value at [rsp+40h] is 00000249 15ed4de0
Then the following assembly instruction gets executed
mov rsi,qword ptr [rsp+40h]
Now, the value at
[rsp+40h] is 00000000 15ed4de0
The higher order DWORD has changed from 00000249 to 00000000. There are no changes in the addresses nearby. I do not understand why a read from [rsp+40h] would end up corrupting the value present at that address.
Any pointers are welcome. Thanks in advance.