OSDN Git Service

Remove ((noreturn)) from dvmAbort().
authorAndy McFadden <fadden@android.com>
Thu, 24 Sep 2009 21:44:59 +0000 (14:44 -0700)
committerAndy McFadden <fadden@android.com>
Thu, 24 Sep 2009 21:50:23 +0000 (14:50 -0700)
Functions that could call dvmAbort() from more than one place were
merging the calls together, which is great until you need to decode a
native stack trace.

For 2144313.

vm/Misc.h

index 1566161..14635a3 100644 (file)
--- a/vm/Misc.h
+++ b/vm/Misc.h
@@ -263,12 +263,14 @@ bool dvmSetCloseOnExec(int fd);
 
 /*
  * Unconditionally abort the entire VM.  Try not to use this.
+ *
+ * NOTE: if this is marked ((noreturn)), gcc will merge multiple dvmAbort()
+ * calls in a single function together.  This is good, in that it reduces
+ * code size slightly, but also bad, because the native stack trace we
+ * get from the abort may point at the wrong call site.  Best to leave
+ * it undecorated.
  */
-void dvmAbort(void)
-#if defined(__GNUC__)
-    __attribute__ ((noreturn))
-#endif
-    ;
+void dvmAbort(void);
 
 #if (!HAVE_STRLCPY)
 /* Implementation of strlcpy() for platforms that don't already have it. */