So what I do know as of now is that the failing test `c-index-test -test-annotate-tokens` is structured like this:
main
-> spawn outerWorker
----> spawn innerWorker
----> join innerWorker
-> joinOuterWorker
The crash happens when it was about to start the inner worker, but that's pretty much all I know as of now
@robryk
> either `pthread_create` or `pthread_attr_setstacksize` failed
This is the fun part: I said this because the error message and gdb disagrees about what function failed; the error message says something like "LIBCLANG FATAL ERROR: pthread_create failed: Bad address", but gdb's backtrace points to `pthread_attr_setstacksize` as the source of failure
@robryk Nothing died, it's more like either `pthread_create` or `pthread_attr_setstacksize` failed and then the entire program just noped out upon getting the return value
The chain is like:
`main` in c-index-test.c -> pthread_create `thread_runner` -> pthread_create `ParseTranslationUnitImpl`
It's the creation of ParseTranslationUnitImpl that fails
If I replaced the `pthread_create`s with a plain function call, then everything would work flawlessly