Yes, it was like that. Instead of writing to/reading from invalid memory, a new temporary entry is being created when the requested array index is larger than the number of entries in the predefined array. This new entry can be used safely.
However, there were some subtle problems with context restoration when calling functions, in particular multiple functions in a row. At some point, I think I got the problems fixed when debugging Slic for Stan (I recall adding a Slic break statement to activate the in-program Slic debug window, and inspecting the context stack with the MSVC debugger), but I was too busy with other things to test it properly and commit the modifications.
However, there were some subtle problems with context restoration when calling functions, in particular multiple functions in a row. At some point, I think I got the problems fixed when debugging Slic for Stan (I recall adding a Slic break statement to activate the in-program Slic debug window, and inspecting the context stack with the MSVC debugger), but I was too busy with other things to test it properly and commit the modifications.
Comment