mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:28:02 +00:00
[vm/interpreter] Clean up slot for result in InlineCacheMiss
The stack slot which is reserved for the result of runtime call could contain garbage when doing the call, but it could be visited by GC before a valid value is assigned there. Found using --verify_on_transition flag. Change-Id: I3968d23965806874a5ca53f0ac036c156fb53ca5 Reviewed-on: https://dart-review.googlesource.com/c/80044 Commit-Queue: Zach Anderson <zra@google.com> Auto-Submit: Alexander Markov <alexmarkov@google.com> Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
parent
b10a36b8df
commit
22b4ec0e78
1 changed files with 1 additions and 0 deletions
|
@ -1101,6 +1101,7 @@ void Interpreter::InlineCacheMiss(int checked_args,
|
|||
RawObject** FP,
|
||||
RawObject** SP) {
|
||||
RawObject** result = top;
|
||||
top[0] = 0; // Clean up result slot.
|
||||
RawObject** miss_handler_args = top + 1;
|
||||
for (intptr_t i = 0; i < checked_args; i++) {
|
||||
miss_handler_args[i] = args[i];
|
||||
|
|
Loading…
Reference in a new issue