<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Possible fix for JSC api test failures in debug mode after r187020."
href="https://bugs.webkit.org/show_bug.cgi?id=147110#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Possible fix for JSC api test failures in debug mode after r187020."
href="https://bugs.webkit.org/show_bug.cgi?id=147110">bug 147110</a>
from <span class="vcard"><a class="email" href="mailto:peavo@outlook.com" title="peavo@outlook.com">peavo@outlook.com</a>
</span></b>
<pre>Is this a possible scenario for the assert?
A thread not created with WTF::createThread() calls WTF::currentThread(), and then exits.
Next a thread created with WTF::createThread reuses the pthread_t handle, and then asserts.
For example, I see that JavaScriptCore\API\tests\testapi.mm is creating a thread using just pthread_create:
@autoreleasepool {
JSContext *context = [[JSContext alloc] init];
pthread_t threadID;
pthread_create(&threadID, NULL, &threadMain, (__bridge void*)context);
pthread_join(threadID, nullptr);
JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]);
checkResult(@"Did not crash after entering the VM from another thread", true);
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>