lshal: do not pthread_kill
All of the commands are executed by starting a thread, and if there is a timeout, sending a SIGINT to the thread, which invokes pthread_exit from the signal handler. If pthread_exit is called while the thread is in jemalloc code, that might cause problems. To avoid this, we stop calling pthread_kill on the background helper threads. If they time out, simply ignore the thread and move on. Although this causes memory leak, the lshal tool is a debugging tool that is intended to run for a short period of time, not as a daemon. So this is okay. Test: lshal_test Bug: 311143089 Change-Id: I031e5fb6cfc0f10952d10e41d6d1f716ff51dcb3
Loading
Please register or sign in to comment