title: sYSMALLOc: Assertion failed - any ideas how to debug effectively?
body: <p>My server daemon works fine on most machines however on one I am getting:</p>
  
  <pre><code>malloc.c:3074: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &amp;((av)-&gt;bins[((1)
   - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) &amp;&amp; old_size == 0) ||
   ((unsigned long) (old_size) &gt;= (unsigned long)((((__builtin_offsetof (struct 
  malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) &amp; ~((2 * (sizeof(size_t))) - 
  1)))&amp;&amp; ((old_top)-&gt;size &amp; 0x1) &amp;&amp; ((unsigned long)old_end &amp; pagemask) == 0)' failed.
  </code></pre>
  
  <p>gdb backtrace:</p>
  
  <pre><code>#4  0x002a8300 in sYSMALLOc (av=&lt;value optimised out&gt;, bytes=&lt;value optimised out&gt;) at malloc.c:3071
  #5  _int_malloc (av=&lt;value optimised out&gt;, bytes=&lt;value optimised out&gt;) at malloc.c:4702
  #6  0x002a9898 in *__GI___libc_malloc (bytes=16) at malloc.c:3638
  #7  0x0804d575 in xmpp_ctx_new (mem=0x0, log=0x0) at src/ctx.c:383
  #8  0x0804916e in main (argc=1, argv=0xbffff834) at ../src/adminbot.c:277
  </code></pre>
  
  <p>Any ideas what to try else ? I am unable to find a bug in my code, it could be a bug in the XMPP library and I need to determine that.</p>
  
  <p>Thanks.</p>