You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are > 124 local variables in scope when a function is called, then when that function returns the stack ends up corrupted. This can cause squirrel to crash.
repro:
local variable0 = 1;
local variable1 = 1;
local variable2 = 1;
local variable3 = 1;
local variable4 = 1;
local variable5 = 1;
local variable6 = 1;
local variable7 = 1;
local variable8 = 1;
local variable9 = 1;
local variable10 = 1;
local variable11 = 1;
local variable12 = 1;
local variable13 = 1;
local variable14 = 1;
local variable15 = 1;
local variable16 = 1;
local variable17 = 1;
local variable18 = 1;
local variable19 = 1;
local variable20 = 1;
local variable21 = 1;
local variable22 = 1;
local variable23 = 1;
local variable24 = 1;
local variable25 = 1;
local variable26 = 1;
local variable27 = 1;
local variable28 = 1;
local variable29 = 1;
local variable30 = 1;
local variable31 = 1;
local variable32 = 1;
local variable33 = 1;
local variable34 = 1;
local variable35 = 1;
local variable36 = 1;
local variable37 = 1;
local variable38 = 1;
local variable39 = 1;
local variable40 = 1;
local variable41 = 1;
local variable42 = 1;
local variable43 = 1;
local variable44 = 1;
local variable45 = 1;
local variable46 = 1;
local variable47 = 1;
local variable48 = 1;
local variable49 = 1;
local variable50 = 1;
local variable51 = 1;
local variable52 = 1;
local variable53 = 1;
local variable54 = 1;
local variable55 = 1;
local variable56 = 1;
local variable57 = 1;
local variable58 = 1;
local variable59 = 1;
local variable60 = 1;
local variable61 = 1;
local variable62 = 1;
local variable63 = 1;
local variable64 = 1;
local variable65 = 1;
local variable66 = 1;
local variable67 = 1;
local variable68 = 1;
local variable69 = 1;
local variable70 = 1;
local variable71 = 1;
local variable72 = 1;
local variable73 = 1;
local variable74 = 1;
local variable75 = 1;
local variable76 = 1;
local variable77 = 1;
local variable78 = 1;
local variable79 = 1;
local variable80 = 1;
local variable81 = 1;
local variable82 = 1;
local variable83 = 1;
local variable84 = 1;
local variable85 = 1;
local variable86 = 1;
local variable87 = 1;
local variable88 = 1;
local variable89 = 1;
local variable90 = 1;
local variable91 = 1;
local variable92 = 1;
local variable93 = 1;
local variable94 = 1;
local variable95 = 1;
local variable96 = 1;
local variable97 = 1;
local variable98 = 1;
local variable99 = 1;
local variable100 = 1;
local variable101 = 1;
local variable102 = 1;
local variable103 = 1;
local variable104 = 1;
local variable105 = 1;
local variable106 = 1;
local variable107 = 1;
local variable108 = 1;
local variable109 = 1;
local variable110 = 1;
local variable111 = 1;
local variable112 = 1;
local variable113 = 1;
local variable114 = 1;
local variable115 = 1;
local variable116 = 1;
local variable117 = 1;
local variable118 = 1;
local variable119 = 1;
local variable120 = 1;
local variable121 = 1;
local variable122 = 1;
local variable123 = 1;
local variable124 = 1;
local variable125 = 1;
local variable126 = 1;
local variable127 = 1;
function my_thing() {
return "hello";
}
local ret = my_thing();
print("return is " + ret);
the above code incorrectly prints return is (function : 0x0x7fc9874108f0)
it works correctly if you comment out the last few locals.
there should probably be more runtime protection against this as it can corrupt memory.
The text was updated successfully, but these errors were encountered:
If there are > 124 local variables in scope when a function is called, then when that function returns the stack ends up corrupted. This can cause squirrel to crash.
repro:
the above code incorrectly prints
return is (function : 0x0x7fc9874108f0)
it works correctly if you comment out the last few locals.
there should probably be more runtime protection against this as it can corrupt memory.
The text was updated successfully, but these errors were encountered: