[PATCH] D157459: Make DWARFContext more thread safe.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 12:07:09 PDT 2023


clayborg added a comment.

I know this patch is far from adding complete thread safety to this class, but it does address some fairly simple issues that can cause things to crash. This patch protects any function that has the format of:

  if (MemberVar)
    return MemberVar;
  // Initialize MemberVar and then expensive work to populate MemberVar 
  return MemberVar;

The expensive work to populate can take some time and protecting this with a mutex seems like the right thing to do.

Are there any concrete steps I can take to help make this patch work for everyone? I have heard concerns but no real steps or tips on what it would take for people to move this patch along.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157459/new/

https://reviews.llvm.org/D157459



More information about the llvm-commits mailing list