Skip to content

Instantly share code, notes, and snippets.

@jdelStrother
Created August 21, 2014 21:41
Show Gist options
  • Select an option

  • Save jdelStrother/82b34381d9328b0aac2f to your computer and use it in GitHub Desktop.

Select an option

Save jdelStrother/82b34381d9328b0aac2f to your computer and use it in GitHub Desktop.
$ gcc -I/ec/include/ImageMagick-6/ -L/ec/lib -lMagickCore-6.Q16 ./magick.c
$ UMEM_DEBUG=default,audit,verbose ./a.out
umem allocator: redzone violation: write past end of buffer
buffer=8103bc0 bufctl=8106a58 cache: umem_alloc_640
previous transaction on buffer 8103bc0:
thread=1 time=T-0.000636133 slab=8105f98 cache: umem_alloc_640
libumem.so.1'umem_cache_alloc_debug+0x1fe
libumem.so.1'umem_cache_alloc+0x18f
libumem.so.1'umem_alloc+0x50
libumem.so.1'malloc+0x36
a.out'main+0x1e
a.out'_start+0x83
umem: heap corruption detected
stack trace:
libumem.so.1'umem_err_recoverable+0x4a
libumem.so.1'umem_error+0x492
libumem.so.1'umem_free+0xdf
libumem.so.1'process_free+0x57
libumem.so.1'free+0x1a
libMagickCore-6.Q16.so.2.0.0'RelinquishMagickMemory+0x23
libMagickCore-6.Q16.so.2.0.0'DestroyDrawInfo+0x1c7
a.out'main+0x3f
a.out'_start+0x83
Abort (core dumped)
#define MAGICKCORE_QUANTUM_DEPTH 16
#define MAGICKCORE_HDRI_ENABLE 0
#include "magick/MagickCore.h"
#include "magick/magick-config.h"
int main(int argc, char * argv[])
{
DrawInfo* info = malloc(sizeof(*info));
GetDrawInfo(NULL, info);
DestroyDrawInfo(info);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment