[Bug 163398] New: KPixmapCache should remap shared memory when resizing cache

Michael Pyne mpyne at purinchu.net
Fri Jun 6 22:35:39 CEST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=163398         
           Summary: KPixmapCache should remap shared memory when resizing
                    cache
           Product: kdelibs
           Version: SVN
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: kdeui
        AssignedTo: kdelibs-bugs kde org
        ReportedBy: mpyne purinchu net
                CC: mail dipe org


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.


More information about the Kdelibs-bugs mailing list