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
Crash "runtime/vm/object.cc: 20076: error: expected: !IsFinalized()" on pkg/vm/test/incremental_compiler_test #45602
Comments
The assert fault seems to indicate that a class was augmented with additional type parameters, which should not be an edit supported by hot reload. Could that be the problem? |
@crelier , the test https://github.com/dart-lang/sdk/blob/master/pkg/vm/test/incremental_compiler_test.dart#L956 does add another type argument that should result in rejected hot reload. |
We could something along the lines of https://dart-review.googlesource.com/c/sdk/+/195305 as a fix. |
@aam The check that you point at ends up executing this line https://github.com/dart-lang/sdk/blob/master/runtime/vm/object_reload.cc#L787, which does not look right to me. Calculating the number of type arguments requires finalization. We should check the number of type parameters instead, which is much simpler: Would you mind trying that? |
When we do the check assumption is that class is finalized already, right? |
@aam Because of the possibility of type argument overlap between the super class and derived class, the number of type arguments could be incompatible, although the number of type parameters has not changed. Maybe that was the reason for checking the type arguments. I think we should check both, making sure to check the type parameters first:
|
We seem to check type arguments only when class if finalized: this is how the function is called https://github.com/dart-lang/sdk/blob/master/runtime/vm/object_reload.cc#L733 |
The test was flaky but turned into RuntimeError on
pkg-linux-debug
bot recently. From the log:Full log: https://dart-ci.appspot.com/log/pkg-linux-debug/unittest-asserts-debug-linux/10261/pkg/vm/test/incremental_compiler_test
@aam @crelier
The text was updated successfully, but these errors were encountered: