Bug 158612

Summary: WTF_CrossThreadTask.Basic fails in all non mac ports
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Web Template FrameworkAssignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, bugs-noreply, darin
Priority: P2 Keywords: Regression
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Carlos Garcia Campos
Reported 2016-06-09 22:53:24 PDT
../../Tools/TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:105 Value of: LifetimeLogger::takeLogStr().c_str() Actual: "default_constructor(<default>-0-0) copy_constructor(<default>-1-0) name_constructor(logger-0-0) isolatedCopy() copy_constructor(logger-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(<default>-1-0) move_constructor(logger-1-1) move_constructor(<default>-2-1) move_constructor(<default>-1-1) move_constructor(logger-1-2) move_constructor(<default>-2-2) move_constructor(<default>-1-2) destructor(<default>-1-1) destructor(<default>-2-1) destructor(logger-1-1) destructor(<default>-1-0) destructor(<default>-2-0) destructor(logger-1-0) testFunction called destructor(<default>-1-2) destructor(<default>-2-2) destructor(logger-1-2) destructor(logger-0-0) destructor(<default>-1-0) destructor(<default>-0-0) " Expected: "default_constructor(<default>-0-0) copy_constructor(<default>-1-0) name_constructor(logger-0-0) isolatedCopy() copy_constructor(<default>-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(logger-1-0) move_constructor(<default>-1-1) move_constructor(<default>-2-1) move_constructor(logger-1-1) destructor(logger-1-0) destructor(<default>-2-0) destructor(<default>-1-0) move_constructor(<default>-1-2) move_constructor(<default>-2-2) move_constructor(logger-1-2) destructor(logger-1-1) destructor(<default>-2-1) destructor(<default>-1-1) testFunction called destructor(logger-1-2) destructor(<default>-2-2) destructor(<default>-1-2) destructor(logger-0-0) destructor(<default>-1-0) destructor(<default>-0-0) " FAIL WTF_CrossThreadTask.Basic C:\cygwin\home\buildbot\slave\win-release\build\Tools\TestWebKitAPI\Tests\WTF\CrossThreadTask.cpp:105 Value of: LifetimeLogger::takeLogStr().c_str() Actual: "default_constructor(<default>-0-0) copy_constructor(<default>-1-0) name_constructor(logger-0-0) isolatedCopy() copy_constructor(logger-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(<default>-1-0) move_constructor(logger-1-1) move_constructor(<default>-2-1) move_constructor(<default>-1-1) move_constructor(logger-1-2) move_constructor(<default>-2-2) move_constructor(<default>-1-2) move_constructor(logger-1-3) move_constructor(<default>-2-3) move_constructor(<default>-1-3) destructor(<default>-1-2) destructor(<default>-2-2) destructor(logger-1-2) destructor(<default>-1-1) destructor(<default>-2-1) destructor(logger-1-1) destructor(<default>-1-0) destructor(<default>-2-0) destructor(logger-1-0) testFunction called destructor(<default>-1-3) destructor(<default>-2-3) destructor(logger-1-3) destructor(logger-0-0) destructor(<default>-1-0) destructor(<default>-0-0) " Expected: "default_constructor(<default>-0-0) copy_constructor(<default>-1-0) name_constructor(logger-0-0) isolatedCopy() copy_constructor(<default>-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(logger-1-0) move_constructor(<default>-1-1) move_constructor(<default>-2-1) move_constructor(logger-1-1) destructor(logger-1-0) destructor(<default>-2-0) destructor(<default>-1-0) move_constructor(<default>-1-2) move_constructor(<default>-2-2) move_constructor(logger-1-2) destructor(logger-1-1) destructor(<default>-2-1) destructor(<default>-1-1) testFunction called destructor(logger-1-2) destructor(<default>-2-2) destructor(<default>-1-2) destructor(logger-0-0) destructor(<default>-1-0) destructor(<default>-0-0) "
Attachments
Patch (6.26 KB, patch)
2016-06-10 09:43 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2016-06-10 09:01:52 PDT
The isolated copy snippets are out of order: Actual: ... isolatedCopy() copy_constructor(logger-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(<default>-1-0) ... Expected: ... isolatedCopy() copy_constructor(<default>-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(logger-1-0) ... Which is reasonable, considering evaluation order of function arguments is unspecified. Same thing with the other out-of-orderness later on. The test assuming evaluation order is bogus. I'll explore ways to fix.
Brady Eidson
Comment 2 2016-06-10 09:03:32 PDT
Besides out-of-orderness, the exact number of constructor calls per named object is still the same. So having a map of names-to-constructor calls will work.
Brady Eidson
Comment 3 2016-06-10 09:43:09 PDT
Alex Christensen
Comment 4 2016-06-10 09:52:06 PDT
Comment on attachment 281011 [details] Patch cool
Brady Eidson
Comment 5 2016-06-10 10:03:01 PDT
Note You need to log in before you can comment on or make changes to this bug.