Fix crash on exit

Review Request #128761 - Created Aug. 25, 2016 and submitted

Information
Peter Wu
oxygen
master
356940
Reviewers
plasma
davidedmundson, dfaure, hpereiradacosta

Since Qt 5.6.0, Qt5 applications started crashing on exit. All signs
point to this delete-on-destroy hack which was added to avoid outliving
the plugin lifetime.

This method is wrong because the returned style is owned by the caller
(QApplication, QProxyStyle, etc) and will cleaned up when those users
are destructed.

Copied from breeze patch https://git.reviewboard.kde.org/r/128760/

Started QT_STYLE_OVERRIDE=oxygen LD_LIBRARY_PATH=... QT_PLUGIN_PATH=... wireshark -o (an invalid option that triggers exit(1)) and observe a heap-use-after free similar to the one reported in the bug. Apply this patch, rebuild oxygen and notice that the crash is fixed. Also tested with "Testcase (ASAN)" from bug 356940, crash is also gone.

Issues

  • 0
  • 0
  • 1
  • 1
Description From Last Updated
Peter Wu
Anthony Fieroni
Peter Wu
Hugo Pereira Da Costa
Hugo Pereira Da Costa
Martin Tobias Holmedahl Sandsmark
Peter Wu
Review request changed

Status: Closed (submitted)

Change Summary:

This was actually closed via d0cc0029d38f5cf745e32753add8f11609a67c30

Loading...