Summary: | Crash in: com.apple.WebKit: WebKit::CacheStorage::Caches::initializeSize(WTF::Function<void (std::optional<WebCore::DOMCacheEngine::Error>&&)>&&) + 30 (CacheStorageEngineCaches.cpp:163) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matt Lewis <jlewis3> | ||||||
Component: | New Bugs | Assignee: | youenn fablet <youennf> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | buildbot, cdumez, cgarcia, commit-queue, webkit-bug-importer, youennf | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=178944 | ||||||||
Attachments: |
|
Description
Matt Lewis
2017-10-30 16:35:09 PDT
*** This bug has been marked as a duplicate of bug 179035 *** Reopening to attach new patch. Created attachment 325408 [details]
Patch
Comment on attachment 325408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325408&action=review > Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp:136 > + storeOrigin([protectedThis = makeRef(*this), this, callback = WTFMove(callback)] (std::optional<Error>&& error) mutable { Why don't you need the same in readCachesFromDisk() below? Comment on attachment 325408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325408&action=review >> Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp:136 >> + storeOrigin([protectedThis = makeRef(*this), this, callback = WTFMove(callback)] (std::optional<Error>&& error) mutable { > > Why don't you need the same in readCachesFromDisk() below? You initialized m_storage above, but what if somebody calls clearMemoryRepresentation() before your lambda gets called? Your lambda uses m_storage without null checking it and the crash log show it is dereferencing null. (In reply to Chris Dumez from comment #4) > Comment on attachment 325408 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=325408&action=review > > > Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp:136 > > + storeOrigin([protectedThis = makeRef(*this), this, callback = WTFMove(callback)] (std::optional<Error>&& error) mutable { > > Why don't you need the same in readCachesFromDisk() below? I got too fast, storeOrigin lambda does not protect this since it is done within storeOrigin implementation, like readCachesFromDisk.
> You initialized m_storage above, but what if somebody calls
> clearMemoryRepresentation() before your lambda gets called? Your lambda uses
> m_storage without null checking it and the crash log show it is
> dereferencing null.
That is probably the actual issue.
Created attachment 325461 [details]
Patch
Comment on attachment 325461 [details] Patch Clearing flags on attachment: 325461 Committed r224240: <https://trac.webkit.org/changeset/224240> All reviewed patches have been landed. Closing bug. *** Bug 179035 has been marked as a duplicate of this bug. *** |