Loading core/java/com/android/internal/os/ZygoteConnection.java +2 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,8 @@ class ZygoteConnection { if (parsedArgs.mInvokeWith != null || parsedArgs.mStartChildZygote || !multipleOK || peer.getUid() != Process.SYSTEM_UID) { Log.w(TAG, "Resorting to Java fork code; multipleOK = " + multipleOK + (parsedArgs.mInvokeWith != null ? "; invokeWith used" : "")); // Continue using old code for now. TODO: Handle these cases in the other path. pid = Zygote.forkAndSpecialize(parsedArgs.mUid, parsedArgs.mGid, parsedArgs.mGids, parsedArgs.mRuntimeFlags, rlimits, Loading core/jni/com_android_internal_os_ZygoteCommandBuffer.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -253,6 +253,22 @@ class NativeCommandBuffer { niceNameAddr(), static_cast<unsigned>(mEnd), static_cast<unsigned>(mNext), static_cast<int>(mLinesLeft), mFd); if (niceNameAddr()[0] == '\0') { // The above didn't identify the command; dump buffer prefix as well. static constexpr uint32_t DUMP_SIZE = 40; char bufferCopy[DUMP_SIZE + 1]; uint32_t i = 0; for (; i < DUMP_SIZE && i < mEnd; ++i) { if (mBuffer[i] < 0x20 || mBuffer[i] >= 0x7f) { // Not easily printable. Includes the expected newlines. bufferCopy[i] = '?'; } else { bufferCopy[i] = mBuffer[i]; } } bufferCopy[i] = '\0'; ALOGD("Buffer content prefix: %s", bufferCopy); } } private: Loading Loading
core/java/com/android/internal/os/ZygoteConnection.java +2 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,8 @@ class ZygoteConnection { if (parsedArgs.mInvokeWith != null || parsedArgs.mStartChildZygote || !multipleOK || peer.getUid() != Process.SYSTEM_UID) { Log.w(TAG, "Resorting to Java fork code; multipleOK = " + multipleOK + (parsedArgs.mInvokeWith != null ? "; invokeWith used" : "")); // Continue using old code for now. TODO: Handle these cases in the other path. pid = Zygote.forkAndSpecialize(parsedArgs.mUid, parsedArgs.mGid, parsedArgs.mGids, parsedArgs.mRuntimeFlags, rlimits, Loading
core/jni/com_android_internal_os_ZygoteCommandBuffer.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -253,6 +253,22 @@ class NativeCommandBuffer { niceNameAddr(), static_cast<unsigned>(mEnd), static_cast<unsigned>(mNext), static_cast<int>(mLinesLeft), mFd); if (niceNameAddr()[0] == '\0') { // The above didn't identify the command; dump buffer prefix as well. static constexpr uint32_t DUMP_SIZE = 40; char bufferCopy[DUMP_SIZE + 1]; uint32_t i = 0; for (; i < DUMP_SIZE && i < mEnd; ++i) { if (mBuffer[i] < 0x20 || mBuffer[i] >= 0x7f) { // Not easily printable. Includes the expected newlines. bufferCopy[i] = '?'; } else { bufferCopy[i] = mBuffer[i]; } } bufferCopy[i] = '\0'; ALOGD("Buffer content prefix: %s", bufferCopy); } } private: Loading