We have seen crashes where process gets killed because it tries accessing shm file after device is locked. We are suspecting this is because database protection class of shm file is set to be Complete by apps after it's created with lower protection level.
<rdar://problem/42685773>
Created attachment 368502 [details] Patch
Comment on attachment 368502 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=368502&action=review > Source/WebCore/platform/sql/SQLiteDatabase.cpp:154 > + RELEASE_ASSERT(FileSystem::isSafeToUseMemoryMapForPath(shmFileName)); Why not just call makeSafeToUseMemoryMapForPath?
(In reply to Alex Christensen from comment #3) > Comment on attachment 368502 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=368502&action=review > > > Source/WebCore/platform/sql/SQLiteDatabase.cpp:154 > > + RELEASE_ASSERT(FileSystem::isSafeToUseMemoryMapForPath(shmFileName)); > > Why not just call makeSafeToUseMemoryMapForPath? If the crash is caused by the shm file being unsafe for mmap, we probably need change in sqlite instead of WebKit to ensure shm file is in correct protection class when the file is being used.
Comment on attachment 368502 [details] Patch r=me
Comment on attachment 368502 [details] Patch Clearing flags on attachment: 368502 Committed r244921: <https://trac.webkit.org/changeset/244921>
All reviewed patches have been landed. Closing bug.