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

Support FFI on ARMv5 #36636

Closed
aartbik opened this Issue Apr 15, 2019 · 4 comments

Comments

Projects
4 participants
@aartbik
Copy link
Contributor

aartbik commented Apr 15, 2019

Found with fuzzing.

Isolate (/b/s/w/itgsWcEd/dart_fuzzRLFBCY) KBC-CMP-O3-DebugX64 - JIT-NOINTRINSIFY-noVFP-DebugSIMARM: !DIVERGENCE! 1.9:1698863170 (output=false)

fail2:
../../runtime/vm/compiler/assembler/assembler_arm.cc: 851: error: expected: TargetCPUFeatures::vfp_supported()
version=2.2.1-edge.ec0447db5d27049f5bb87d639e043993a76593cd (Mon Apr 15 02:17:44 2019 +0000) on "linux_simarm"
thread=12541, isolate=vm-isolate(0x3526000)
pc 0x01a95b1c fp 0xff96e118 dart::Profiler::DumpStackTrace(void*)
pc 0x01d54124 fp 0xff96e138 Dart_DumpNativeStackTrace
pc 0x01d5611b fp 0xff96e168 dart::Assert::Fail(char const*, ...)
pc 0x01b797d8 fp 0xff96e1b8 dart::compiler::Assembler::EmitMultiVDMemOp(arch_arm::Condition, dart::BlockAddressMode, bool, arch_arm::Register, arch_arm::DRegister, int)
pc 0x01b80504 fp 0xff96e218 dart::compiler::Assembler::PushRegisters(dart::RegisterSet const&)
pc 0x01cf3ed4 fp 0xff96e258 dart::compiler::StubCodeCompiler::GenerateEnterSafepointStub(dart::compiler::Assembler*)
pc 0x01b36773 fp 0xff96e338 dart::StubCode::Generate(char const*, dart::compiler::ObjectPoolBuilder*, void ()(dart::compiler::Assembler))
pc 0x01b360d7 fp 0xff96e3a8 dart::StubCode::Init()
pc 0x01939ef6 fp 0xff96eae8 dart::Dart::Init(unsigned char const*, unsigned char const*, _Dart_Isolate* ()(char const, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**), void ()(void), void ()(void), void ()(), void ()(char const, bool), void ()(unsigned char**, int, void*), void ()(void const, int, void*), void ()(void), bool ()(unsigned char, int), _Dart_Handle* (*)(), bool)
pc 0x01d2ec26 fp 0xff96eb48 Dart_Initialize
pc 0x017027f8 fp 0xff96ec08 dart::bin::main(int, char**)
pc 0x01703264 fp 0xff96ec38 main
-- End of DumpStackTrace

@aartbik aartbik self-assigned this Apr 15, 2019

@aartbik

This comment has been minimized.

Copy link
Contributor Author

aartbik commented Apr 15, 2019

Using "DebugSIMARM/dart", this can be reproduced with ToT (note, must be pretty recent, my Friday build ran just fine):

$ dart fuzz.dart
throws
{88: A♥6Ub, 97: tL!r, 21: MH, 67: F#k♥hy1, 36: 😀D, 84: #, 59: 😀😀}
0.9113848306708358
13
{-9223372036854775808, 22}
true
-96
0.9314365705584955
j
[-63, 74, -3, -34, -39, 50, -43, 66]
{-32, -59, -51, -69, 6442450944}
{32: C♥, 17: r8😀f@6}


$ dart  --intrinsify=false --no-use-vfp fuzz.dart

../../runtime/vm/compiler/assembler/assembler_arm.cc: 851: error: expected: TargetCPUFeatures::vfp_supported()
version=2.2.1-edge.74f3dd3a3adbbd121a26851e6443a2410251edd1 (Mon Apr 15 10:06:40 2019 -0700) on "linux_simarm"
thread=86799, isolate=vm-isolate(0x271e000)
  pc 0x01ab7b6c fp 0xffbffc58 dart::Profiler::DumpStackTrace(void*)
  pc 0x01d76f94 fp 0xffbffc78 Dart_DumpNativeStackTrace
  pc 0x01d78f8b fp 0xffbffca8 dart::Assert::Fail(char const*, ...)
  pc 0x01b9b8d8 fp 0xffbffcf8 dart::compiler::Assembler::EmitMultiVDMemOp(arch_arm::Condition, dart::BlockAddressMode, bool, arch_arm::Register, arch_arm::DRegister, int)
  pc 0x01ba2604 fp 0xffbffd58 dart::compiler::Assembler::PushRegisters(dart::RegisterSet const&)
  pc 0x01d16d44 fp 0xffbffd98 dart::compiler::StubCodeCompiler::GenerateEnterSafepointStub(dart::compiler::Assembler*)
  pc 0x01b58873 fp 0xffbffe78 dart::StubCode::Generate(char const*, dart::compiler::ObjectPoolBuilder*, void (*)(dart::compiler::Assembler*))
  pc 0x01b581d7 fp 0xffbffee8 dart::StubCode::Init()
  pc 0x0195bef6 fp 0xffc00628 dart::Dart::Init(unsigned char const*, unsigned char const*, _Dart_Isolate* (*)(char const*, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**), void (*)(void*), void (*)(void*), void (*)(), void* (*)(char const*, bool), void (*)(unsigned char**, int*, void*), void (*)(void const*, int, void*), void (*)(void*), bool (*)(unsigned char*, int), _Dart_Handle* (*)(), bool)
  pc 0x01d51a96 fp 0xffc00688 Dart_Initialize
  pc 0x017247f8 fp 0xffc00748 dart::bin::main(int, char**)
  pc 0x01725264 fp 0xffc00778 main
-- End of DumpStackTrace
./x: line 77: 86799 Aborted                 ${MYDRT} $P --intrinsify=false --no-use-vfp $*


@aartbik aartbik assigned mkustermann and unassigned aartbik Apr 15, 2019

@aartbik

This comment has been minimized.

Copy link
Contributor Author

aartbik commented Apr 15, 2019

Attaching the fuzz.dart (as txt) for your convenience.
fuzz.dart.txt

@sjindel-google sjindel-google self-assigned this Apr 16, 2019

@sjindel-google

This comment has been minimized.

Copy link
Contributor

sjindel-google commented Apr 16, 2019

AddAllGeneralRegisters was introduced for the FFI, and I can see from this bug that we have other similar bugs which can be triggered by using the FFI.

@sjindel-google sjindel-google added this to 1.0 in Dart VM FFI via automation Apr 16, 2019

@sjindel-google sjindel-google changed the title TargetCPUFeatures::vfp_supported() Support FFI on ARMv5 Apr 16, 2019

@dart-bot dart-bot closed this in f0da03c Apr 17, 2019

Dart VM FFI automation moved this from 1.0 to Done Apr 17, 2019

@mraleph

This comment has been minimized.

Copy link
Contributor

mraleph commented Apr 18, 2019

We are planning to remove ARMv5 support from the VM.

#36666

@mraleph mraleph closed this Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.