RESOLVED INVALID 35826
crash when makeSuccessCallbacks is called after disconnectFrame
https://bugs.webkit.org/show_bug.cgi?id=35826
Summary crash when makeSuccessCallbacks is called after disconnectFrame
arno.
Reported 2010-03-06 00:36:53 PST
Hi, when a request for geolocation permission is emited, and document asking for permission is unloaded, it's possible for the embedder to still call setIsAllowed (possibly other functions) after document has been unloaded. Then, a crash occurs in Geolocation::makeSuccessCallbacks or Geolocation::handleError The crash happens in copyToVector inline function. After investigating, I discovered in this part of copyToVector vector.resize(collection.size()); iterator it = collection.begin(); iterator end = collection.end(); for (unsigned i = 0; it != end; ++it, ++i) vector[i] = (*it).first; collection.size() evaluates to 1, but loop is entered twice; I don't understood why. Is it a good idea to have a boolean member m_isDisconnected, set it to false in disconnectFrame, and check its value at start of handleError and makeSuccessCallbacks ? or is there a better solution ?
Attachments
arno.
Comment 1 2010-03-06 00:42:36 PST
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7295511 in WebCore::Geolocation::makeSuccessCallbacks() () from /home/arno/webkit/WebKit/WebKitBuild/arno/Release/.libs/libwebkit-1.0.so (gdb) where #0 0x00007ffff7295511 in WebCore::Geolocation::makeSuccessCallbacks() () from /home/arno/webkit/WebKit/WebKitBuild/arno/Release/.libs/libwebkit-1.0.so #1 0x00007ffff7295797 in WebCore::Geolocation::setIsAllowed(bool) () from /home/arno/webkit/WebKit/WebKitBuild/arno/Release/.libs/libwebkit-1.0.so
Alexey Proskuryakov
Comment 2 2010-05-07 14:43:51 PDT
Alexey Proskuryakov
Comment 3 2010-05-07 16:46:16 PDT
This isn't reproducible in Safari. Does this still happen on Linux? Was it Qt or Gtk?
Alexey Proskuryakov
Comment 4 2010-06-16 09:32:29 PDT
No answer, closing. Geolocation lifetime handling is being rewritten now anyway.
Note You need to log in before you can comment on or make changes to this bug.