Initialised Array In Function ??? Problem ??? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QbasicNews.Com (http://qbasicnews.com/newforum/forum-3.html) +--- Forum: Site/Forum Issues (http://qbasicnews.com/newforum/forum-9.html) +--- Thread: Initialised Array In Function ??? Problem ??? (/thread-7045.html) |
Initialised Array In Function ??? Problem ??? - Erdemal - 04-24-2005 It seem that this is a bug ? Code: Dim myLong As Long Translates in ASM (for the function part) Code: .globl _MYFUNC@4 First 52 bytes of local datas are reserved on the stack (sub esp, 52)(1) ... Then 24 bytes of these 52 bytes are "Freed " (add esp, 24)(2) ... Then the "freed space" is read/Write ! (3) & (4) mov dword ptr [ebp-52], 33 mov eax, dword ptr [ebp-52] That [ebp+52] is a space below esp, thus in free stack space and may be overwriten by any push, call ... erdemal Initialised Array In Function ??? Problem ??? - Antoni Gual - 05-02-2005 wrong forum? |