CRASH and ASSERT creating threads in standalone mode on Windows
My new test burst_traceopts for #3977 runs raw2trace inside itself while in DR standalone mode. When raw2trace uses a worker pool, I see a number of issues:
An assert core\win32\os.c:2715 false
and another one \core\win32\callback.c:8708 false
due to DR's thread hook getting confused as to whether it should take these threads over. When I relax those asserts and let the threads go native, I still see a crash. However, the crash does not reproduce when I run in the debugger. Since I want to finish #3977 I am filing this to figure this out at a future date, and I'm disabling the thread pool for this test for now.
The crash is just like this:
% clients/bin64/tool.drcacheoff.burst_traceopts.exe
<Starting application D:\derek\dr\git\build_vs2013_x64_dbg_tests\clients\bin64\tool.drcacheoff.burst_traceopts.exe (12172)>
<Running on newer-than-this-build "Microsoft Windows 10-1903 x64">
<Early threads found>
<Initial options = -client_lib ';;-offline ' -msgbox_mask 0 -stderr_mask 15 -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct -pad_jmps_mark_no_trace >
<Detaching from application D:\derek\dr\git\build_vs2013_x64_dbg_tests\clients\bin64\tool.drcacheoff.burst_traceopts.exe (12172)>
<Detaching from process, entering final cleanup>
Segmentation fault