aboutsummaryrefslogtreecommitdiff
path: root/src/make2mk
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-05-17 08:24:54 -0400
committerRuss Cox <rsc@swtch.com>2020-05-17 20:15:41 -0400
commitbaef953da253314657be9adea8f371bfbf4ba09e (patch)
treed0fa955ae93fec8ba8f167d1711009e983c11285 /src/make2mk
parent06687f70ba7a5836c2e872648a85a724a5a1d486 (diff)
downloadplan9port-baef953da253314657be9adea8f371bfbf4ba09e.tar.gz
plan9port-baef953da253314657be9adea8f371bfbf4ba09e.tar.bz2
plan9port-baef953da253314657be9adea8f371bfbf4ba09e.zip
libthread: add pthreadperthread mode and use under ASAN
ASAN can't deal with the coroutine stacks. In theory we can call into ASAN runtime to let it know about them, but ASAN still has problems with fork or exit happening from a non-system stack. Bypass all possible problems by just having a full OS thread for each libthread thread. The threads are still cooperatively scheduled within a proc (in thos mode, a group of OS threads). Setting the environment variable LIBTHREAD=pthreadperthread will enable the pthreadperthread mode, as will building with CC9FLAGS='-fsanitize=address' in $PLAN9/config. This solution is much more general than ASAN - for example if you are trying to find all the thread stacks in a reproducible crash you can use pthreadperthread mode with any debugger that knows only about OS threads.
Diffstat (limited to 'src/make2mk')
0 files changed, 0 insertions, 0 deletions