[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D8673: Sanitize signal handling in ksmserver
From:       Jiří Paleček <noreply () phabricator ! kde ! org>
Date:       2017-11-06 0:24:16
Message-ID: 20171106002415.16245.04F658339ED488B1 () phabricator ! kde ! org
[Download RAW message or body]

jpalecek edited the summary of this revision.
jpalecek added a reviewer: Plasma.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D8673

To: jpalecek, #plasma
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

[Attachment #3 (unknown)]

<table><tr><td style="">jpalecek edited the summary of this revision. <a \
href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-rqbavow62jcapqe/" \
rel="noreferrer">(Show Details)</a><br />jpalecek added a reviewer: Plasma. </td><a \
style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; \
color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; \
background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; \
border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8673" \
rel="noreferrer">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION \
SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">The TERM \
signal handling in ksmserver invokes functions which<span style="padding: 0 2px; \
color: #333333; background: rgba(251, 175, 175, .7);"><br /> </span><span \
style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> \
</span>are not async-signal safe, like Qt functions and C++<span style="padding: 0 \
2px; color: #333333; background: rgba(251, 175, 175, .7);"><br /> destructors. \
Moreover, the signal handling can occur in other than the<br /> main thread, which \
leads to Qt complaining about functions being<br /> invoked from the wrong thread. \
Such a crash can be seen in a report of</span><br /> <span style="padding: 0 2px; \
color: #333333; background: rgba(151, 234, 151, .6);">destructors. Moreover, the \
signal handling can occur in other than the main thread, which leads to Qt \
complaining about functions being invoked from the wrong thread. Such a crash can be \
seen in a report of </span>[[ bug 384316 |https://bugs.kde.org/show_bug.cgi?id=384316 \
]].<br /> <br />
To fix both of these issues, this change makes the signal handling <span \
style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">use<br \
/> </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, \
151, .6);">use </span>the self-pipe trick, which signals the need for termination to \
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, \
.7);">the<br /> </span><span style="padding: 0 2px; color: #333333; background: \
rgba(151, 234, 151, .6);">the </span>main thread by writing to a special-purpose file \
descriptor. The main<span style="padding: 0 2px; color: #333333; background: \
rgba(251, 175, 175, .7);"><br /> loop then takes care of the termination. This is \
mostly inspired by [[</span><br /> <span style="padding: 0 2px; color: #333333; \
background: rgba(151, 234, 151, .6);">loop then takes care of the termination. This \
is mostly inspired by [[ </span>http://doc.qt.io/qt-5/unix-signals.html ]].<div \
style="padding: 8px 0;">...</div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R120 Plasma \
Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D8673" \
rel="noreferrer">https://phabricator.kde.org/D8673</a></div></div><br \
/><div><strong>To: </strong>jpalecek, Plasma<br /><strong>Cc: </strong>plasma-devel, \
ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, \
mart<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic