[Bug libmudflap/30994] App using Qt lib aborts immediately during startup

2012-01-19 Thread aegges at web dot de
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


[Bug libmudflap/30994] App using Qt lib aborts immediately during startup

2012-01-18 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30994

--- Comment #1 from Andrew Pinski  2012-01-19 
04:37:33 UTC ---
>From the sound of it, libmudflap is not being initialized before QT is.  QT is
calling malloc in its initialization and malloc returns NULL.