Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native resource leak due to the missing pthread_detach call in mozc::Thread::Detach #355

Closed
yukawa opened this issue Jan 16, 2016 · 0 comments

Comments

@yukawa
Copy link
Collaborator

yukawa commented Jan 16, 2016

(This issue was originally reported by @besthust as #340)

Environment

  • Mozc 2.17.2313.102 and prior
  • Android 6.0.1 MMB29S / Nexus 5 2013.

How to setup the environment to reproduce.

python build_mozc.py build -c Debug package
adb install -r -d android/bin/MozcForAndroid-debug.apk
adb shell ime set org.mozc.android.inputmethod.japanese/.MozcService

Steps to reproduce

  1. adb shell dumpsys meminfo org.mozc.android.inputmethod.japanese
  2. Tap the search box on the home screen.
  3. Tap the buck button to dismiss the software keyboard.
  4. Return to the step 1.

Expected behavior

  • In the step 1 the native heap size should be stable for each iteration.

Actual behavior

  • In the step 1 the native heap size keeps growing for each iteration.

Additional information

This is a native resource (including memory) leak due to the missing pthread_detach call in mozc::Thread::Detach src/base/thread.cc

void Thread::Detach() {
  state_->handle_.reset(nullptr);
}

Possible affected platforms:

  • Mozc for Android
  • Mozc for Linux
  • Mozc for NaCl
  • Mozc for OS X

Internal Issue ID: 26499803.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants