Index: runtime/vm/disassembler_x64.cc |
diff --git a/runtime/vm/disassembler_x64.cc b/runtime/vm/disassembler_x64.cc |
index 9f43a387ba81ce8d31f8280e3867d6eeec7713f4..ffd610823ec0fc88008c59534efa829a436ec04c 100644 |
--- a/runtime/vm/disassembler_x64.cc |
+++ b/runtime/vm/disassembler_x64.cc |
@@ -796,11 +796,8 @@ static const char* ObjectToCStringNoGC(const Object& obj) { |
const Class& clazz = Class::Handle(obj.clazz()); |
const char* full_class_name = clazz.ToCString(); |
- const char* format = "instance of %s"; |
- intptr_t len = OS::SNPrint(NULL, 0, format, full_class_name) + 1; |
- char* chars = Thread::Current()->zone()->Alloc<char>(len); |
- OS::SNPrint(chars, len, format, full_class_name); |
- return chars; |
+ return OS::SCreate(Thread::Current()->zone(), |
+ "instance of %s", full_class_name); |
} |