[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:
Alexander Markov 2018-10-17 17:01:41 +00:00 committed by commit-bot@chromium.org
parent b10a36b8df
commit 22b4ec0e78

View file

@ -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];