malloc errors on OS X

Yaron H.
2009-03-01
2013-05-02
  • Yaron H.
    Yaron H.
    2009-03-01

    Hi,

    I'm using DevIL on Tiger 10.5.6. I compiled and installed it from the source using the configure script (specifying --with-debug and --with-examples) without any problems.

    Whenever I'm using the examples (IL_read, IL_simple) or use it in my project to load an image, when the executable exits I always get malloc errors such as:

    IL_simple(45916) malloc: *** error for object 0x7f7f: Non-aligned pointer being freed
    *** set a breakpoint in malloc_error_break to debug
    Segmentation fault

    or:

    test(45933) malloc: *** error for object 0x1e0000: pointer being freed was not allocated
    *** set a breakpoint in malloc_error_break to debug
    Segmentation fault

    any ideas why?

     
    • Yaron H.
      Yaron H.
      2009-03-01

      forgot to mention that I compiled the latest version of DevIL (1.7.7).

       
    • Denton Woods
      Denton Woods
      2009-03-02

      Is there any chance you could run gdb on this and enter 'break malloc_error_break' at the gdb prompt?  Mac OS X seems to want memory to be allocated on an aligned boundary, and there is code in il_alloc.c that should take care of it.  However, maybe VECTORMEM is not being defined through the Makefile.  If you could let me know the results of running gdb, that would be very helpful.