[Solved] Pthread Troubles have Emerged?

The PThread change reviewed at https://review.haiku-os.org/c/haiku/+/5989 seems to be causing troubles during a large parallel build of Clang 8 using W2C2 on x86_64. If needed, I can rig up a tarball to test against but it consistently segmentation faults when generating the C source using multiple threads. Single-threaded code generation works when built without PThreads support but not single-threaded when PThreads support is added in. Oddly, the issue doesn’t show up using the smaller Python example even in parallel builds.

I’m not familiar enough with PThreads to know what’s going on, I just know that executables compiled before the Software Updater was run also mess up even though not rebuilt.

Before I fill out an actual bug report, I want to know if this was sent to the beta channel or not. If not, this is not the problem.

No, this is only in nightlies.

1 Like

OK. Thanks, I’ll keep looking.

For reference (as to compare against the master branch), here’s the commits log for beta4 branch.

1 Like

Update:

The pthread bug only occurs at optimization levels 2 and 3 on GCC. It’s not an OS bug. It’s likely a miscompile.

1 Like

can you compare the output code from the compiler to see the difference in generated code??? I’m curious

Oddly, the issue doesn’t show up using the smaller Python example even in parallel builds.

Actually some days ago when using my Python PO Editor only in one occasion it was unresponsive and won’t close. Using ProcessController I saw a huge amount threads opened (I’m using nightly 32 bit)