-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-ffi
Description
Trying to enable our samples as test triggers an unreachable in AoT.
/===================================================================\
| samples/ffi/samples_test is new and failed (Crash, expected Pass) |
\===================================================================/
--- Command "vm_compile_to_kernel []" (took 16.000706s):
DART_CONFIGURATION=DebugX64 /b/s/w/ir/pkg/vm/tool/gen_kernel --aot --platform=out/DebugX64/vm_platform_strong.dill -o /b/s/w/ir/out/DebugX64/generated_compilations/dartkp/samples_ffi_samples_test/out.dill /b/s/w/ir/samples/ffi/samples_test.dart --packages=/b/s/w/ir/.packages -Ddart.developer.causal_async_stacks=true
exit code:
0
--- Command "precompiler" (took 08.000477s):
DART_CONFIGURATION=DebugX64 out/DebugX64/gen_snapshot --snapshot-kind=app-aot-assembly --assembly=/b/s/w/ir/out/DebugX64/generated_compilations/dartkp/samples_ffi_samples_test/out.S --no-enable-malloc-hooks --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/out/DebugX64/generated_compilations/dartkp/samples_ffi_samples_test/out.dill
exit code:
-6
stderr:
../../runtime/vm/compiler/backend/il.h: 973: error: unreachable code
version=2.6.0-edge.8b3d76dff19e8ff67169db867a51d9a9d4d19f7b (Mon Oct 21 11:05:20 2019 +0000) on "linux_x64"
thread=7922, isolate=isolate(0x564e8fb16c00)
pc 0x0000564e8e4132ac fp 0x00007ffe0e622460 dart::Profiler::DumpStackTrace(void*)
pc 0x0000564e8e145d32 fp 0x00007ffe0e622540 dart::Assert::Fail(char const*, ...)
pc 0x0000564e8e4693a3 fp 0x00007ffe0e622560 out/DebugX64/gen_snapshot+0x8fb3a3
pc 0x0000564e8e551ff3 fp 0x00007ffe0e6225d0 dart::FlowGraph::InsertConversion(dart::Representation, dart::Representation, dart::Value*, bool)
pc 0x0000564e8e553131 fp 0x00007ffe0e622640 dart::FlowGraph::SelectRepresentations()
pc 0x0000564e8e64364d fp 0x00007ffe0e622650 out/DebugX64/gen_snapshot+0xad564d
pc 0x0000564e8e642be4 fp 0x00007ffe0e622710 dart::CompilerPass::Run(dart::CompilerPassState*) const
pc 0x0000564e8e6431fd fp 0x00007ffe0e622740 dart::CompilerPass::RunPipeline(dart::CompilerPass::PipelineMode, dart::CompilerPassState*)
pc 0x0000564e8e4faa21 fp 0x00007ffe0e622d80 dart::PrecompileParsedFunctionHelper::Compile(dart::CompilationPipeline*)
pc 0x0000564e8e4fcfaf fp 0x00007ffe0e622f90 out/DebugX64/gen_snapshot+0x98efaf
pc 0x0000564e8e4f75a4 fp 0x00007ffe0e623040 dart::Precompiler::CompileFunction(dart::Precompiler*, dart::Thread*, dart::Zone*, dart::Function const&)
pc 0x0000564e8e4f5e3b fp 0x00007ffe0e6230b0 dart::Precompiler::ProcessFunction(dart::Function const&)
pc 0x0000564e8e4f1723 fp 0x00007ffe0e6230d0 dart::Precompiler::Iterate()
pc 0x0000564e8e4eea43 fp 0x00007ffe0e623290 dart::Precompiler::DoCompileAll()
pc 0x0000564e8e4ee485 fp 0x00007ffe0e623670 dart::Precompiler::CompileAll()
pc 0x0000564e8e981b0e fp 0x00007ffe0e623730 Dart_Precompile
pc 0x0000564e8e11afa4 fp 0x00007ffe0e6238c0 dart::bin::main(int, char**)
-- End of DumpStackTrace
--- Re-run this test:
/cc @mkustermann
edit:
(gdb) p from_rep
$2 = dart::kUnboxedInt64
(gdb) p to_rep
$3 = dart::kUnboxedInt32
(gdb) p def->ToCString()
$5 = 0x7ffff4d36b28 "v1028 <- UnboxedConstant(#1) [1, 1] T{_Smi}"
*** BEGIN CFG
After TypePropagation
==== file:///usr/local/google/home/dacoharkes/dart-sdk/sdk/samples/ffi/sample_ffi_functions.dart_::_main
...
v1028 <- UnboxedConstant(#1) [1, 1] T{_Smi}
...
v1024 <- FfiCall:66( pointer=v1022, v1028 (@rdi), v1028 (@rsi), v1010 (@rdx), v1016 (@rcx)) T{*?}
...
v1146 <- FfiCall:66( pointer=v1144, v1028 (@rdi), v1126 (@rsi), v1132 (@rdx), v1079 T{int} (@rcx)) T{*?}
...
v1337 <- FfiCall:90( pointer=v1335, v1028 (@rdi), v1343 (@rsi), v901 (@rdx), v1347 (@rcx), v1349 (@r8), v1351 (@r9), v1353 (@S+0), v1355 (@S+1), v1357 (@S+2), v1359 (@S+3)) T{*?}
...
v1682 <- FfiCall:130( pointer=v1680, v1028 (@rdi), v1602 (@xmm0), v901 (@rsi), v1475 (@xmm1), v1349 (@rdx), v1618 (@xmm2), v1353 (@rcx), v1483 (@xmm3), v1357 (@r8), v1634 (@xmm4), v1700 (@r9), v1702 (@xmm5), v1704 (@S+0), v1650 (@xmm6), v1706 (@S+1), v1708 (@xmm7), v903 (@S+2), v1666 (@S+3), v1712 (@S+4), v1714 (@DS+5)) T{*?}
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-ffi