Re: Bug#635724: vlc: FTBFS (kfreebsd-i386) Segmentation fault (core dumped) ../bin/vlc-cache-gen .
- To: Modestas Vainius <modax@debian.org>
- Cc: 635724@bugs.debian.org, Rémi Denis-Courmont <remi@remlab.net>, Michael Biebl <biebl@debian.org>, Christoph Egger <christoph@debian.org>, Cyril Brulebois <kibi@debian.org>, Robert Millan <rmh@debian.org>, Petr Salinger <Petr.Salinger@seznam.cz>, debian-bsd@lists.debian.org, debian-qt-kde@lists.debian.org
- Subject: Re: Bug#635724: vlc: FTBFS (kfreebsd-i386) Segmentation fault (core dumped) ../bin/vlc-cache-gen .
- From: Reinhard Tartler <siretart@tauware.de>
- Date: Wed, 03 Aug 2011 13:41:19 +0200
- Message-id: <[🔎] 878vraracg.fsf@faui43f.informatik.uni-erlangen.de>
- In-reply-to: <[🔎] 87d3gmralg.fsf@faui43f.informatik.uni-erlangen.de> (Reinhard Tartler's message of "Wed, 03 Aug 2011 13:35:55 +0200")
- References: <[🔎] 4E3799FD.8020607@debian.org> <[🔎] 201108022114.22177.remi@remlab.net> <87sjpjr0d9.fsf@faui43f.informatik.uni-erlangen.de> <201108031010.20321.modax@debian.org> <[🔎] 87d3gmralg.fsf@faui43f.informatik.uni-erlangen.de>
On Wed, Aug 03, 2011 at 13:35:55 (CEST), Reinhard Tartler wrote:
[...]
> Not sure what is the right thing to do here. Maybe there was indeed
> recently some change in the toolchain, as Petr suggests, that affects
> the order of execution of global destructors and causes this
> segfault. OTOH, maybe the function registeredInterpolators should just
> return if registeredInterpolators() returns a 0 pointer.
By sheer luck, I found this in google's results: http://pastebin.com/W38uFJEQ
In case it vanishes, here is a copy of the contents of the paste:
>From 3031f1b1ebafe6dfdb99b4a745cac3f0887a8006 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@nokia.com>
Date: Wed, 26 Jan 2011 14:06:11 +0100
Subject: [PATCH] Check if the interpolators have already been deleted.
During application destruction, the order in which static destructors
is run is undetermined. So avoid a null-pointer dereference.
Task-number: QTBUG-16855
Reviewed-by: pending
---
src/corelib/animation/qvariantanimation.cpp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index 212e85d..c76cb89 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -431,12 +431,17 @@ void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator fun
{
// will override any existing interpolators
QInterpolatorVector *interpolators = registeredInterpolators();
+ // When built on solaris with GCC, the destructors can be called
+ // in such an order that we get here with interpolators == NULL,
+ // to continue causes the app to crash on exit with a SEGV
+ if (interpolators) {
#ifndef QT_NO_THREAD
- QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
+ QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
#endif
- if (int(interpolationType) >= interpolators->count())
- interpolators->resize(int(interpolationType) + 1);
- interpolators->replace(interpolationType, func);
+ if (int(interpolationType) >= interpolators->count())
+ interpolators->resize(int(interpolationType) + 1);
+ interpolators->replace(interpolationType, func);
+ }
}
--
1.7.3.2.431.ge2f5c
Qt4 Maintainers, can you perhaps check if this patch has been
approved or even incorporated upstream?
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
Reply to: