Skip to content

Message serialization crashes on Int32x4 #46793

@mkustermann

Description

@mkustermann

This code seems to crash the VM:

import 'dart:isolate';
import 'dart:typed_data';

main() {
  var rp = ReceivePort();
  rp.sendPort.send(Int32x4(1, 2, 3, 4));
  rp.close();
}

with

out/ReleaseX64/dart test.dart
../../runtime/vm/message_snapshot.cc: 3240: error: No cluster defined for cid 59
version=2.14.0-edge.92b5f0887f080d22ee0abdc41f76a753f3c75d6b (be) (Tue Aug 3 11:16:14 2021 +0200) on "linux_x64"
pid=1806579, thread=1806587, isolate_group=main(0x5592b1883c00), isolate=main(0x5592b1857000)
isolate_instructions=5592ae97cce0, vm_instructions=5592ae97cce0
  pc 0x00005592aebe5cec fp 0x00007f78c177e260 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x00005592ae97ce94 fp 0x00007f78c177e340 dart::Assert::Fail(char const*, ...)+0x84
  pc 0x00005592aeb4a814 fp 0x00007f78c177e390 out/ReleaseX64/dart+0x1ef0814
  pc 0x00005592aeb4a0fa fp 0x00007f78c177e3d0 dart::MessageSerializer::Trace(dart::Object*)+0x1aa
  pc 0x00005592aeb4bc32 fp 0x00007f78c177e430 dart::MessageSerializer::Serialize(dart::Object const&)+0x62
  pc 0x00005592aeb4cea3 fp 0x00007f78c177e640 dart::WriteMessage(bool, dart::Object const&, long, dart::Message::Priority)+0x153
  pc 0x00005592aeaa81f4 fp 0x00007f78c177e690 dart::BootstrapNatives::DN_SendPortImpl_sendInternal_(dart::Thread*, dart::Zone*, dart::NativeArguments*)+0x184
  pc 0x00005592aeb58064 fp 0x00007f78c177e710 dart::NativeEntry::BootstrapNativeCallWrapper(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*))+0xb4
  pc 0x00007f78ca182594 fp 0x00007f78c177e750 Unknown symbol
  pc 0x00007f78c43a1856 fp 0x00007f78c177e798 Unknown symbol
  pc 0x00007f78c43a1794 fp 0x00007f78c177e7d8 Unknown symbol
  pc 0x00007f78c43a36d6 fp 0x00007f78c177e818 Unknown symbol
  pc 0x00007f78c43a35e9 fp 0x00007f78c177e840 Unknown symbol
  pc 0x00007f78c43a3519 fp 0x00007f78c177e8a0 Unknown symbol
  pc 0x00007f78c43a23e0 fp 0x00007f78c177e8d8 Unknown symbol
  pc 0x00007f78c43a216c fp 0x00007f78c177e940 Unknown symbol
  pc 0x00007f78c43a1a2b fp 0x00007f78c177e980 Unknown symbol
  pc 0x00007f78ca1828ff fp 0x00007f78c177e9f8 Unknown symbol
  pc 0x00005592aeaf3f23 fp 0x00007f78c177eaa0 dart::DartEntry::InvokeCode(dart::Code const&, unsigned long, dart::Array const&, dart::Array const&, dart::Thread*)+0x153
  pc 0x00005592aeaf3d75 fp 0x00007f78c177eb00 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x165
  pc 0x00005592aeaf635d fp 0x00007f78c177eb50 dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)+0x15d
  pc 0x00005592aeb1dc46 fp 0x00007f78c177ec30 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0x596
  pc 0x00005592aeb485ac fp 0x00007f78c177eca0 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x14c
  pc 0x00005592aeb48ccf fp 0x00007f78c177ed00 dart::MessageHandler::TaskCallback()+0x1df
  pc 0x00005592aec66e98 fp 0x00007f78c177ed80 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x148
  pc 0x00005592aec672cc fp 0x00007f78c177edb0 dart::ThreadPool::Worker::Main(unsigned long)+0x5c
  pc 0x00005592aebe0ad8 fp 0x00007f78c177ee70 out/ReleaseX64/dart+0x1f86ad8

The bug seems to have been introduced in bbefc05

/cc @rmacnak-google

Metadata

Metadata

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.crashProcess exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions