Reproducer for https://openradar.appspot.com/FB10500605 / rdar://FB10500605
$ sw_vers
ProductName: macOS
ProductVersion: 12.4
BuildVersion: 21F79
$ xcodebuild -version
Xcode 13.3
Build version 13E113
$ make && time ./driver
cc -O2 driver.c -o driver
cc -O2 sub.c -o sub
[+++] Let's crunch for SIGTRAP
child 55123 process was terminated by signal Trace/BPT trap: 5.
spawned 49559 times
please check crash logs at ~/Library/Logs/DiagnosticReports/ and look for 'sub'
./driver 8.04s user 30.80s system 693% cpu 5.604 total
$ make && time ./driver
make: Nothing to be done for `all'.
[+++] Let's crunch for SIGTRAP
child 97934 process was terminated by signal Trace/BPT trap: 5.
spawned 15199 times
please check crash logs at ~/Library/Logs/DiagnosticReports/ and look for 'sub'
./driver 2.46s user 9.20s system 766% cpu 1.520 total
$ make && time ./driver
make: Nothing to be done for `all'.
[+++] Let's crunch for SIGTRAP
child 4505 process was terminated by signal Trace/BPT trap: 5.
spawned 600817 times
please check crash logs at ~/Library/Logs/DiagnosticReports/ and look for 'sub'
./driver 97.30s user 364.05s system 762% cpu 1:00.47 total