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

Miro Hrončok via All-commits all-commits at lists.llvm.org
Fri Apr 11 12:30:34 PDT 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: d5bb7b866e59b395aade5fb2049eac0f4fddcced
      https://github.com/llvm/llvm-project/commit/d5bb7b866e59b395aade5fb2049eac0f4fddcced
  Author: Miro Hrončok <miro at hroncok.cz>
  Date:   2025-04-11 (Fri, 11 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.

(cherry picked from commit e0f8898e1d432ab4fdcaf353bf87a1d3cf36491a)



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