Skip to content

vm crashes (exit code 139) with complex generics #25122

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

Closed
Andersmholmgren opened this issue Dec 6, 2015 · 4 comments
Closed

vm crashes (exit code 139) with complex generics #25122

Andersmholmgren opened this issue Dec 6, 2015 · 4 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@Andersmholmgren
Copy link

If you run the below code in 1.14.0-dev.1.0 (note it's been crashing in several prior versions too) it crashes with

/usr/local/opt/dart/libexec/bin/dart --ignore-unrecognized-flags --checked --enable-vm-service:62159 --trace_service_pause_events /Users/blah/dart/backlogio_acdart/gitbacklog_root/gissue_root/gissue_client/lib/ui_components_2/issues/delme.dart
Observatory listening on http://127.0.0.1:62159

Process finished with exit code 139

I get no warnings from strong mode analyzer with this code however

main() {}

abstract class ComponentState<S extends ComponentState> {}

abstract class EntityState<ES extends EntityState> extends ComponentState<ES> {}

abstract class FrComponent<S extends ComponentState<S>> {}

abstract class AbstractListMember<E, M extends AbstractListMember<E, M>>
    extends ComponentState<M> {}

abstract class AbstractListEditorState<
    D,
    M extends AbstractListMember<D, M>,
    ES extends EntityState<ES>,
    S extends AbstractListEditorState<D, M, ES, S>> extends ComponentState<S> {}

abstract class AbstractListEditor<
    ES extends EntityState<ES>,
    E extends FrComponent<ES>,
    D,
    M extends AbstractListMember<D, M>,
    S extends AbstractListEditorState<D, M, ES, S>> extends FrComponent<S> {}

abstract class RepoListEditorState<M extends RepoListMember<M>,
        ES extends EntityState<ES>, S extends RepoListEditorState<M, ES, S>>
    extends AbstractListEditorState<String, M, ES, S>
    implements EntityState<S> {}

class RepoListMember<M extends RepoListMember<M>>
    extends AbstractListMember<String, M> {}

abstract class RepoListEditor<
        ES extends EntityState<ES>,
        E extends FrComponent<ES>,
        M extends RepoListMember<M>,
        S extends RepoListEditorState<M, ES, S>>
    extends AbstractListEditor<ES, E, String, M, S> {}
@fsc8000 fsc8000 added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Dec 7, 2015
@fsc8000
Copy link
Contributor

fsc8000 commented Dec 7, 2015

Thanks for the repro! I managed to reduce it to the following lines:

main() {}

abstract class ComponentState<S extends ComponentState> {}

abstract class AbstractListMember<E, M extends AbstractListMember<E, M>>
    extends ComponentState<M> {}

class RepoListMember<M extends RepoListMember<M>>
    extends AbstractListMember<String, M> {}

Results in the following crash:

$ out/DebugX64/dart crash.dart 
runtime/vm/object.cc:4522: error: expected: Length() >= (from_index + len)
Aborted (core dumped)

@fsc8000
Copy link
Contributor

fsc8000 commented Dec 7, 2015

main() {}

class AbstractListMember<E, M extends AbstractListMember<E, M>> { }

class RepoListMember<M extends RepoListMember<M>>
    extends AbstractListMember<String, M> {}

@fsc8000
Copy link
Contributor

fsc8000 commented Dec 7, 2015

@crelier

@crelier crelier self-assigned this Dec 7, 2015
@crelier crelier closed this as completed in 173c1ae Dec 8, 2015
@Andersmholmgren
Copy link
Author

thanks awesome Dart VM team. I can verify this is fixed in 1.14.0-dev.4.0

thanks for the quick turnaround. This will result in me pulling a lot less of my hair out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants