From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13974 invoked by alias); 19 Jan 2012 11:12:40 -0000 Received: (qmail 13963 invoked by uid 22791); 19 Jan 2012 11:12:38 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,T_FRT_PROFILE1 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Jan 2012 11:12:25 +0000 From: "aegges at web dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libmudflap/30994] App using Qt lib aborts immediately during startup Date: Thu, 19 Jan 2012 11:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libmudflap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aegges at web dot de X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg02113.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30994 Axel Mueller changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #2 from Axel Mueller 2012-01-19 11:12:21 UTC --- (In reply to comment #1) > From the sound of it, libmudflap is not being initialized before QT is. QT is > calling malloc in its initialization and malloc returns NULL. You are my hero!!!! I did not expect to get an answer after 5 years. And I did not expect to get a helpful answer. I changed to link order from LIBS = -lQtCore -lmudflapth to LIBS = -lmudflapth -lQtCore Thus mudflap is the last in the line and will get linked/loaded first. Now everything works as expected. Therefore, I will close this bug. Thank you very much. Just for the record. To use Mudflap with Qt you have to add the following lines to your .pro file (Qt project file): QMAKE_CXXFLAGS += -fmudflapth QMAKE_CFLAGS += -fmudflapth # do not use QMAKE_LIBS for mudflap; private libs will be loaded before Qt LIBS_PRIVATE += -lmudflapth