[all-commits] [llvm/llvm-project] e0f889: Avoid a race condition in opt-viewer/optrecord (#1...

Miro Hrončok via All-commits all-commits at lists.llvm.org
Wed Apr 2 02:53:02 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e0f8898e1d432ab4fdcaf353bf87a1d3cf36491a
      https://github.com/llvm/llvm-project/commit/e0f8898e1d432ab4fdcaf353bf87a1d3cf36491a
  Author: Miro Hrončok <miro at hroncok.cz>
  Date:   2025-04-02 (Wed, 02 Apr 2025)

  Changed paths:
    M llvm/tools/opt-viewer/optrecord.py

  Log Message:
  -----------
  Avoid a race condition in opt-viewer/optrecord (#131214)

See https://bugzilla.redhat.com/2336915
See https://reviews.llvm.org/D41784?id=
See
https://github.com/androm3da/optviewer-demo/issues/4#issuecomment-718787822

Fixes https://github.com/llvm/llvm-project/issues/62403.

The race condition happened when the demangler_proc was being set. The
locking mechanism itself happened too late.

This way, the lock always exists (to avoid a race when creating it) and
is always used when *creating* demangler_proc.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list