Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qmake: malloc bug? (pointer being freed was not allocated)
Forum Updated to NodeBB v4.3 + New Features

Qmake: malloc bug? (pointer being freed was not allocated)

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 8.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chrisj2110
    wrote on 29 Apr 2011, 01:38 last edited by
    #1

    This is on a Mac OS X (10.6.7) machine, Xcode 3.2.6.

    Has anyone else noticed this while building from latest git source on Mac (or elsewhere)?

    Here is a good example of it from the std output in Terminal. It happens tons of times during compile.

    cd src/opengl/ && gmake -f Makefile
    gmake[1]: Entering directory /Volumes/Disk_4/source/qt/qt-master/qt-build-cocoa/src/opengl' /Volumes/Disk_4/source/qt/qt-master/qt-build-cocoa/bin/qmake -spec /Volumes/Disk_4/source/qt/qt-master/qt/mkspecs/macx-g++ -o Makefile /Volumes/Disk_4/source/qt/qt-master/qt/src/opengl/opengl.pro qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa460: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa6e0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa460: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffc280: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffc280: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa2c0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa540: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa2c0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffc0e0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffc0e0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa2c0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa540: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffa2c0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffc0e0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug qmake(48686,0xa0248540) malloc: *** error for object 0xbfffc0e0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug gmake[1]: Leaving directory /Volumes/Disk_4/source/qt/qt-master/qt-build-cocoa/src/opengl'
    gmake[1]: Entering directory `/Volumes/Disk_4/source/qt/qt-master/qt-build-cocoa/src/opengl'
    gmake -f Makefile.Debug all
    gmake -f Makefile.Release all
    ** END SNIPPET**

    This memory bug is in qmake tool, I have looked and looked to see if I could find the culprit, but I don't see anything that is obvious (maybe Im blind) This is gcc, and in clang both. I will try LLVM-GCC next and see if it is there. Clang does not seem to shed any light on the problem.

    If anyone else has seen this behaviour, Let me know, And I will file a Qt-bug.

    If its NOT Happening on anyone else's dev machine, it must be something "weird" on mine that I need to look into and fix. or an Apple OS bug (which I will report) This has been occurring since Jan or so this year. It was NOT happening before this time. I do a git pull of Qt every morning, and a FRESH shadow rebuild.... and low and behold it is still there.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      chrisj2110
      wrote on 30 Apr 2011, 03:18 last edited by
      #2

      Never mind right now, I got to the bottom of this strange behaviour.

      It is NOT a bug in OS X.

      But it boils down to a hardcoded variable in the qmake Makefile...

      It appears that there was a small change in the implementation of the stdlib 'realpath' in OS X 10.5, this change is in 10.5 and later, but in the qmake Makefile, the MACOSX_DEPLOYMENT_VERSION=xx.xxx is hardcoded to =10.4.

      You should be able to change this, especially when doing 64-bit/cocoa work. but not so easy if it is hardcoded into a Makefile. It turned out there WAS a bug already filed, but for some reason I did not find it, so I created a new bug report, which turned out to be a duplicate.

      Its just a small silly thing that can be easily fixed in Qt build system. I think if you want to deploy anything above 10.4, you should be given an option on the configure line with which to do so. for both 32 and 64 bit. (Same OS version)....

      No wonder I had a hard time tracking the problem down !

      I have a FEW ideas to get around this mistake.....

      What do you people think?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on 30 Apr 2011, 08:42 last edited by
        #3

        Could you please supply a link to the relevant bugreport? That may help people in the future.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          chrisj2110
          wrote on 30 Apr 2011, 21:09 last edited by
          #4

          uhh! I knew I missed something!

          Apologies. here is the link, Andre:

          http://bugreports.qt.nokia.com/browse/QTBUG-18947

          Silly me!

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chrisj2110
            wrote on 30 Apr 2011, 21:11 last edited by
            #5

            http://bugreports.qt.nokia.com/browse/QTBUG-18985

            Which I filed yesterday,
            May also be of interest too. It relates to whats causing the issue and 3 or so things that may be done to fix this.

            1 Reply Last reply
            0

            1/5

            29 Apr 2011, 01:38

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved