[all-commits] [llvm/llvm-project] 0c6428: scan-build-py: fix multiprocessing error

lawrence-danna-apple via All-commits all-commits at lists.llvm.org
Sat Sep 5 11:10:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0c642828612dbde30decff6fb080af4de9a173bd
      https://github.com/llvm/llvm-project/commit/0c642828612dbde30decff6fb080af4de9a173bd
  Author: Lawrence D'Anna <lawrence_danna at apple.com>
  Date:   2020-09-05 (Sat, 05 Sep 2020)

  Changed paths:
    M clang/tools/scan-build-py/bin/analyze-build
    M clang/tools/scan-build-py/bin/intercept-build
    M clang/tools/scan-build-py/bin/scan-build

  Log Message:
  -----------
  scan-build-py: fix multiprocessing error

Recent versions of python3's multiprocessing module will blow up with
a Runtime error from this code, saying:

  An attempt has been made to start a new process before the
  current process has finished its bootstrapping phase

This is becuae the wrappers in bin/ are not using the  `__name__ == "__main__"`   idiom correctly.

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D87051




More information about the All-commits mailing list