-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Program triggers segfault in JIT mode, runs fine on AOT/exe #50622
Comments
Loosely triaging this to VM... |
Here is an update to the issue I have reported. The code that reproduces this issue can be found at https://github.com/tamcy/dart-issue-50622. When running on Docker, I can finally see the following segfault messages emitted in the middle of the loop:
When running on Windows in debug mode, the code terminates with exit code
I have tested the code against several versions on Docker. The code crashes on |
@tamcy please add some open-source license of your choice to the repo, otherwise we can't look at it. (e.g. MIT, BSD, GPL, LGPL, Apache, etc.). |
@mraleph No problem, MIT license file added to the repo. |
Would you have some free cycles to take a look at this @aam? |
|
Problem seems to be with https://github.com/dart-lang/sdk/blob/main/runtime/vm/compiler/backend/flow_graph.cc#L2056 where PhiInstruction gets unboxed double representation even if incoming values are unboxed floats. |
Makes sense. The fix should be fixed-point based, because you can have float phis flowing into other phis. So it should likely follow the same template that |
…tructions. BUG=#50622 TEST=FlowGraph_UnboxedFloatPhi Change-Id: Ie7bfbb6c4028907a18243d44be8128999c1efcae Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275180 Reviewed-by: Slava Egorov <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]>
…r phi instructions. Fixes vm crash in JIT configurations. BUG=#50622 BUG=flutter/flutter#118559 TEST=FlowGraph_UnboxedFloatPhi Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/275180 Change-Id: I150f591fdbc08790bd59bc92190fe1c5c9270129 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279917 Commit-Queue: Alexander Aprelev <[email protected]> Reviewed-by: Slava Egorov <[email protected]>
Dart SDK Version (
dart --version
):Dart SDK version: 2.19.0-374.1.beta (beta) (Tue Nov 15 07:44:30 2022 -0800) on "windows_x64"
I encontoured a rather confusing issue when running a Dart command line program. When running with
dart run
in the terminal the program just stops prematurely without any error message. I then tried running in debug mode using Android Studio, and while there is still no error nor exception, the following message emitted in the middle of the execution:Process finished with exit code -2147483645
At first, I was unable to find out where the program ends with breakpoints (the program finishes successfully). Then I tried removing the breakpoints and insert various print messages here and there. After that I am quite sure there's something wrong with the execution because the program can stop at a very strange place, like after the
if
statement and before thefor
statement. The program processes a set of data in a loop, but it isn't any particular data that causes the program to stop - the data that fails runs fine if I move it to the first of the loop.Some additional observations:
Process finished with exit code -2147483645
.dartaotruntime
. But it fails similarly when compiled tojit
and execute.I am willing to contribute the code privately for reproducting this issue, but I need some time to remove the unnecessary noises (it's still under development). The code is about detecting overlapping curves by using the intersectionsWithCurve() function in the
beizer
package. The function will be called multiple times in a loop. While I suppose this is a relatively heavy computation, memory should not be a program (I have over 30GB free memory), and the program stops very early.I know there isn't very much useful information provided, please see if you can provide any suggestion on the issue I encountered. Thank you!
The text was updated successfully, but these errors were encountered: