[Bug 160284] bad mmap causes cores in KPCMemoryDevice

Sebastian Sauer mail at dipe.org
Thu Jun 5 02:40:19 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=160284         




------- Additional Comments From mail dipe org  2008-06-05 02:40 -------
The whole prob is;

* we may have multiple iconcache-instances around in different processes where each of them may open+mmap the cachefile.
* if one of them now needs to resize the cachefile (e.g. cause the cache should be deleted/truncated), then this may affect the other instances.
* that means, the other instances still have the cachefile open+mmap'ed and keep informations about size, etc. during there lifetime while one of them needs to do something with those cachefile and effectively resizes/deletes and remmap's the file. Those iconcache-instance (+ with my patch also all other instances within the same process) is valid while all other instances are dealing now with invalid mem.

Now the reason why I would agree with Lubos;

Does unmmap+delete file+create file+mmap change the pointer-pos where the mmap'ed cache starts? If yes, then we still have the prob that caches within other processes may deal with mem that was released already. I don't know here about Linux, but at least OpenBSD does return another address on each mmap (see http://kerneltrap.org/node/5584).

So, imho (and after last days of thinking) the bug is not really fixed yet :-/


More information about the Kdelibs-bugs mailing list