[a121] Crash when debug var with user defined __Enum Method Topic is solved

Report problems with documented functionality
User avatar
aseiot
Posts: 79
Joined: 05 Mar 2017, 04:25

[a121] Crash when debug var with user defined __Enum Method

11 Aug 2020, 19:48

Following is a demonstrative code:

Code: Select all

class cls
{
   __Enum(p*) => this.OwnProps()
}

x := cls.New()
x.key := "value"                         ;crash if we view the value of 'x' with a debugger
for k, v in x
{
   MsgBox(k ".." v)
}
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [a121] Crash when debug var with user defined __Enum Method

12 Aug 2020, 01:44

the problem is with this case-statement https://github.com/Lexikos/AutoHotkey_L/commit/374b3d5f57fae7d65d82b7e0661b95145ee590ba#diff-fb7cf4e112faecd64ccdadab5cf06179R1720
overwriting the enumerator object(which had already been retrieved earlier) with an empty string. it then calls Invoke on the empty string and causes the crash: invalid read

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 10 guests