From ccf4c9d99fcffbc9bf65066004896745b9dcc340 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 4 Nov 2011 15:58:37 -0700 Subject: [PATCH] Don't decr profiling count without incr The failure cleanup code in dvmMethodTraceStart() was assuming that profiling had already been started, which was true until my previous change. The code in the interpreter isn't too picky, but updateActiveProfilers() is trying to keep an accurate acount, and gets upset. If you pass in a bad filename, we disable something that was never enabled, and the VM gets confused and aborts out of spite. Related to bug 5564440 Change-Id: I17fd8bf4654c29f49efb10142d222a91c190b6ed --- vm/Profile.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/vm/Profile.cpp b/vm/Profile.cpp index c21d1b84e..e1dfc439a 100644 --- a/vm/Profile.cpp +++ b/vm/Profile.cpp @@ -459,7 +459,6 @@ void dvmMethodTraceStart(const char* traceFileName, int traceFd, int bufferSize, return; fail: - updateActiveProfilers(kSubModeMethodTrace, false); if (state->traceFile != NULL) { fclose(state->traceFile); state->traceFile = NULL; -- 2.11.0