https://bugs.kde.org/show_bug.cgi?id=522748

ElXreno <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/grap
                   |                            |hics/digikam/-/commit/bf9c1
                   |                            |416f274890ba82c6f7bbad29b74
                   |                            |62283088
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
            Version|                            |9.2.0
  Fixed/Implemented|                            |
                 In|                            |

--- Comment #4 from ElXreno <[email protected]> ---
Git commit bf9c1416f274890ba82c6f7bbad29b7462283088 by Mikhail Hrechyn.
Committed on 22/07/2026 at 15:22.
Pushed by cgilles into branch 'master'.

Fix map view crash with allocators enforcing sized deallocation

AbstractMarkerTiler::Tile has a non-virtual destructor, but the tile
tree always deletes the ItemMarkerTiler::MyTile and
GPSMarkerTiler::MyTile subclass objects through Tile pointers (the
rootTile scoped pointer, the children loop in ~Tile() and
Tile::deleteChild()). The subclass destructors are therefore never
run, leaking markerIndices/imagesId, and the compiler emits C++14
sized deallocation with sizeof(Tile) while the allocation has the
size of the subclass. The glibc allocator ignores the size argument,
but allocators that enforce it, like hardened_malloc which secureblue
preloads into all Flatpak applications, abort with "fatal allocator
error: sized deallocation mismatch (small)" as soon as the map view
paints.

Commit 90daa0b725 (Coverity CR 1504108) tried to fix this by making
the destructor of the derived MyTile virtual, which gives MyTile a
vtable pointer while Tile stays non-polymorphic. The Tile subobject
then moves to a nonzero offset and deleting through a Tile pointer
frees an interior pointer, which is the unit test crash that led to
the revert in commit a0345e9209. The destructor must be virtual on
the base class instead: this way the tiles are destroyed and
deallocated completely and with the correct size everywhere.
FIXED-IN: 9.2.0

M  +14   -1    core/utilities/geolocation/geoiface/tiles/abstractmarkertiler.h
M  +2    -2    core/utilities/geolocation/geoiface/tiles/itemmarkertiler.cpp
M  +2    -5    core/utilities/geolocation/mapsearches/gpsmarkertiler.cpp

https://invent.kde.org/graphics/digikam/-/commit/bf9c1416f274890ba82c6f7bbad29b7462283088

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to