1Process:               multithread-test [22511]
2Path:                  /Users/USER/*/multithread-test
3Identifier:            multithread-test
4Version:               ???
5Code Type:             ARM-64 (Native)
6Parent Process:        zsh [59146]
7Responsible:           Terminal [1640]
8User ID:               501
9
10Date/Time:             2022-07-28 11:10:19.4194 -0700
11OS Version:            macOS 13.0 ()
12Report Version:        12
13Anonymous UUID:        CDC11418-EDBF-2A49-0D83-8B441A5004B0
14
15Sleep/Wake UUID:       7B2A0D73-8966-4B8D-98E9-CC6EC1B44967
16
17Time Awake Since Boot: 110000 seconds
18Time Since Wake:       214 seconds
19
20System Integrity Protection: disabled
21
22Crashed Thread:        2
23
24Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
25Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
26Exception Codes:       0x0000000000000001, 0x0000000000000000
27
28Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
29Terminating Process:   exc handler [22511]
30
31VM Region Info: 0 is not in any region.  Bytes before following region: 4310450176
32      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
33      UNUSED SPACE AT START
34--->
35      __TEXT                      100ec4000-100ec8000    [   16K] r-x/r-x SM=COW  ...tithread-test
36
37Thread 0::  Dispatch queue: com.apple.main-thread
380   libsystem_kernel.dylib        	       0x19cc40b84 __ulock_wait + 8
391   libsystem_pthread.dylib       	       0x19cc80394 _pthread_join + 444
402   libc++.1.dylib                	       0x19cbd8274 std::__1::thread::join() + 36
413   multithread-test              	       0x100ec5b3c main + 160 (multithread-test.cpp:31)
424   dyld                          	       0x2230f8da8 start + 2376
43
44Thread 1:
450   libsystem_kernel.dylib        	       0x19cc42c9c __write_nocancel + 8
461   libsystem_c.dylib             	       0x19cb719a8 __swrite + 24
472   libsystem_c.dylib             	       0x19cb50ac8 _swrite + 108
483   libsystem_c.dylib             	       0x19cb4ec2c __sflush + 232
494   libsystem_c.dylib             	       0x19cb42f20 __sfvwrite + 792
505   libsystem_c.dylib             	       0x19cb61f64 fwrite + 152
516   libc++.1.dylib                	       0x19cbed084 std::__1::__stdoutbuf<char>::overflow(int) + 96
527   libc++.1.dylib                	       0x19cbe06b4 std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >::operator=(char) + 96
538   libc++.1.dylib                	       0x19cbe0798 std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char) + 200
549   multithread-test              	       0x100ec5a54 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) + 64 (ostream:994)
5510  multithread-test              	       0x100ec5a08 std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >& (*)(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)) + 32 (ostream:189)
5611  multithread-test              	       0x100ec5958 call_and_wait(int&) + 48 (multithread-test.cpp:14)
5712  multithread-test              	       0x100ec7684 decltype(static_cast<void (*>(fp)(static_cast<std::__1::reference_wrapper<int>>(fp0))) std::__1::__invoke<void (*)(int&), std::__1::reference_wrapper<int> >(void (*&&)(int&), std::__1::reference_wrapper<int>&&) + 48 (type_traits:3918)
5813  multithread-test              	       0x100ec7608 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(int&), std::__1::reference_wrapper<int>, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(int&), std::__1::reference_wrapper<int> >&, std::__1::__tuple_indices<2ul>) + 56 (thread:287)
5914  multithread-test              	       0x100ec6d58 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(int&), std::__1::reference_wrapper<int> > >(void*) + 84 (thread:298)
6015  libsystem_pthread.dylib       	       0x19cc7e06c _pthread_start + 148
6116  libsystem_pthread.dylib       	       0x19cc78e2c thread_start + 8
62
63Thread 2 Crashed:
640   multithread-test              	       0x100ec58f4 bar(int) + 20 (multithread-test.cpp:7)
651   multithread-test              	       0x100ec591c foo(int) + 24 (multithread-test.cpp:11)
662   multithread-test              	       0x100ec5a88 compute_pow(int&) + 28 (multithread-test.cpp:20)
673   multithread-test              	       0x100ec7684 decltype(static_cast<void (*>(fp)(static_cast<std::__1::reference_wrapper<int>>(fp0))) std::__1::__invoke<void (*)(int&), std::__1::reference_wrapper<int> >(void (*&&)(int&), std::__1::reference_wrapper<int>&&) + 48 (type_traits:3918)
684   multithread-test              	       0x100ec7608 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(int&), std::__1::reference_wrapper<int>, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(int&), std::__1::reference_wrapper<int> >&, std::__1::__tuple_indices<2ul>) + 56 (thread:287)
695   multithread-test              	       0x100ec6d58 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(int&), std::__1::reference_wrapper<int> > >(void*) + 84 (thread:298)
706   libsystem_pthread.dylib       	       0x19cc7e06c _pthread_start + 148
717   libsystem_pthread.dylib       	       0x19cc78e2c thread_start + 8
72
73
74Thread 2 crashed with ARM Thread State (64-bit):
75    x0: 0x000000000000002a   x1: 0x0000600001d291b0   x2: 0x000000019cbbf000   x3: 0x0000000000000000
76    x4: 0x00000000000030a0   x5: 0x00000000190008ff   x6: 0x0000000000000000   x7: 0x0000000000000000
77    x8: 0x0000000000000001   x9: 0x0000000000000000  x10: 0xfffffffe634277cf  x11: 0x0000010000000102
78   x12: 0x0000010000000102  x13: 0x0000010000000100  x14: 0x0000010000000000  x15: 0x0000000000000001
79   x16: 0x000000019cc78ea8  x17: 0x00000001fd0a7698  x18: 0x0000000000000000  x19: 0x000000016f04f000
80   x20: 0x0000000000000000  x21: 0x0000000000000000  x22: 0x0000000000000000  x23: 0x0000000000000000
81   x24: 0x0000000000000000  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x0000000000000000
82   x28: 0x0000000000000000   fp: 0x000000016f04ef00   lr: 0x0000000100ec591c
83    sp: 0x000000016f04eee0   pc: 0x0000000100ec58f4 cpsr: 0x80001000
84   far: 0x0000000000000000  esr: 0x92000046 (Data Abort) byte write Translation fault
85
86Binary Images:
87       0x19cc3e000 -        0x19cc76feb libsystem_kernel.dylib (*) <b8898079-5424-3e89-92b0-33022c3be1bb> /usr/lib/system/libsystem_kernel.dylib
88       0x19cc77000 -        0x19cc83ffb libsystem_pthread.dylib (*) <ffd36328-45f2-31c5-9240-9f76f26a1a2b> /usr/lib/system/libsystem_pthread.dylib
89       0x19cbbf000 -        0x19cc25ff3 libc++.1.dylib (*) <da619b87-2723-3731-919a-bb3467eab9e1> /usr/lib/libc++.1.dylib
90
91       0x100ec4000 -        0x100ec7fff multithread-test (*) <ab9b94f9-6cdf-3b8e-b140-fae3cb13d327> /Users/USER/*/multithread-test
92       0x2230f3000 -        0x22317be4b dyld (*) <e81312a0-f3e5-3c60-8c25-4599b62b8b4a> /usr/lib/dyld
93       0x19cb3e000 -        0x19cbbefff libsystem_c.dylib (*) <b8f1c3ed-9048-34a6-8070-6c18d4ade541> /usr/lib/system/libsystem_c.dylib
94               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
95            0x3039 -             0x3420 bogus.dylib (*) <11111111-2222-3333-4444-555555555555> /usr/lib/system/bogus.dylib
96
97External Modification Summary:
98  Calls made by other processes targeting this process:
99    task_for_pid: 0
100    thread_create: 0
101    thread_set_state: 0
102  Calls made by this process:
103    task_for_pid: 0
104    thread_create: 0
105    thread_set_state: 0
106  Calls made by all processes on this machine:
107    task_for_pid: 23
108    thread_create: 0
109    thread_set_state: 812
110
111VM Region Summary:
112ReadOnly portion of Libraries: Total=762.9M resident=0K(0%) swapped_out_or_unallocated=762.9M(100%)
113Writable regions: Total=538.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=538.2M(100%)
114
115                                VIRTUAL   REGION
116REGION TYPE                        SIZE    COUNT (non-coalesced)
117===========                     =======  =======
118Kernel Alloc Once                   32K        1
119MALLOC                           145.2M       12
120MALLOC guard page                   96K        5
121MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
122STACK GUARD                       56.0M        3
123Stack                             9264K        3
124__AUTH                              46K       11
125__AUTH_CONST                        70K       38
126__DATA                             169K       36
127__DATA_CONST                       187K       40
128__DATA_DIRTY                        78K       22
129__LINKEDIT                       758.0M        2
130__OBJC_CONST                        11K        5
131__OBJC_RO                         64.7M        1
132__OBJC_RW                         1971K        1
133__TEXT                            5076K       42
134dyld private memory                256K        1
135shared memory                       64K        3
136===========                     =======  =======
137TOTAL                              1.4G      227
138TOTAL, minus reserved VM space     1.0G      227
139
140
141
142