public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aegges at web dot de" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-30994-4-U4rG80ocH0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <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


      parent reply	other threads:[~2012-01-19 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30994-4-U4rG80ocH0@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).