This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]