[Bug 160284] bad mmap causes cores in KPCMemoryDevice
Matthew Woehlke
mw_triad at users.sourceforge.net
Mon Jun 2 18:08:21 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 mw_triad users sourceforge net 2008-06-02 18:08 -------
> I can reliably reproduce SIGBUS if I truncate the shared file. However, if I do nothing but unlink the shared file then everything continues as normal.
That's not surprising; in fact now that you mention it, it makes sense that a truncate could hose an otherwise valid mmap. I would have expected unlinking to be safe, but it's not clear if mmap preserves a handle (but it should be safe as long as you don't call close() on the fd until you've munmap'd everything, since on UNIX-y systems an unlinked file isn't gone until all handles are closed).
More information about the Kdelibs-bugs
mailing list