-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple large initialised globals crash in the wrong order #220
Comments
https://image.prntscr.com/image/TTe7rjEESRC-jSBUMzp4FA.png I think
While filling the lit table, I am not sure about this because this is so wrong that the compiler should be crashing way to often when dealing with large multidimensional arrays but I haven't seen this happen. From what I found, I would expect every multidimensional array with ellipsis to crash at some point but the following doesn't: I am also not able to fit in why the compiler crashing depends on the order of array declarations into my explanation. Even by chance if the invalid memory was within the compiler's memory, using this could cause memory corruption in the PAWN array because something else could have taken up that free memory and overwritten the contents. |
Replaced the pointers with indexes and it's working. Passes the following test:
|
Crashes:
Doesn't crash:
I'm guessing it has something to do with allocating memory, since the crash doesn't happen if the total size of the second array is <= the first.
The text was updated successfully, but these errors were encountered: