Don't allow allocating finalizable objects during transactions.

It doesn't make sense to allocate finalizable objects during a
transcation since they will never get finalized without a started
runtime.

Before StatusInitialized in core.host.oatdump.txt: 3564
After StatusInitialized in core.host.oatdump.txt: 3564

Bug: 14078487

Change-Id: I7070536f7bb87bfc691d4268bd39a3eca492f48e
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index 297f1a8..5660508 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -40,6 +40,16 @@
   }
 }
 
+void AbortTransaction(Thread* self, const char* fmt, ...) {
+  CHECK(Runtime::Current()->IsActiveTransaction());
+  // Throw an exception so we can abort the transaction and undo every change.
+  va_list args;
+  va_start(args, fmt);
+  self->ThrowNewExceptionV(self->GetCurrentLocationForThrow(), "Ljava/lang/InternalError;", fmt,
+                           args);
+  va_end(args);
+}
+
 template<bool is_range, bool do_assignability_check>
 bool DoCall(ArtMethod* method, Thread* self, ShadowFrame& shadow_frame,
             const Instruction* inst, uint16_t inst_data, JValue* result) {