Added include of stdlib.h because malloc needs it to work. Malloc time to time fails in server/core/buffer.c and produces the following error:
*** Error in `./maxscale': malloc(): memory corruption (fast): 0x00007f3988005510 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7afc6)[0x7f39c67a9fc6] /lib64/libc.so.6(+0x7d245)[0x7f39c67ac245] /lib64/libc.so.6(__libc_malloc+0x63)[0x7f39c67ad633] ./maxscale(gwbuf_alloc+0x34)[0x406250] /home/raatikka/bin/tmp/MaxScale/modules/libMySQLClient.so(MySQLSendHandshake+0x19b)[0x7f39afb09bc0] /home/raatikka/bin/tmp/MaxScale/modules/libMySQLClient.so(+0x4d1b)[0x7f39afb0ad1b] ./maxscale(poll_waitevents+0x42a)[0x40d0c3] /lib64/libpthread.so.0(+0x7e0f)[0x7f39c6ae5e0f] /lib64/libc.so.6(clone+0x6d)[0x7f39c681844d] ======= Memory map: ======== 00400000-0041a000 r-xp 00000000 08:03 6686345 /home/raatikka/bin/tmp/bin/maxscale 00619000-0061a000 r--p 00019000 08:03 6686345 /home/raatikka/bin/tmp/bin/maxscale 0061a000-0061b000 rw-p 0001a000 08:03 6686345 /home/raatikka/bin/tmp/bin/maxscale 012fa000-0141e000 rw-p 00000000 00:00 0 [heap] 7f3984000000-7f3984021000 rw-p 00000000 00:00 0 - and so forth.
This commit is contained in:
parent
38b44a3a3a
commit
594f1c294f
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define __USE_UNIX98 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user