[Bug 160284] bad mmap causes cores in KPCMemoryDevice

Michael Pyne mpyne at purinchu.net
Thu May 29 23:49:41 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 mpyne purinchu net  2008-05-29 23:49 -------
Sebastian:  It is an alignment error still.  Assuming mMemory points to a valid address, that means mSizeEntryOffset on line 173 makes an unaligned address.

This comes from the kpc_header_len variable which I changed to make aligned (or so I thought).  I believe the calculation is right but to be sure it would be helpful to figure out what kpc_header_len is on your system.

What you can do is in the calculation of padding length required (on line 408 of your modified file), change sizeof(void*) in all 3 spots to be 8 (you may have to all bump the pixmap version).  Retest.

If 8 does not work, try 16.  The final kpc_header_len should always be a multiple of the number you try (so probably a multiple of 4 or 8 right now, when you change to 16 it should be a multiple of 16).

If the calculation is right then I need a better way to determine alignment at compile time, although I can hardcode 16 for now if necessary.


More information about the Kdelibs-bugs mailing list