gh-144766: Fix a crash in fork child process when perf support is enabled. (#144795)

3 files changed