RESOLVED DUPLICATE of bug 105591 105788
Regression(r138222): Caused http/tests/appcache/main-resource-redirect.html to fail
https://bugs.webkit.org/show_bug.cgi?id=105788
Summary Regression(r138222): Caused http/tests/appcache/main-resource-redirect.html t...
Chris Dumez
Reported 2012-12-27 03:01:14 PST
After http://trac.webkit.org/changeset/138222, http/tests/appcache/main-resource-redirect.html started failing (at least on EFL port): crash log for WebKitTestRunner (pid 28658): STDOUT: <empty> STDERR: ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) STDERR: /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/Source/WTF/wtf/HashTable.h(588) : void WTF::HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::checkKey(const T&) [with HashTranslator = WTF::IdentityHashTranslator<WTF::IntHash<long unsigned int> >, T = long unsigned int, Key = long unsigned int, Value = WTF::KeyValuePair<long unsigned int, WTF::RefPtr<EwkResource> >, Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<long unsigned int, WTF::RefPtr<EwkResource> > >, HashFunctions = WTF::IntHash<long unsigned int>, Traits = WTF::HashMapValueTraits<WTF::HashTraits<long unsigned int>, WTF::HashTraits<WTF::RefPtr<EwkResource> > >, KeyTraits = WTF::HashTraits<long unsigned int>] STDERR: 1 0x7fe1b023efdc void WTF::HashTable<unsigned long, WTF::KeyValuePair<unsigned long, WTF::RefPtr<EwkResource> >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<unsigned long, WTF::RefPtr<EwkResource> > >, WTF::IntHash<unsigned long>, WTF::HashMapValueTraits<WTF::HashTraits<unsigned long>, WTF::HashTraits<WTF::RefPtr<EwkResource> > >, WTF::HashTraits<unsigned long> >::checkKey<WTF::IdentityHashTranslator<WTF::IntHash<unsigned long> >, unsigned long>(unsigned long const&) STDERR: 2 0x7fe1b023ea4b WTF::KeyValuePair<unsigned long, WTF::RefPtr<EwkResource> >* WTF::HashTable<unsigned long, WTF::KeyValuePair<unsigned long, WTF::RefPtr<EwkResource> >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<unsigned long, WTF::RefPtr<EwkResource> > >, WTF::IntHash<unsigned long>, WTF::HashMapValueTraits<WTF::HashTraits<unsigned long>, WTF::HashTraits<WTF::RefPtr<EwkResource> > >, WTF::HashTraits<unsigned long> >::lookup<WTF::IdentityHashTranslator<WTF::IntHash<unsigned long> >, unsigned long>(unsigned long const&) STDERR: 3 0x7fe1b023e133 WTF::HashTable<unsigned long, WTF::KeyValuePair<unsigned long, WTF::RefPtr<EwkResource> >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<unsigned long, WTF::RefPtr<EwkResource> > >, WTF::IntHash<unsigned long>, WTF::HashMapValueTraits<WTF::HashTraits<unsigned long>, WTF::HashTraits<WTF::RefPtr<EwkResource> > >, WTF::HashTraits<unsigned long> >::lookup(unsigned long const&) STDERR: 4 0x7fe1b023d891 WTF::HashMap<unsigned long, WTF::RefPtr<EwkResource>, WTF::IntHash<unsigned long>, WTF::HashTraits<unsigned long>, WTF::HashTraits<WTF::RefPtr<EwkResource> > >::get(unsigned long const&) const STDERR: 5 0x7fe1b023d09d WebKit::ResourceLoadClientEfl::didReceiveResponseForResource(OpaqueWKPage const*, OpaqueWKFrame const*, unsigned long, OpaqueWKURLResponse const*, void const*) STDERR: 6 0x7fe1b009a345 WebKit::WebResourceLoadClient::didReceiveResponseForResource(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, unsigned long, WebCore::ResourceResponse const&) STDERR: 7 0x7fe1b00506ed WebKit::WebPageProxy::didReceiveResponseForResource(unsigned long, unsigned long, WebCore::ResourceResponse const&) STDERR: 8 0x7fe1b0272a65 void CoreIPC::callMemberFunction<WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebCore::ResourceResponse const&), unsigned long, unsigned long, WebCore::ResourceResponse>(CoreIPC::Arguments3<unsigned long, unsigned long, WebCore::ResourceResponse> const&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebCore::ResourceResponse const&)) STDERR: 9 0x7fe1b026eac1 void CoreIPC::handleMessage<Messages::WebPageProxy::DidReceiveResponseForResource, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebCore::ResourceResponse const&)>(CoreIPC::MessageDecoder&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebCore::ResourceResponse const&)) STDERR: 10 0x7fe1b0268c84 WebKit::WebPageProxy::didReceiveWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) STDERR: 11 0x7fe1b004cb17 WebKit::WebPageProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) STDERR: 12 0x7fe1b008db9b WebKit::WebProcessProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) STDERR: 13 0x7fe1aff727cc CoreIPC::Connection::dispatchMessage(CoreIPC::MessageID, CoreIPC::MessageDecoder&) STDERR: 14 0x7fe1aff72938 CoreIPC::Connection::dispatchMessage(CoreIPC::Connection::Message<CoreIPC::MessageDecoder>&) STDERR: 15 0x7fe1aff72b83 CoreIPC::Connection::dispatchOneMessage() STDERR: 16 0x7fe1aff7d41a WTF::FunctionWrapper<void (CoreIPC::Connection::*)()>::operator()(CoreIPC::Connection*) STDERR: 17 0x7fe1aff7d220 WTF::BoundFunctionImpl<WTF::FunctionWrapper<void (CoreIPC::Connection::*)()>, void (CoreIPC::Connection*)>::operator()() STDERR: 18 0x7fe1b78579b2 WTF::Function<void ()>::operator()() const STDERR: 19 0x7fe1b392a446 WebCore::RunLoop::performWork() STDERR: 20 0x7fe1b43ffa3e WebCore::RunLoop::wakeUpEvent(void*, void*, unsigned int) STDERR: 21 0x7fe1af335621 STDERR: 22 0x7fe1af334571 STDERR: 23 0x7fe1af334ab7 ecore_main_loop_begin STDERR: 24 0x434a3d WTR::TestController::platformRunUntil(bool&, double) STDERR: 25 0x41f472 WTR::TestController::runUntil(bool&, WTR::TestController::TimeoutDuration) STDERR: 26 0x426581 WTR::TestInvocation::invoke() STDERR: 27 0x41f1aa WTR::TestController::runTest(char const*) STDERR: 28 0x41f2e3 WTR::TestController::runTestingServerLoop() STDERR: 29 0x41f37d WTR::TestController::run() STDERR: 30 0x41ccb3 WTR::TestController::TestController(int, char const**) STDERR: 31 0x434bd6 main The reason for the failure is that WebResourceLoadClient::didReceiveResponseForResource() is now called 0 as identifier value, which is not a valid identifier.
Attachments
Patch (3.15 KB, patch)
2012-12-27 05:51 PST, Carlos Garcia Campos
no flags
Chris Dumez
Comment 1 2012-12-27 03:06:48 PST
Carlos Garcia Campos
Comment 2 2012-12-27 05:51:33 PST
Created attachment 180794 [details] Patch The problem is that in case of loading substitute data from app cache due to a redirect, the substitute data id is not initialized.
Chris Dumez
Comment 3 2012-12-27 05:55:21 PST
LGTM. I can confirm this patch fixes the issue on EFL port.
Darin Adler
Comment 4 2012-12-27 09:46:32 PST
Comment on attachment 180794 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180794&action=review > Source/WebCore/loader/MainResourceLoader.cpp:272 > ASSERT(!m_substituteData.isValid()); > documentLoader()->applicationCacheHost()->maybeLoadMainResourceForRedirect(newRequest, m_substituteData); > + if (m_substituteData.isValid()) If two lines earlier we asserted this is not true, how can it be true now?
Chris Dumez
Comment 5 2012-12-27 10:14:12 PST
Comment on attachment 180794 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180794&action=review >> Source/WebCore/loader/MainResourceLoader.cpp:272 >> + if (m_substituteData.isValid()) > > If two lines earlier we asserted this is not true, how can it be true now? ApplicationCacheHost::maybeLoadMainResourceForRedirect(ResourceRequest& request, SubstituteData& substituteData) may populate m_substituteData since it is passed by reference.
Alexey Proskuryakov
Comment 6 2012-12-27 12:08:15 PST
*** This bug has been marked as a duplicate of bug 105591 ***
Alexey Proskuryakov
Comment 7 2012-12-27 12:08:55 PST
Comment on attachment 180794 [details] Patch Let's discuss various approaches to fixing this in one bug, not two. Clearing review flag.
Note You need to log in before you can comment on or make changes to this bug.