Skip to content
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 when compiling big file #13235

Closed
DartBot opened this issue Sep 11, 2013 · 13 comments
Closed

Crash when compiling big file #13235

DartBot opened this issue Sep 11, 2013 · 13 comments
Labels
closed-cannot-reproduce Closed as we were unable to reproduce the reported issue closed-obsolete Closed as the reported issue is no longer relevant dart2js-crash needs-info We need additional information from the issue author (auto-closed after 14 days if no response) P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js

Comments

@DartBot
Copy link

DartBot commented Sep 11, 2013

This issue was originally filed by kbecke...@gmail.com


What steps will reproduce the problem?

  1. download the file from http://karsten-becker.de/test.dart
  2. download simulation_comm.dart from http://api.pshdl.org/api/v0.1/workspace/simulation_comm.dart
  3. run dart2js with the test.dart

What is the expected output? What do you see instead?
Expected no crash, so this:

import 'dart:collection';

The compiler is broken.

When compiling the above element, the compiler crashed. It is not
possible to tell if this is caused by a problem in your program or
not. Regardless, the compiler should not crash.

The Dart team would greatly appreciate if you would take a moment to
report this problem at http://dartbug.com/new.

Please include the following information:

\* the name and version of your operating system,

\* the Dart SDK build number (build number could not be determined), and

\* the entire message you see here (including the full stack trace
  below as well as the source location above).

Internal error: Stack Overflow
# ­0      Compiler.run (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:398:5)
# ­1      Compiler.run (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/apiimpl.dart:163:29)
# ­2      compile (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/compiler.dart:16:15)
# ­3      compile (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart:256:14)
# ­4      compilerMain (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart:291:10)
# ­5      mainWithErrorHandler (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart:325:17)

...
...
# ­7      CodegenWorkItem.run (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:32:21)
# ­8      Compiler.processQueue.<anonymous closure>.<anonymous closure> (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:646:53)
# ­9      Compiler.withCurrentElement (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/compiler.dart:#­10     main (file:///mnt/data/b/build/slave/dart-editor-linux-trunk/build/dart/sdk/lib/_internal/compiler/implementation/dart2js.dart:344:23)

**What version of the product are you using? On what operating system?**
Dart-to-JavaScript compiler (dart2js) version: <non-SDK build> (which is not true, it was the latest SDK)
uname -r -> 2.6.32-028stab101.1

**Please provide any additional information below.**
@dgrove
Copy link
Contributor

dgrove commented Sep 11, 2013

Added Area-Dart2JS, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Sep 11, 2013

This comment was originally written by ngeoffray@google.com


Set owner to ngeoffray@google.com.
Added Accepted label.

@DartBot
Copy link
Author

DartBot commented Sep 13, 2013

This comment was originally written by ngeoffray@google.com


I mitigated the problem at revision r27471, but our code generation still uses a recusion algorithm that will be non-trivial to change, and provokes a stack overflow with your particular example.

What you can do until we fix this problem (that in reality just occurs in tool generated Dart code), is to increase the stack size through your OS.


Removed Priority-Unassigned label.
Added Priority-Medium label.

@DartBot
Copy link
Author

DartBot commented Sep 13, 2013

This comment was originally written by kbec...@gmail.com


Does splitting into multiple files or classes help in any way?
Increasing the stack size of my OS seems a bit overkill, especially since I consider calling the compiler from within the browser. But this particular example is very likely to be an uncommon case.

@DartBot
Copy link
Author

DartBot commented Sep 13, 2013

This comment was originally written by ngeoffray@google.com


It is the method size that is a problem here. The method TestUnit#run is too big for our code generator, so splitting it will definitely help.

@DartBot
Copy link
Author

DartBot commented Sep 13, 2013

This comment was originally written by kbecker8...@gmail.com


Ah ok, I can work around that.. Java has a much more severe restriction of 65k bytes in a method, so I have to take care of that there as well..

@kasperl
Copy link

kasperl commented Sep 18, 2013

Added this to the M7 milestone.

@kasperl
Copy link

kasperl commented Sep 25, 2013

Removed this from the M7 milestone.
Added this to the Later milestone.

@DartBot
Copy link
Author

DartBot commented Dec 19, 2013

This comment was originally written by ngeoffray@google.com


Added Triaged label.

@DartBot
Copy link
Author

DartBot commented Dec 19, 2013

This comment was originally written by ngeoffray@google.com


Set owner to @floitschG.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@sigmundch
Copy link
Member

The link above seems to be returning a 404 now, does anyone has a copy of the test file?

@sigmundch sigmundch added the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Sep 18, 2015
@sigmundch sigmundch added P3 A lower priority bug or feature request dart2js-crash and removed Priority-Medium labels Dec 10, 2015
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed triaged labels Feb 29, 2016
@floitschG floitschG removed their assignment Aug 11, 2017
@sigmundch sigmundch added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 29, 2018
@sigmundch sigmundch added the closed-cannot-reproduce Closed as we were unable to reproduce the reported issue label Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-cannot-reproduce Closed as we were unable to reproduce the reported issue closed-obsolete Closed as the reported issue is no longer relevant dart2js-crash needs-info We need additional information from the issue author (auto-closed after 14 days if no response) P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js
Projects
None yet
Development

No branches or pull requests

6 participants