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

VM crash: regexp_assembler_ir.cc: 329: error: unreachable code #35588

Closed
alexmarkov opened this issue Jan 7, 2019 · 0 comments
Closed

VM crash: regexp_assembler_ir.cc: 329: error: unreachable code #35588

alexmarkov opened this issue Jan 7, 2019 · 0 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@alexmarkov
Copy link
Contributor

Seen 1 flaky VM crash on vm-kernel-win-product-x64 bot

  FAILED: dartk-vm product_x64 corelib_2/double_hash_code_test
  Expected: Pass
  Actual: Crash
  --- Command "vm" (took 01.000109s):
  set DART_CONFIGURATION=ProductX64 & set DART_SUPPRESS_WER=1 & set DART_CRASHPAD_HANDLER=C:\b\s\w\ir\out\ProductX64\crashpad_handler.exe & out\ProductX64\dart.exe --no_intrinsify --ignore-unrecognized-flags --packages=C:\b\s\w\ir\.packages C:\b\s\w\ir\tests\corelib_2\double_hash_code_test.dart
  exit code:
  1073741845
  stderr:
  isolate terminated by vm
  c:\b\s\w\ir\cache\builder\sdk\runtime\vm\regexp_assembler_ir.cc: 329: error: unreachable code
  --- Re-run this test:
  python tools/test.py -n dartk-win-product-x64 corelib_2/double_hash_code_test

full log

It looks like regexp code does not handle unwind exceptions properly.
Created the following test to reproduce the crash reliably:

// VMOptions=--intrinsify
// VMOptions=--no_intrinsify

import "dart:isolate";
import "dart:async";
import "package:expect/expect.dart";

isomain1(replyPort) {
  final regexp = new RegExp('[ab]c');
  while(true) {
    Expect.equals(4, regexp.allMatches("acbcacbc").length);
  }
}

void main() {
  for (int i = 0; i < 20; ++i) {
    ReceivePort reply = new ReceivePort();
    Isolate.spawn(isomain1, reply.sendPort).then((Isolate isolate) {
      new Timer(new Duration(milliseconds: 50), () {
        print('killing isolate $i');
        isolate.kill(priority: Isolate.immediate);
      });
    });
    reply.close();
  }
}
@alexmarkov alexmarkov added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) gardening labels Jan 7, 2019
@alexmarkov alexmarkov self-assigned this Jan 7, 2019
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. gardening type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant