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

            Bug ID: 452504
           Summary: KActionCollection static_cast<QAction*> relies on UB
           Product: krita
           Version: git master (please specify the git hash!)
          Platform: unspecified
                OS: Unspecified
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: krita-bugs-n...@kde.org
          Reporter: al...@alvinhc.com
  Target Milestone: ---

A previous attempt at removing the UB [1] failed (caused bug 452063,
subsequently reverted in [2]).

The problematic code is called from the QObject::deleteLater signal of a
QAction, which at that point is already no longer a QAction since its
destructor had returned. static_cast-ing the QObject* to QAction* is undefined
behavior.

[1]:
https://invent.kde.org/graphics/krita/-/commit/e3d359608b9d6038b2428e8a49b833e7a5188ba4#1c36f0db18ca0e87f7da1033e19d6af8d00102ab_616_615
[2]:
https://invent.kde.org/graphics/krita/-/commit/bcff23b8f01e483fdde3807cb19eef6ad7ea4eca

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

Reply via email to