linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kconfig: fix qconf segfault by deleting heap objects
@ 2016-01-08 20:44 Chris Bainbridge
  2016-01-11  8:46 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Bainbridge @ 2016-01-08 20:44 UTC (permalink / raw)
  To: yann.morin.1998; +Cc: linux-kernel, mmarek, bbarbulovski

On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to
qconf segfaulting at exit time in QXcbEventReader. The cause of this is
destructors on the heap objects never being called, so fix this by
properly deleting the heap objects before exit.

Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
---
Trivial error, as described at https://forum.qt.io/topic/26658/solved-segfault-on-qapplication-exit
---
 scripts/kconfig/qconf.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 91b7e6fbc364..fc5555992220 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1863,6 +1863,8 @@ int main(int ac, char** av)
 
 	configSettings->endGroup();
 	delete configSettings;
+	delete v;
+	delete configApp;
 
 	return 0;
 }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kconfig: fix qconf segfault by deleting heap objects
  2016-01-08 20:44 [PATCH] kconfig: fix qconf segfault by deleting heap objects Chris Bainbridge
@ 2016-01-11  8:46 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2016-01-11  8:46 UTC (permalink / raw)
  To: Chris Bainbridge, yann.morin.1998; +Cc: linux-kernel, bbarbulovski

On 2016-01-08 21:44, Chris Bainbridge wrote:
> On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to
> qconf segfaulting at exit time in QXcbEventReader. The cause of this is
> destructors on the heap objects never being called, so fix this by
> properly deleting the heap objects before exit.
> 
> Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
> ---
> Trivial error, as described at https://forum.qt.io/topic/26658/solved-segfault-on-qapplication-exit
> ---
>  scripts/kconfig/qconf.cc | 2 ++
>  1 file changed, 2 insertions(+)

Applied to kbuild.git#kconfig, thanks.

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-11  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-08 20:44 [PATCH] kconfig: fix qconf segfault by deleting heap objects Chris Bainbridge
2016-01-11  8:46 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).