ALOGE("Unable to allocate monitor");
dvmAbort();
}
- if (((u4)mon & 7) != 0) {
- ALOGE("Misaligned monitor: %p", mon);
- dvmAbort();
- }
mon->obj = obj;
dvmInitMutex(&mon->lock);
size_t len;
int fd;
+ /* When a thread is being destroyed it is normal that the frame depth is zero */
+ if (self->interpSave.curFrame == NULL) {
+ return;
+ }
+
saveArea = SAVEAREA_FROM_FP(self->interpSave.curFrame);
meth = saveArea->method;
cp = eventBuffer;
#ifndef WITH_COPYING_GC
u4 dvmIdentityHashCode(Object *obj)
{
- return (u4)obj;
+ /*
+ * The following assumes that objects are allocated at even boundaries, so
+ * the shift preserves uniqueness of hashCode() while guaranteeing a
+ * non-negative result (for the convenience of some applications,like MiTalk).
+ */
+ return (u4)(((u4)obj)>>1);
}
#else
/*