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

FLAG_enable_testing_pragmas broken on *-precomp-win-* #46059

Closed
ghost opened this issue May 18, 2021 · 3 comments
Closed

FLAG_enable_testing_pragmas broken on *-precomp-win-* #46059

ghost opened this issue May 18, 2021 · 3 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. os-windows type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@ghost
Copy link

ghost commented May 18, 2021

It appears that at least one FLAG_.. is broken when running precompiled on Windows.

An easy way to replicate this is by removing the if(!FLAG_..) .. check in runtime/vm/native_api_impl.cc.
After which the following tests will fail:

  • vmspecific_regress_37511_test
  • vmspecific_regress_37511_callbacks_test
  • vmspecific_function_gc_test
  • vmspecific_function_callbacks_test

Importantly, removing the above line should not have any effect on these tests as they each explicitly set:
// VMOptions=--enable-testing-pragmas ...
Meaning the condition removed should always be a no-op.

It's quite possible this issue is related to #40579

@ghost ghost added os-windows type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels May 18, 2021
@srawlins srawlins added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label May 19, 2021
@srawlins
Copy link
Member

Tentatively triaging into area-vm

@ghost
Copy link
Author

ghost commented May 20, 2021

I have verified that linking against dart_precompiled_runtime.lib makes this issue go away:

sdk/runtime/bin/BUILD.gn

Lines 1050 to 1052 in 28c784d

if (is_win) {
# TODO(dartbug.com/40579): This wrongly links in dart.exe on precompiled.
libs = [ "dart.lib" ]

I've noticed that dart_precompiled_runtime.exe will load the ffi_test_functions.dll and then load dart.exe, which leads me to believe that the flags are failing because they're loaded from the latter instead of dart_precompiled_runtime.exe.
The command line arguments are not passed to dart.exe when it is loaded.

So the root cause appears to be #40579.
In the short term I'm adding skips to the status files for *-precomp-win-*, and long term we should address #40579.

@ghost ghost self-assigned this May 20, 2021
dart-bot pushed a commit that referenced this issue May 21, 2021
This removes the need for passing the flag to use
Dart_ExecuteInternalCommand, which is done in several tests
that otherwise have nothing to do with testing pragmas.

Also adds status file skips for precomp-win targets that currently
crash due to #40579.

TEST=CQ

Bug: #46059, #46061
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-nnbd-win-release-x64-try,vm-kernel-win-debug-x64-try
Change-Id: I3024ad9bedb7a74abaaaa1020b7525e5d8b1bd47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200461
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
@ghost
Copy link
Author

ghost commented May 21, 2021

The specific issue here (and in #46061) has now been addressed, and any remaining work is related to #40579.

@ghost ghost closed this as completed May 21, 2021
This issue was closed.
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. os-windows type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant