Review Request: Fix KPixmapCache crash (probably because of pointer aliasing in unions)

Christoph Feck christoph at maxiom.de
Tue May 26 22:39:11 BST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/757/#review1211
-----------------------------------------------------------


Can we agree on committing this as an initial fix? The patch only eliminates the aliasing, but if this does not fix the problem, I have to look elsewhere.

If my patch is wrong I feel the whole class is (it uses reinterpret_cast everywhere), and I do not feel like rewriting the whole file, mostly because I am not a core expert, and fearing to break it.

- Christoph


On 2009-05-24 17:09:22, Christoph Feck wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/757/
> -----------------------------------------------------------
> 
> (Updated 2009-05-24 17:09:22)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> Attempts to fix KPixmapCrash, pardon, KPixmapCache. This is my first submission to reviewboard to learn how it works (and I already learned that you have to retype the Description???).
> 
> According to the comments in the (previous) code, there are problems using the pointers in the union, so I removed them, and replaced them with a single pointer and casts at the appropriate places.
> 
> 
> This addresses bug 182026.
>     https://bugs.kde.org/show_bug.cgi?id=182026
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kdeui/util/kpixmapcache.cpp 971770 
> 
> Diff: http://reviewboard.kde.org/r/757/diff
> 
> 
> Testing
> -------
> 
> Compiles against current trunk, tested using icons with existing and cleaned pixmap cache files.
> 
> 
> Thanks,
> 
> Christoph
> 
>





More information about the kde-core-devel mailing list