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

Newly added lib_2/isolate/weak_reference_message_2_test fails in dartkp-obfuscate #48375

Closed
mkustermann opened this issue Feb 11, 2022 · 2 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening

Comments

@mkustermann
Copy link
Member

There are new test failures on 828dcd0

lib_2/isolate/weak_reference_message_2_test RuntimeError (expected Pass)

are failing on configurations

dartkp-obfuscate-linux-release-x64
@mkustermann mkustermann added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening labels Feb 11, 2022
@mkustermann
Copy link
Member Author

Surprisingly this test passes in normal dartkp mode which it should not:

void main(List<String> arguments, Object message) async {
  if (arguments.length == 1) {
    assert(arguments[0] == 'helper');
    await runHelper(message as SendPort);
  } else {
    await runTest();
  }
}

Future<void> runTest() async {
  final port = ReceivePort();
  await Isolate.spawnUri(
    Uri.parse('weak_reference_message_2_test.dart'),
    ['helper'],
    port.sendPort,
  );  
  final message = await port.first;
  ...
}

It tries to Isolate.spawnUri() from weak_reference_message_2_test.dart. This is not supported in AOT mode.

It happens to be that the implementation completely ignores the weak_reference_message_2_test.dart argument and uses the same AOT snapshot as the main app is launched from. So the test passes by coincidence.

@mkustermann mkustermann self-assigned this Feb 11, 2022
@mkustermann
Copy link
Member Author

Made cl/232603 that fixes the Isolate.spawnUri implementation.

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
Projects
None yet
Development

No branches or pull requests

1 participant