This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libmudflap/30994] App using Qt lib aborts immediately during startup
- From: "aegges at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Jan 2012 11:12:21 +0000
- Subject: [Bug libmudflap/30994] App using Qt lib aborts immediately during startup
- Auto-submitted: auto-generated
- References: <bug-30994-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30994
Axel Mueller <aegges at web dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #2 from Axel Mueller <aegges at web dot de> 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