CWE一覧に戻る
CWE-572

start()の代わりにスレッドrun()を呼び出す。

Call to Thread run() instead of start()
脆弱性 レビュー中
JA

この製品は、start()を呼び出す代わりにスレッドのrun()メソッドを呼び出すため、コードは呼び出し側ではなく呼び出し側のスレッドで実行される。

ほとんどの場合、Threadオブジェクトのrun()メソッドの直接呼び出しはバグである。プログラマーは新しい制御スレッドを開始するつもりだったが、誤ってstart()ではなくrun()を呼び出したため、run()メソッドは呼び出し元の制御スレッドで実行される。

EN

The product calls a thread's run() method instead of calling start(), which causes the code to run in the thread of the caller instead of the callee.

In most cases a direct call to a Thread object's run() method is a bug. The programmer intended to begin a new thread of control, but accidentally called run() instead of start(), so the run() method will execute in the caller's thread of control.

Scope: Other / Impact: Quality Degradation; Varies by Context
Use the start() method instead of the run() method.
MITRE公式ページ — CWE-572