Bug 167577

Summary: Several web timing tests crash in GTK+ and AppleWin bots
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, joepeck, rniwa
Priority: P2 Keywords: LayoutTestFailure
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch rniwa: review+

Description Carlos Garcia Campos 2017-01-30 01:23:41 PST
Thread 1 (Thread 0x7ff3e7c27940 (LWP 19299)):
#0  0x00007ff3f7776b11 in WebCore::insertPerformanceEntry(WTF::HashMap<WTF::String, WTF::Vector<WTF::RefPtr<WebCore::PerformanceEntry>, 0ul, WTF::CrashOnOverflow, 16ul>, WTF::StringHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WTF::Vector<WTF::RefPtr<WebCore::PerformanceEntry>, 0ul, WTF::CrashOnOverflow, 16ul> > >&, WTF::Ref<WebCore::PerformanceEntry>&&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#1  0x00007ff3f7776dec in WebCore::UserTiming::mark(WTF::String const&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#2  0x00007ff3f7771634 in WebCore::Performance::mark(WTF::String const&) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#3  0x00007ff3f815c2fb in WebCore::jsPerformancePrototypeFunctionMark(JSC::ExecState*) () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4  0x00007ff3a6ffe028 in ?? ()
#5  0x00007fffc0588b80 in ?? ()
#6  0x00007ff3f47345e0 in llint_entry () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
Backtrace stopped: frame did not save the PC

I think this doesn't happen in other bots because of the compiler version. The problem is that entry is used in both the key, to get name, and in the value with WTFMove. So, the name is invalidated by the move. It could be fixed by simply copying the name, instead of using entry->name, but I think that code could be simplified using HashMap::ensure and then we don't need any string copy, nor even the static insertPerformanceEntry().
Comment 1 Carlos Garcia Campos 2017-01-30 01:26:08 PST
Created attachment 300091 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-01-30 02:16:08 PST
Committed r211360: <http://trac.webkit.org/changeset/211360>
Comment 3 Joseph Pecoraro 2017-01-30 11:13:58 PST
Comment on attachment 300091 [details]
Patch

Awesome change!