You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area-vmUse area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
I was debugging a crash which only occurred in release mode in a flutter application on master channel, but not in stable. I was now able to reproduce the problem in AOT mode in dart 2.5, but it works in dart VM jit mode and dart 2.4.
It seems the AOT compiler does something weird when a property is annotated with a Function reference (even if this function reference is never accessed).
use a top level function reference like @SomeTestAnnotation(fromJson: print)
Because of some reason the value used during initialization is not assigned to the property? When this is used inside a more complicated code (I have used the json_serializable package to generate json deserialization code) it even crashes the AOT runtime with a segfault:
i am using mac os with the latest dart 2.5 dev version from homebrew (but since i stumbled onto this crash also on iOS and Android, i'm pretty sure it's not limited to the mac build):
Herbys-MacBook-Pro-2017:lib$ dart --version
Dart VM version: 2.5.0-dev.1.0 (Tue Jul 9 15:27:01 2019 +0200) on "macos_x64"
I haven't found any issue tracking this problem, and i realise this is still in development, so feel free to close it if it's redundant.
The text was updated successfully, but these errors were encountered:
mraleph
added
area-vm
Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
labels
Jul 28, 2019
Bisected this bug: the problem appeared since b32d196, and was fixed in 6312030.
It's likely a duplicate to #37544. The fix 6312030 added a check for recursive finalization when reading fields; without that check compiler could see fresh non-finalized fields with invalid offsets (if annotation on a field caused recursive finalization of the current class).
area-vmUse area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
I was debugging a crash which only occurred in release mode in a flutter application on master channel, but not in stable. I was now able to reproduce the problem in AOT mode in dart 2.5, but it works in dart VM jit mode and dart 2.4.
It seems the AOT compiler does something weird when a property is annotated with a Function reference (even if this function reference is never accessed).
I have reduced the problem to the following code:
expected behavior in dart VM:
but when using AOT the value of the property is still null:
The problem goes away when either:
@SomeTestAnnotation(fromJson: print)
Because of some reason the value used during initialization is not assigned to the property? When this is used inside a more complicated code (I have used the json_serializable package to generate json deserialization code) it even crashes the AOT runtime with a segfault:
i am using mac os with the latest dart 2.5 dev version from homebrew (but since i stumbled onto this crash also on iOS and Android, i'm pretty sure it's not limited to the mac build):
I haven't found any issue tracking this problem, and i realise this is still in development, so feel free to close it if it's redundant.
The text was updated successfully, but these errors were encountered: