public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libmudflap/30994] App using Qt lib aborts immediately during startup
       [not found] <bug-30994-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-19  5:01 ` pinskia at gcc dot gnu.org
  2012-01-19 11:28 ` aegges at web dot de
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-19  5:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30994

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libmudflap/30994] App using Qt lib aborts immediately during startup
       [not found] <bug-30994-4@http.gcc.gnu.org/bugzilla/>
  2012-01-19  5:01 ` [Bug libmudflap/30994] App using Qt lib aborts immediately during startup pinskia at gcc dot gnu.org
@ 2012-01-19 11:28 ` aegges at web dot de
  1 sibling, 0 replies; 2+ messages in thread
From: aegges at web dot de @ 2012-01-19 11:28 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-19 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-30994-4@http.gcc.gnu.org/bugzilla/>
2012-01-19  5:01 ` [Bug libmudflap/30994] App using Qt lib aborts immediately during startup pinskia at gcc dot gnu.org
2012-01-19 11:28 ` aegges at web dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).