Summary: | [GTK] plugins/setProperty.html fails on 64bit Release | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Philippe Normand <pnormand> | ||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | eric, gustavo | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Philippe Normand
2010-02-26 01:55:39 PST
A git bisect revealed that r54786 is the culprit :) Gustavo, what do you think? The same commit makes plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html crash too: (gdb) bt #0 0x0000000001d626e0 in ?? () #1 0x00007f64296cf8ce in WebCore::ScriptController::clearScriptObjects() () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #2 0x00007f6429915f30 in WebCore::FrameLoader::clear(bool, bool, bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #3 0x00007f6429917cae in WebCore::FrameLoader::begin(WebCore::KURL const&, bool, WebCore::SecurityOrigin*) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #4 0x00007f642991838e in WebCore::FrameLoader::receivedFirstData() () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #5 0x00007f6429918634 in WebCore::FrameLoader::setEncoding(WebCore::String const&, bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #6 0x00007f642991a8d8 in WebCore::FrameLoader::finishedLoadingDocument(WebCore::DocumentLoader*) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #7 0x00007f6429902078 in WebCore::DocumentLoader::finishedLoading() () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #8 0x00007f6429918db4 in WebCore::FrameLoader::finishedLoading() () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #9 0x00007f642992b627 in WebCore::MainResourceLoader::didFinishLoading() () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #10 0x00007f642992e147 in WebCore::MainResourceLoader::continueAfterContentPolicy(WebCore::PolicyAction, WebCore::ResourceResponse const&) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #11 0x00007f642992e566 in WebCore::MainResourceLoader::continueAfterContentPolicy(WebCore::PolicyAction) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #12 0x00007f64299359c6 in WebCore::PolicyChecker::continueAfterContentPolicy(WebCore::PolicyAction) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #13 0x00007f6429c9ff71 in WebKit::FrameLoaderClient::dispatchDecidePolicyForMIMEType(void (WebCore::PolicyChecker::*)(WebCore::PolicyAction), WebCore::String const&, WebCore::ResourceRequest const&) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #14 0x00007f642992fd68 in WebCore::MainResourceLoader::didReceiveResponse(WebCore::ResourceResponse const&) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #15 0x00007f642992beb2 in WebCore::MainResourceLoader::handleEmptyLoad(WebCore::KURL const&, bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #16 0x00007f642992cc84 in WebCore::MainResourceLoader::loadNow(WebCore::ResourceRequest&) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #17 0x00007f642992ecc0 in WebCore::MainResourceLoader::load(WebCore::ResourceRequest const&, WebCore::SubstituteData const&) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #18 0x00007f64299023ed in WebCore::DocumentLoader::startLoadingMainResource(unsigned long) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #19 0x00007f6429912c55 in WebCore::FrameLoader::continueLoadAfterWillSubmitForm() () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #20 0x00007f642991e3c0 in WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #21 0x00007f642991e3ed in WebCore::FrameLoader::callContinueLoadAfterNavigationPolicy(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #22 0x00007f6429934a38 in WebCore::PolicyCallback::call(bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #23 0x00007f64299363cf in WebCore::PolicyChecker::continueAfterNavigationPolicy(WebCore::PolicyAction) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #24 0x00007f6429c9f987 in WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction(void (WebCore::PolicyChecker::*)(WebCore::PolicyAction), WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #25 0x00007f6429936f2b in WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr<WebCore::FormState>, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr<WebCore::FormState>, bool), void*) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #26 0x00007f642991e79a in WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr<WebCore::FormState>) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #27 0x00007f642991e928 in WebCore::FrameLoader::load(WebCore::DocumentLoader*) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #28 0x00007f642991ea4b in WebCore::FrameLoader::load(WebCore::ResourceRequest const&, WebCore::SubstituteData const&, bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #29 0x00007f642991eb36 in WebCore::FrameLoader::load(WebCore::ResourceRequest const&, bool) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #30 0x00007f6429cac97d in webkit_web_frame_load_uri () ---Type <return> to continue, or q <return> to quit--- from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/Release/.libs/libwebkit-1.0.so.2 #31 0x000000000040f029 in runTest(std::string const&) () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/staging/Release/Programs/DumpRenderTree #32 0x000000000040f702 in main () from /home/phil/gst/jhbuild/build/WebKit/WebKitBuild/staging/Release/Programs/DumpRenderTree (In reply to comment #1) > A git bisect revealed that r54786 is the culprit :) Gustavo, what do you think? ouch; I think that fix may be just exposing the bug, I'll have to try and debug it (In reply to comment #2) > The same commit makes > plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html crash > too: That is funny. This code doesn't seem to go through the parseDataUrl code path. Created attachment 49752 [details]
proposed fix
For the curious: it turns out that the invoke call that is done by handleCallback may fail, and return before it has initialized the browserResult variant to anything that makes sense. As it happens, in 64 bits Linux the variable ended up being considered to be of type string, but obviously failed to have a correctly malloc'ed string as the data, so free was called in unrelated memory, causing the corruption. As to why my fix to parseDataUrl exposed the problem, the URL notification was the cause for the call that calls invoke. Since we were not setting an URL in the response, no notification happened. Comment on attachment 49752 [details]
proposed fix
I wonder how many other cases of unconditional release we have?
Created attachment 49754 [details]
only release the variant when invoke succeeds
Applying the fix to all places where it's needed.
Comment on attachment 49754 [details]
only release the variant when invoke succeeds
OK.
Landed as r55392. |