Compilation and usage instructions for break_threads ...
$ g++ -g -Wall -Werror -pipe -O3 -Wno-deprecated break_pthreads.cpp -o break_pthreads.o -c $ g++ -g -pthread break_pthreads.o -o break_pthreads $ ./break_pthreads break_pthreads: pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed. Aborted (core dumped)
Compilation and usage instructions for break_threads ...
$ g++ -g -Wall -Werror -pipe -O3 -Wno-deprecated break_pthreads.cpp -o break_pthreads.o -c mutex_lock. c:62: __pthread_ mutex_lock: Assertion `mutex- >__data. __owner == 0' failed.
$ g++ -g -pthread break_pthreads.o -o break_pthreads
$ ./break_pthreads
break_pthreads: pthread_
Aborted (core dumped)