String literals are mutable in the interpreter #12422
Labels
kind:bug
A bug in the code. Does not apply to documentation, specs, etc.
status:discussion
topic:compiler:interpreter
Examples:
It seems there is some kind of stack corruption for the second example too.
To fix this we should probably simulate read-only memory in the interpreter; even crashing on the pointer write, like in compiled mode, is better than introducing undefined behavior that only gets picked up later. This might also be necessary if we want to be able to form pointers to constants (e.g. #12396).
The text was updated successfully, but these errors were encountered: