什么是字节溢出?
当我从C程序生成的LLVM中间表示转储x86 ASM时,会有大量溢出,通常为4字节大小。我无法弄清楚它们为什么会发生以及它们取得了什么。
他们似乎“切断”了堆叠的部分,但是以一种不寻常的方式:
## this fragment comes from a C program right before a malloc() call to a struct.
## there are other spills in different circumstances in this same program, so it
## is not related exclusively to malloc()
...
sub ESP, 84
mov EAX, 60
mov DWORD PTR [ESP + 80], 0
mov DWORD PTR [ESP], 60
mov DWORD PTR [ESP + 60], EAX # 4-byte Spill
call malloc
mov ECX, 60
...