sourcepawn
sourcepawn copied to clipboard
master OOMs on excessive array dims.
On my Windows machine, the following fails an allocation at some point:
public void main() { int ultimate_power[2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2][2]; }
I think it was here: https://github.com/alliedmodders/sourcepawn/blob/840c2f934b3884faf02bb7eb614d2a41a2f2e945/compiler/array-helpers.cpp#L888
Maybe we should quickly compute the total memory size (if we don't already) and cap it at like 2^29 or something.