KPixmapCache can be configured to use shared memory using mmap. When using shared memory if the underlying file is resized there is a possibility of causing errors. If resized smaller then there is no file where earlier there was one. If resized larger, the file will be bigger than the area of memory asked for when mapped, and what happens if the memory corresponding to the new part of the file is accessed is implementation-defined. The file can be resized by using the KPixmapCache::setCacheLimit() function however I have not developed a testcase yet so I'm not sure if I can make it crash. Also see bug 160284 where related mmap usage errors led to crashes.
SVN commit 1122509 by mpyne: Now that KPixmapCache is not our only resort, make it safer by removing the ability to schedule a cache resize for later. This is dangerous in regards to setting a higher cache size since it is possible for the new size to be used before the file and shared memory segment have actually been resized to match. Calling the method that resizes the cache also resizes the file/mmap as a side effect, so don't wait to do it. BUG:163398 M +4 -62 kpixmapcache.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1122509